diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-04-14 23:03:06 -0400 |
---|---|---|
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 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) | |||
81 | iflags |= FS_NOATIME_FL; | 81 | iflags |= FS_NOATIME_FL; |
82 | if (flags & BTRFS_INODE_DIRSYNC) | 82 | if (flags & BTRFS_INODE_DIRSYNC) |
83 | iflags |= FS_DIRSYNC_FL; | 83 | iflags |= FS_DIRSYNC_FL; |
84 | if (flags & BTRFS_INODE_NODATACOW) | ||
85 | iflags |= FS_NOCOW_FL; | ||
86 | |||
87 | if ((flags & BTRFS_INODE_COMPRESS) && !(flags & BTRFS_INODE_NOCOMPRESS)) | ||
88 | iflags |= FS_COMPR_FL; | ||
89 | else if (flags & BTRFS_INODE_NOCOMPRESS) | ||
90 | iflags |= FS_NOCOMP_FL; | ||
84 | 91 | ||
85 | return iflags; | 92 | return iflags; |
86 | } | 93 | } |