diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-04-15 05:03:06 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-14 22:10:27 +0200 |
commit | d0092bdda819914b8725da76a8c33eb06eb0bd21 (patch) | |
tree | 34de4ffe3822f8a8f1a731628c849280a7e4edeb /fs/btrfs/ioctl.c | |
parent | fs: remove FS_COW_FL (diff) | |
download | linux-d0092bdda819914b8725da76a8c33eb06eb0bd21.tar.xz linux-d0092bdda819914b8725da76a8c33eb06eb0bd21.zip |
Btrfs: fix FS_IOC_GETFLAGS ioctl
As we've added per file compression/cow support.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/ioctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 3240dd90da42..aeabf6b6ccc8 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -81,6 +81,13 @@ static unsigned int btrfs_flags_to_ioctl(unsigned int flags) iflags |= FS_NOATIME_FL; if (flags & BTRFS_INODE_DIRSYNC) 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; } |