tmp_suning_uos_patched/fs/overlayfs
Vivek Goyal 67d756c27a ovl: Fix ovl_getattr() to get number of blocks from lower
If an inode has been copied up metadata only, then we need to query the
number of blocks from lower and fill up the stat->st_blocks.

We need to be careful about races where we are doing stat on one cpu and
data copy up is taking place on other cpu.  We want to return
stat->st_blocks either from lower or stable upper and not something in
between.  Hence, ovl_has_upperdata() is called first to figure out whether
block reporting will take place from lower or upper.

We now support metacopy dentries in middle layer.  That means number of
blocks reporting needs to come from lowest data dentry and this could be
different from lower dentry.  Hence we end up making a separate
vfs_getxattr() call for metacopy dentries to get number of blocks.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-07-20 09:56:10 +02:00
..
copy_up.c ovl: Copy up meta inode data from lowest data inode 2018-07-20 09:56:09 +02:00
dir.c ovl: copy up times 2018-07-18 15:44:40 +02:00
export.c ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00
file.c ovl: add reflink/copyfile/dedup support 2018-07-18 15:44:42 +02:00
inode.c ovl: Fix ovl_getattr() to get number of blocks from lower 2018-07-20 09:56:10 +02:00
Kconfig ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
Makefile ovl: stack file ops 2018-07-18 15:44:41 +02:00
namei.c ovl: Modify ovl_lookup() and friends to lookup metacopy dentry 2018-07-20 09:56:09 +02:00
overlayfs.h ovl: Fix ovl_getattr() to get number of blocks from lower 2018-07-20 09:56:10 +02:00
ovl_entry.h ovl: Provide a mount option metacopy=on/off for metadata copyup 2018-07-20 09:56:06 +02:00
readdir.c ovl: fix wrong use of impure dir cache in ovl_iterate() 2018-07-17 16:04:34 +02:00
super.c ovl: A new xattr OVL_XATTR_METACOPY for file on upper 2018-07-20 09:56:08 +02:00
util.c ovl: Fix ovl_getattr() to get number of blocks from lower 2018-07-20 09:56:10 +02:00