Skip to content

Commit

Permalink
Btrfs: fix FS_IOC_GETFLAGS ioctl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and Chris Mason committed May 14, 2011
1 parent e1e8fb6 commit d0092bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d0092bd

Please sign in to comment.