mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-08 07:38:10 +00:00
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>
This commit is contained in:
parent
e1e8fb6a1f
commit
d0092bdda8
1 changed files with 7 additions and 0 deletions
|
@ -81,6 +81,13 @@ static unsigned int btrfs_flags_to_ioctl(unsigned int flags)
|
||||||
iflags |= FS_NOATIME_FL;
|
iflags |= FS_NOATIME_FL;
|
||||||
if (flags & BTRFS_INODE_DIRSYNC)
|
if (flags & BTRFS_INODE_DIRSYNC)
|
||||||
iflags |= FS_DIRSYNC_FL;
|
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;
|
return iflags;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue