]> Git Repo - linux.git/commitdiff
Btrfs: fix FS_IOC_GETFLAGS ioctl
authorLi Zefan <[email protected]>
Fri, 15 Apr 2011 03:03:06 +0000 (03:03 +0000)
committerChris Mason <[email protected]>
Sat, 14 May 2011 20:10:27 +0000 (16:10 -0400)
As we've added per file compression/cow support.

Signed-off-by: Li Zefan <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
fs/btrfs/ioctl.c

index 3240dd90da42899675d4378a6bd22e9589917811..aeabf6b6ccc8122f6831601698277bc02231cedf 100644 (file)
@@ -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;
 }
This page took 0.049311 seconds and 4 git commands to generate.