Re: [PATCH v6 0/9] Overlayfs: constant st_ino/d_ino for non-samefs

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

 



On Thu, Nov 2, 2017 at 6:33 PM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> On Wed, Nov 1, 2017 at 9:22 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>> Miklos,
>>
>> My trigger for fixing up the non-samefs patches is that I found out
>> while testing NFS export that reconnecting a dir dentry doesn't work
>> for non-samefs case.
>> I tracked the problem down to the default implementation of get_name()
>> in expfs.c that looks up a child inode in parent dir by d_ino.
>
> That may be a good fix, but..

Not that good, it creates dir cache for pure lower without handling
NULL upper properly.

Pushed tested fix to ovl-nonsamefs-v7
with some re-arrange of the patches and more blurb in commit messages.


> we shouldn't have to rely on correct
> d_ino to get the name.
>
> In fact we can just recursively call exportfs_get_name() on underlying
> fs, since we have the parent and the child handle in both the dir and
> non-dir cases.
>

Yes, I have that implementation in the early pure upper decode patches,
but threw it out later on.

> Am I missing something?
>

No, in fact implementation of get_name() is even simpler than that.

The trick with copy up of dir on encode is that we are guarantied
to have a connected upper real  dir dentry before we decode the
overlay dentry (see simple implementation of get_parent() for example),
so we can lookup the name in dcache.

I just thought, hey, I'll apply Chandan's patch to fix get_name(),
but it turned out to be a lot more.
V7 should be fine now, although I still need to improve the xfstest
to make sure I covered all cases properly.

I did already torture V7 (+ovl-nfs-export-wip +ovl_snapshot_wip)
with snapshot tests, so I am more confident about it than V6.

Will post V7 patched to list after I have the test, but feel free to review.

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



[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