From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH] dcache: return -ESTALE not -EBUSY on distributed fs race Date: Fri, 19 Dec 2014 10:15:48 +1100 Message-ID: <20141218231548.GF15665@dastard> References: <20141217195911.GF9617@fieldses.org> <20141217200153.GG9617@fieldses.org> <12689.1418917838@jrobl> <20141218155838.GD18179@fieldses.org> <13170.1418920034@jrobl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "J. Bruce Fields" , Al Viro , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jeff Layton To: "J. R. Okajima" Return-path: Content-Disposition: inline In-Reply-To: <13170.1418920034@jrobl> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Dec 19, 2014 at 01:27:14AM +0900, J. R. Okajima 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 We use file handles on local filesystems. They have exactly the same semantics as NFS file handles and so local filesystems have the same ESTALE exposure as "distributed" filesystems to this problem. i.e: $ man open_by_handle_at ..... ESTALE The specified handle is not valid. This error will occur if, for example, the file has been deleted. We've been doing this on XFS since before it was ported to linux 15 years ago... ;) Cheers, Dave. -- Dave Chinner david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org -- 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