[pnfs] [PATCH] set deviceid with fsid
Benny Halevy
bhalevy at panasas.com
Thu Mar 6 14:31:50 EST 2008
Renamed to "pnfsd: set deviceid with fsid" and
merged onto the pnfs branch.
Benny
On Mar. 04, 2008, 19:18 +0200, Marc Eshel <eshel at almaden.ibm.com> wrote:
> From: Marc Eshel <eshel at almaden.ibm.com>
>
>
> ---
>
> fs/nfsd/nfs4proc.c | 2 +-
> fs/nfsd/nfs4xdr.c | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index be017b2..b4ba964 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -1199,7 +1199,7 @@ nfsd4_getdevinfo(struct svc_rqst *rqstp,
> {
> struct super_block *sb;
> struct svc_export *exp = NULL;
> - u32 fsidv = 0; /* FIXME: extract the fsid from the device ID arg */
> + u32 fsidv = gdp->gd_devid.pnfs_fsid;
> int status;
>
> dprintk("%s: type %u dev_id %llx:%llx maxcnt %u\n",
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 6705fbc..d1a1774 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -3224,7 +3224,7 @@ nfsd4_encode_devlist_iterator(struct nfsd4_compoundres *resp,
> /* TODO: Need to encode an identifier that uniquely
> * identifies the export. (fsid)
> */
> - WRITE64(0LL); /* devid major */
> + WRITE64((__be64)gdevl->gd_fhp->fh_export->ex_fsid);
> WRITE64(iter_arg.devid); /* devid minor */
> ADJUST_ARGS();
>
> @@ -3470,6 +3470,7 @@ nfsd4_encode_layoutget(struct nfsd4_compoundres *resp,
> args.minlength = lgp->lg_minlength;
> args.seg = lgp->lg_seg;
> args.fh = &lgp->lg_fhp->fh_handle;
> + args.fsid = lgp->lg_fhp->fh_export->ex_fsid;
>
> /* Set xdr info so file system can encode layout */
> args.xdr.p = resp->p;
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
More information about the pNFS
mailing list