linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields-vtMw8L3fJ9vSiEDVxGk4TQ@public.gmane.org>
To: Benny Halevy <bhalevy-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
Cc: linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	pnfs-6DNke4IJHB0gsBAKwltoeQ@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Marc Eshel <eshel-6kx38NOBMPqrIzol8Bc5pA@public.gmane.org>,
	Andy Adamson <andros-63aXycvo3TyHXe+LvDLADg@public.gmane.org>,
	Ricardo Labiaga
	<ricardo.labiaga-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
	Dean Hildebrand
	<seattleplus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Dean Hildebrand <dhildeb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
	Fred Isaman <iisaman-vtMw8L3fJ9vSiEDVxGk4TQ@public.gmane.org>,
	Mike Sager <sager-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
	Andy Adamson <andros-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v2 11/35] pnfsd: get device list/info
Date: Thu, 10 Dec 2009 14:43:10 -0500	[thread overview]
Message-ID: <20091210194310.GD12559@fieldses.org> (raw)
In-Reply-To: <4B214A3A.8090306-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>

On Thu, Dec 10, 2009 at 09:21:30PM +0200, Benny Halevy wrote:
> On Dec. 10, 2009, 21:04 +0200, "J. Bruce Fields" <bfields-vtMw8L3fJ9vSiEDVxGk4TQ@public.gmane.org> wrote:
> > On Thu, Dec 10, 2009 at 08:53:08PM +0200, Benny Halevy wrote:
> >> On Dec. 10, 2009, 19:30 +0200, " J. Bruce Fields" <bfields-vtMw8L3fJ9vSiEDVxGk4TQ@public.gmane.org> wrote:
> >>> On Mon, Dec 07, 2009 at 11:32:10AM +0200, Benny Halevy wrote:
> >>>> +static __be32
> >>>> +nfsd4_getdevinfo(struct svc_rqst *rqstp,
> >>>> +		struct nfsd4_compound_state *cstate,
> >>>> +		struct nfsd4_pnfs_getdevinfo *gdp)
> >>>> +{
> >>>> +	struct super_block *sb;
> >>>> +	struct svc_export *exp = NULL;
> >>>> +	u32 fsidv = gdp->gd_devid.fsid;
> >>>> +	int status;
> >>>> +
> >>>> +	dprintk("%s: layout_type %u dev_id %llx:%llx maxcnt %u\n",
> >>>> +	       __func__, gdp->gd_layout_type, gdp->gd_devid.fsid,
> >>>> +	       gdp->gd_devid.devid, gdp->gd_maxcount);
> >>>> +
> >>>> +	status = nfserr_inval;
> >>>> +	exp = rqst_exp_find(rqstp, FSID_NUM, &fsidv);
> >>> As I said before, this seems to require an fsid= option on every pnfs
> >>> export.  We shouldn't need that.
> >> If there a better way to get to the sb given the fsid?
> >> Since we don't have a current_fh for getdeviceinfo the alternative
> >> might be to map the deviceids to sb's in the generic layer.
> > 
> > Does the deviceid even need to persist over reboots?  If not, then just
> > an index into an in-memory table might be good enough.  If it does need
> > to persist, then I guess we should look at the filehandle-decoding code
> > for inspiration.
> 
> No, the deviceids need not persist across reboots and we're free to put
> anything we want in the major part of the deviceid, leaving the minor
> for the filesystem-unique ID.

In that case, managing deviceid's isn't any harder than stateid's or the
rest--just make up something and remember it in some in-memory data
structure.

--b.
--
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

  parent reply	other threads:[~2009-12-10 19:43 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07  9:26 [PATCH v2 0/35] Initial pnfsd file layout support Benny Halevy
2009-12-07  9:30 ` [PATCH v2 04/35] pnfsd: return pnfs flags on exchange_id Benny Halevy
     [not found]   ` <1260178237-14780-1-git-send-email-bhalevy-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-07 19:51     `  J. Bruce Fields
2009-12-08 14:46       ` Benny Halevy
2009-12-07  9:31 ` [PATCH v2 07/35] pnfsd: define pnfs_export_operations Benny Halevy
2009-12-07  9:31 ` [PATCH v2 09/35] pnfsd: layout verify Benny Halevy
2009-12-07  9:32 ` [PATCH v2 12/35] pnfsd: filelayout: get device list/info Benny Halevy
2009-12-07  9:32 ` [PATCH v2 14/35] pnfsd: filelayout: layout encoding Benny Halevy
2009-12-07  9:33 ` [PATCH v2 16/35] pnfsd: helper function for stateid checking Benny Halevy
2009-12-07  9:33 ` [PATCH v2 17/35] pnfsd: process the layout stateid Benny Halevy
2009-12-07  9:34 ` [PATCH v2 21/35] pnfsd: destroy layout on expire_client Benny Halevy
2009-12-07  9:34 ` [PATCH v2 22/35] pnfsd: support layout_type attribute Benny Halevy
     [not found] ` <4B1CCA52.8020900-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-07  9:29   ` [PATCH v2 01/35] pnfsd: Define CONFIG_PNFSD Benny Halevy
2009-12-07  9:30   ` [PATCH v2 02/35] pnfsd: define NFSDDBG_PNFS Benny Halevy
2009-12-07  9:30   ` [PATCH v2 03/35] pnfsd, pnfs: protocol level pnfs constants Benny Halevy
     [not found]     ` <1260178224-14745-1-git-send-email-bhalevy-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-07 19:25       `  J. Bruce Fields
2009-12-08 14:31         ` Benny Halevy
2009-12-07  9:30   ` [PATCH v2 05/35] pnfsd: don't set up back channel on create_session for ds Benny Halevy
2009-12-07 20:10     `  J. Bruce Fields
2009-12-08 14:50       ` Benny Halevy
2009-12-07  9:31   ` [PATCH v2 06/35] pnfsd: introduce pnfsd header files Benny Halevy
2009-12-07  9:31   ` [PATCH v2 08/35] pnfsd: add pnfs export option Benny Halevy
2009-12-07  9:31   ` [PATCH v2 10/35] pnfsd: introduce exp_xdr.h Benny Halevy
2009-12-07  9:32   ` [PATCH v2 11/35] pnfsd: get device list/info Benny Halevy
     [not found]     ` <1260178330-15032-1-git-send-email-bhalevy-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-10 17:30       `  J. Bruce Fields
2009-12-10 18:53         ` Benny Halevy
     [not found]           ` <4B214394.4030808-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-10 19:04             ` J. Bruce Fields
     [not found]               ` <20091210190402.GA12559-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2009-12-10 19:21                 ` Benny Halevy
     [not found]                   ` <4B214A3A.8090306-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-10 19:43                     ` J. Bruce Fields [this message]
2009-12-07  9:32   ` [PATCH v2 13/35] pnfsd: layout get Benny Halevy
2009-12-07  9:33   ` [PATCH v2 15/35] pnfsd: Helper functions for layout stateid processing Benny Halevy
2009-12-07  9:33   ` [PATCH v2 18/35] pnfsd: add helper functions for identifying DS stateids Benny Halevy
2009-12-07  9:33   ` [PATCH v2 19/35] pnfsd: accept all ds stateids Benny Halevy
2009-12-07  9:34   ` [PATCH v2 20/35] pnfsd: LAYOUTGET layout stateid processing Benny Halevy
2009-12-07  9:34   ` [PATCH v2 23/35] pnfsd: per block device dlm data server list cache Benny Halevy
2009-12-07  9:35   ` [PATCH v2 24/35] pnfsd: new nfsd filesystem file: pnfs_dlm_device Benny Halevy
2009-12-07  9:35   ` [PATCH v2 26/35] pnfsd: nfsd4_pnfs_dlm_getdevinfo Benny Halevy
2009-12-07  9:35   ` [PATCH v2 27/35] pnfsd: nfsd4_pnfs_dlm_layoutget Benny Halevy
2009-12-07  9:36   ` [PATCH v2 30/35] pnfsd: gfs2: use generic file layout pnfs operations vector Benny Halevy
2009-12-07  9:36   ` [PATCH v2 31/35] posix_acl: resolve compile dependency in posix_acl.h Benny Halevy
2009-12-07  9:36   ` [PATCH v2 32/35] nfs: resolve compile dependency in nfs_xdr.h Benny Halevy
2009-12-07  9:37   ` [PATCH v2 33/35] pnfsd: layout commit Benny Halevy
2009-12-07  9:37   ` [PATCH v2 34/35] pnfsd: layout return Benny Halevy
2009-12-07  9:54   ` [pnfs] [PATCH v2 0/35] Initial pnfsd file layout support Benny Halevy
2009-12-09 10:24   ` [PATCH 0/9] fixes to Initial pnfsd file layout support v2, comments {3,4,5}/35 Benny Halevy
     [not found]     ` <4B1F7AF6.2080305-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-09 10:27       ` [PATCH 1/3] SQUASHME: pnfsd: unify enum pnfs_layout{return,recall}_type Benny Halevy
2009-12-09 10:27       ` [PATCH 2/3] SQUASHME: pnfsd: always set both MDS and DS exchangeid capability flags Benny Halevy
2009-12-09 18:54         `  J. Bruce Fields
2009-12-09 10:27       ` [PATCH 3/3] SQUASHME: pnfsd: define a is_ds_only_session helper Benny Halevy
2009-12-09 10:27       ` [PATCH 4/4] SQUASHME: pnfsd: use only RETURN_* constants Benny Halevy
2009-12-09 10:27       ` [PATCH 5/5] SQUASHME: spnfs: " Benny Halevy
2009-12-09 10:28       ` [PATCH 6/6] SQUASHME: spnfs-block: " Benny Halevy
2009-12-09 10:28       ` [PATCH 7/7] SQUASHME: pnfsd-exofs: use only pnfs_layoutreturn_type Benny Halevy
2009-12-09 10:28       ` [PATCH 8/9] SQUASHME: pnfs: " Benny Halevy
2009-12-09 10:28     ` [PATCH 9/9] SQUASHME: pnfs: filelayout: mask out server's MDS capability flag for DSs Benny Halevy
     [not found]       ` <1260354530-12578-1-git-send-email-bhalevy-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org>
2009-12-09 22:21         ` [pnfs] " Benny Halevy
2009-12-07  9:35 ` [PATCH v2 25/35] pnfsd: nfsd4_pnfs_dlm_getdeviter Benny Halevy
2009-12-07  9:36 ` [PATCH v2 28/35] pnfsd: add dlm file layout layout-type Benny Halevy
2009-12-07  9:36 ` [PATCH v2 29/35] pnfsd: dlm pnfs_export_operations Benny Halevy
2009-12-07  9:37 ` [PATCH v2 35/35] pnfsd: layoutreturn stateid processing Benny Halevy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091210194310.GD12559@fieldses.org \
    --to=bfields-vtmw8l3fj9vsiedvxgk4tq@public.gmane.org \
    --cc=andros-63aXycvo3TyHXe+LvDLADg@public.gmane.org \
    --cc=andros-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org \
    --cc=bhalevy-C4P08NqkoRlBDgjK7y7TUQ@public.gmane.org \
    --cc=dhildeb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=eshel-6kx38NOBMPqrIzol8Bc5pA@public.gmane.org \
    --cc=iisaman-vtMw8L3fJ9vSiEDVxGk4TQ@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pnfs-6DNke4IJHB0gsBAKwltoeQ@public.gmane.org \
    --cc=ricardo.labiaga-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org \
    --cc=sager-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org \
    --cc=seattleplus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).