From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Dickson Subject: Re: [PATCH RFC] vfs: make fstatat retry on ESTALE errors from getattr call Date: Tue, 17 Apr 2012 11:59:49 -0400 Message-ID: <4F8D9375.9010209@RedHat.com> References: <1334316311-22331-1-git-send-email-jlayton@redhat.com> <20120413150518.GA1987@us.ibm.com> <20120413114236.0e557e01@tlielax.poochiereds.net> <4F8B1B7B.3040304@itwm.fraunhofer.de> <20120416073655.7cdb90cf@corrin.poochiereds.net> <4F8C3036.2030702@itwm.fraunhofer.de> <20120416134642.1754cd3e@corrin.poochiereds.net> <1334604785.2879.23.camel@lade.trondhjem.org> <20120416154322.0d95e435@corrin.poochiereds.net> <1334607906.2879.36.camel@lade.trondhjem.org> <20120416190548.2463d1d0@corrin.poochiereds.net> <4F8D580B.7060104@RedHat.com> <20120417093643.7f172057@corrin.poochiereds.net> <4F8D7ADF.9030709@RedHat.com> <87k41eo2m3.fsf@tucsk.pomaz.szeredi.hu> <20120417110219.0db9bdee@corrin.poochiereds.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Miklos Szeredi , "Myklebust\, Trond" , Bernd Schubert , Malahal Naineni , "linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "pstaubach-83r9SdEf25FBDgjK7y7TUQ@public.gmane.org" , "viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org" , "hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org" , "michael.brantley-Iq/kdjr4a97QT0dZR+AlfA@public.gmane.org" , "sven.breuner-mPn0NPGs4xGatNDF+KUbs4QuADTiUCJX@public.gmane.org" To: Jeff Layton Return-path: In-Reply-To: <20120417110219.0db9bdee-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On 04/17/2012 11:02 AM, Jeff Layton wrote: > On Tue, 17 Apr 2012 16:27:16 +0200 > Miklos Szeredi wrote: > >> Steve Dickson writes: >> >>> True, but even so... Giving file systems an opt-out option with the >>> default being out, maybe still have some merit... Making file systems >>> enable this new type of functionality would cut down on any of the >>> "surprise" that might occur with this redo ;-) >> >> I've been arguing for something slightly different for quite some time: >> I never liked errno values which have side effects in the kernel yet >> might be visible to userspace. >> >> So why not introduce ERETRYSTALE, a *kernel internal* errno value that >> userspace will never see and filesystems never accidentally set. The >> VFS can turn this into ESTALE if it doesn't retry for some reason >> (e.g. already retried). >> > > That's possible but it's certainly a lot more invasive. It's also far > more difficult for filesystems to opt-in to this sort of behavior. > > All of the places that call vfs_getattr, for instance will need to be > fixed up to deal with that sort of error. That will also make it messy > to do this in any sort of piecemeal fashion. We can't (for instance) > convert NFSERR_STALE to -ESTALERETRY universally. We'll need to take > great care only to return that to codepaths that are equipped to deal > with it. > > Personally, I'd prefer not to foist so much code churn on any filesystem > that might want to do this sort of retry, but I'll live with it if > that's the consensus opinion... > I agree with Jeff.... Introducing a new errno is a bit of overkill.. IMHO... steved. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html