From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [RFC PATCH 2/3] vfs: Add open by file handle support Date: Sun, 28 Feb 2010 14:00:22 -0500 Message-ID: <20100228190022.GA26297@fieldses.org> References: <1266558149-11460-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1266558149-11460-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <20100220201322.GA11152@cynthia.pants.nu> <20100226192125.GB23556@fieldses.org> <3FC42B3F-62C4-4E00-A641-0EC943833A0F@sun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Brad Boyer , "Aneesh Kumar K.V" , hch@infradead.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org To: Andreas Dilger Return-path: Received: from fieldses.org ([174.143.236.118]:50230 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936456Ab0B1S7X (ORCPT ); Sun, 28 Feb 2010 13:59:23 -0500 Content-Disposition: inline In-Reply-To: <3FC42B3F-62C4-4E00-A641-0EC943833A0F@sun.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Feb 28, 2010 at 10:55:34AM -0700, Andreas Dilger wrote: > On 2010-02-26, at 12:21, J. Bruce Fields wrote: >> On Sun, Feb 21, 2010 at 11:42:45AM -0700, Andreas Dilger wrote: >>> Yes, we looked at this in the past for Lustre as well, and while we >>> had >>> proposed a patch for the NFSd code to extract the FSID from the >>> filesystem, it was turned down because "setting the FSID via a >>> userspace >>> file is the right thing to do". I have enough on my plate not to >>> wage an >>> uphill battle for this. >> >> I agree that a cluster filesystem shouldn't need fsid= set right >> across >> all servers. >> >> But doesn't the libblkid uuid stuff as it's now implemented give you >> what you need? > > I'm not sure what you mean? With recent mountd and kernel, knfsd generates filehandles using a uuid passed down from mountd, which mountd gets from libblkid. > On the clients (where the NFS servers are > running) there are no block devices, so I don't think libblkid is > relevant. Oh, OK. (Though for a shared-disk cluster-filesystem it should be enough, yes?) > Lustre itself already can provide a UUID/fsid that is the > same on all clients, but there is no way to pass this to NFSd. > > If there is interest to revive this idea, I'll try to dig up the old > patches we had. I believe that they set a FS_NFS_FSID (or similarly > named) flag in the file_system_type, and possibly a method that > extracted this information for NFSd. OK, sure, but if it's only of use to lustre than I don't see how to justify a kernel patch. Another option would be to provide an alternative to nfs-utils/utils/mountd/cache.c's get_uuid() that can request the filesystem's uuid (assuming you've got an easy way to get it from userspace). That might also save having to add yet another case to e.g. fs/nfsd/nfsfh.c:set_version_and_fsid_type(). --b.