On Thu, Nov 9, 2017 at 10:50 PM, Vivek Goyal <vgoyal@xxxxxxxxxx> wrote: > Now we will have the capability to have upper inodes which might be only > metadata copy up and data is still on lower inode. So add a new xattr > OVL_XATTR_METACOPY to distinguish between two cases. > > Presence of OVL_XATTR_METACOPY reflects that file has been copied up metadata > only and and data will be copied up later from lower origin. > So this xattr is set when a metadata copy takes place and cleared when > data copy takes place. > > We also use a bit in ovl_inode->flags to cache OVL_UPPERDATA which reflects > whether ovl inode has data or not (as opposed to metadata only copy up). > > Note, OVL_UPPERDATA is set only on those upper inodes which can possibly > be metacopy only inodes. For example, inode should be a regular file and > there needs to be a lower dentry. > Sorry, not buying and I bet Miklos won't buy it either. I just introduced OVL_WHITEOUTS for directories that are non-merge but have origin xattr, to know that we need to create dir cache using ovl_dir_read_merged() to filter out whiteouts. Miklos tweaked my patch to set OVL_WHITEOUTS on all merge dirs on copy up and on lookup, so the test is uniform and doesn't need to check if dir is eligible to OVL_WHITEOUTS. Same logic applied to OVL_UPPERDATA: if flag is not set, need to copy up data. If that requires another memory barrier when creating pure upper then it is not hurting performance to add it, but I doubt that it is needed anyway. Amir. -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html