Re: [PATCH v15 10/30] ovl: Modify ovl_lookup() and friends to lookup metacopy dentry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 10, 2018 at 11:19 AM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> On Mon, May 7, 2018 at 7:40 PM, Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
>>
>> +               if (d.metacopy)
>> +                       metacopy = true;
>> +               /*
>> +                * Do not store intermediate metacopy dentries in chain,
>> +                * except top most lower metacopy dentry
>
> I don't get it.  We need the bottom most metacopy dentry, not the
> topmost.  Am I missing something?

Okay, it's more complicated.

1) there is an upper metacopy dentry:

 - store origin (pointed to by ORIGIN or topmost lower dentry) in stack[0]
 - store data dentry (lowest in metacopy chain) in stack[1], unless
it's the same as origin

2) there is no upper dentry, but a lower metacopy dentry

 - store metacopy dentry in stack[0]
 - store data dentry in stack[1]

Does that make more sense?

> We also need to check file type here, only regular file makes sense as
> metacopy, so if it's something else, then get out with EIO.

I meant file type of *data* inode.  Type of metacopy inode is already
checked by ovl_check_metacopy_xattr().

Thanks,
Miklos
--
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



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux