From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: vfs-scale, d_revalidate from nfsd Date: Fri, 14 Jan 2011 14:12:35 +1100 Message-ID: References: <8855.1294927436@jrobl> <20110114030325.GU19804@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "J. R. Okajima" , linux-fsdevel , linux-kernel@vger.kernel.org To: Al Viro Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:60561 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752303Ab1ANDMh convert rfc822-to-8bit (ORCPT ); Thu, 13 Jan 2011 22:12:37 -0500 In-Reply-To: <20110114030325.GU19804@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jan 14, 2011 at 2:03 PM, Al Viro wrot= e: > On Fri, Jan 14, 2011 at 01:57:55PM +1100, Nick Piggin wrote: >> On Fri, Jan 14, 2011 at 1:03 AM, J. R. Okajima wrote: >> > >> > NFSD calls filesystem's ->d_revalidate() with the parameter nd =3D= =3D NULL. >> > So every >> > ? ? ? ?if (nd->flags & LOOKUP_RCU) >> > ? ? ? ? ? ? ? ?return -ECHILD; >> > code which was added to ->d_revalidate() of FS which supports NFS >> > exporting will crash. >> > >> > If we rewrite it as >> > ? ? ? ?if (nd && (nd->flags & LOOKUP_RCU)) >> > ? ? ? ? ? ? ? ?return -ECHILD; >> > the problem may not occur. >> > But I am not sure whether lookup_one_len() call in NFSD support rc= u-walk. >> >> Ah, good catch. >> >> I'm going to change the d_revalidate API so it takes and inode and r= cu-walk >> flag parameter to make it easier for filesystems to implement rcu-wa= lk. >> >> That will take care of this NULL nd case. > > Oh, for fuck sake... =A0Would you at least mind posting your API chan= ge > description to fsdevel before going for it? Of course. I was discussing it with Miklos yesterday too, but haven't finished getting a proposal together. The main idea here would be to just pass in a flags parameter rather thank poking in nd to get the rcu-walk status. That would solve this problem and also avoid nd for most filesystems that don't care about it. > ->d_revalidate() is one sick puppy and it's intimately involved in at= omic > open rewrite. =A0Please, *please* don't make that shit even messier..= =2E Right, I did agree with Miklos that using nd for passing rcu-walk status was going in the wrong direction with that API. Do you agree? -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html