Re: [PATCH v4 02/15] ovl: store file handle of lower inode on copy up

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

 



On Wed, May 3, 2017 at 6:14 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> On Mon, May 1, 2017 at 4:41 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>> Sometimes it is interesting to know if an upper file is pure
>> upper or a copy up target, and if it is a copy up target, it
>> may be interesting to find the copy up origin.
>>
>> This will be used to preserve lower inode numbers across copy up.
>>
>> Store the lower inode file handle in upper inode extended attribute
>> overlay.origin on copy up to use it later for these cases.
>> Store the lower filesystem uuid along side the file handle, so we can
>> validate that we are looking for the origin file in the original fs.
>>
>> On failure to encode lower file handle, store an invalid 'null' handle,
>> so we can always use the overlay.origin xattr to distinguish between
>> a copy up and a pure upper inode.
>>
>> If lower fs does not support NFS export ops or if not all layers are
>> on the same fs, don't try to encode a lower file handle and store the
>> 'null' handle instead.
>>
>> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
>> ---
> [...]
>> @@ -316,6 +417,14 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
>>         if (err)
>>                 goto out_cleanup;
>>
>> +       /*
>> +        * Store identifier of lower inode in upper inode xattr to
>> +        * allow lookup of the copy up origin inode.
>> +        */
>> +       err = ovl_set_origin(dentry, temp);
>
> calls setxattr - should be inside the temp->d_inode code block
>

No. it doesn't - sorry for the noise.
--
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