Commit d0092bdd authored by Li Zefan's avatar Li Zefan Committed by Chris Mason

Btrfs: fix FS_IOC_GETFLAGS ioctl

As we've added per file compression/cow support.
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent e1e8fb6a
...@@ -81,6 +81,13 @@ static unsigned int btrfs_flags_to_ioctl(unsigned int flags) ...@@ -81,6 +81,13 @@ static unsigned int btrfs_flags_to_ioctl(unsigned int flags)
iflags |= FS_NOATIME_FL; iflags |= FS_NOATIME_FL;
if (flags & BTRFS_INODE_DIRSYNC) if (flags & BTRFS_INODE_DIRSYNC)
iflags |= FS_DIRSYNC_FL; iflags |= FS_DIRSYNC_FL;
if (flags & BTRFS_INODE_NODATACOW)
iflags |= FS_NOCOW_FL;
if ((flags & BTRFS_INODE_COMPRESS) && !(flags & BTRFS_INODE_NOCOMPRESS))
iflags |= FS_COMPR_FL;
else if (flags & BTRFS_INODE_NOCOMPRESS)
iflags |= FS_NOCOMP_FL;
return iflags; return iflags;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment