Re: [RFC] EOPENSTALE handling in path_openat()

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

 



On Thu, 23 Jan 2025 at 03:03, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> What's the point of re-walking the same trajectory in dcache again
> and why would it yield something different this time around?

Nfs4 skips revalidate on last component and returns EOPENSTALE from
its ->open() if it turned out to be wrong.  All components leading up
to that were revalidated and the invalid dentry dropped, so what's
really needed is just redoing the last component.

There was an optimization which tried to do this bug eventually got
removed because it was buggy (fac7d1917dfd ("fix EOPENSTALE bug in
do_last()")).   That leaves the choice of redoing the cached lookup
(which should succeed again) or starting from scratch.  I see no point
in doing the latter, although the rarity of this event probably means
that no one would ever notice the difference.

> IDGI.  We *can't* get to open callback without having already dealt
> with leaving RCU mode - any chance of having walked into the wrong
> place due to lack of locking has already been excluded when we'd
> successfully left RCU mode; otherwise we would've gotten to that
> check with error already equal to -ECHILD.

Right.  The point is to not do LOOKUP_REVALIDATE unless we really need
to.   Otherwise EOPENSTALE would just be equivalent to ESTALE.

Thanks,
Miklos



>
> What sequence of events do you have in mind?




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux