Re: [PATCH] dcache: return -ESTALE not -EBUSY on distributed fs race

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

 



On Fri, 19 Dec 2014 01:27:14 +0900
"J. R. Okajima" <hooanon05g@xxxxxxxxx> wrote:

> 
> "J. Bruce Fields":
> > Why do you think -EBUSY's the right error in the local filesystem case?
> 
> This busy_or_stale() is another bandaid, based upon your patch, EBUSY
> --> ESTALE.
> Because the msg string of ESTALE is "Stale NFS file handle" on many
> systems, I don't think it a good idea to return it for local fs. If you
> think EIO is better than EBUSY you can change it to eio_or_stale(). If
> you think it is surely not happen on every local fs, then this inline
> function is not necessary.
> 

I think the only way this could happen on a local fs would be for it to
allow hardlinked directories, which is (of course) forbidden. After
all, the comment above __d_unalias specifically mentions that it's
there to handle remotely renamed directories.

I think the patch is almost certainly fine for NFS. The only question
I'd have is whether other distributed filesystems (p9? ceph? gfs2?)
might have an issue here. It seems unlikely though, and most of them
would also benefit from redoing the lookup with LOOKUP_REVAL set in
this situation.

Still, it's probably worth letting this soak in -next for a bit to be
sure we're not missing anything.

Bruce, you can add my:

Acked-by: Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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