diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-04-15 03:03:06 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-14 16:10:27 -0400 |
commit | d0092bdda819914b8725da76a8c33eb06eb0bd21 (patch) | |
tree | 34de4ffe3822f8a8f1a731628c849280a7e4edeb /fs | |
parent | e1e8fb6a1ff3f9487e03a4cbf85b81d1316068ce (diff) |
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 'fs')
-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 3240dd90da4..aeabf6b6ccc 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; } |