From 05c18eb7d2b0e311cf94a61879fb0d7b8e073c66 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 5 Sep 2007 17:22:13 -0400 Subject: [PATCH] --- yaml --- r: 64767 b: refs/heads/master c: b8da0d1c27f144bce999c653467106f3f0d5a308 h: refs/heads/master i: 64765: e859bce54d1985191101c5c7589055085cec09b9 64763: 037c58011eb51a9e2c731036536a386b45fec6e6 64759: a6a17835c9294a0c95b9f7369e5fcaba535ffad3 64751: 51b1aa6a37b3a30c410ba7a2df339a98a49b0d09 64735: abe8195ac2f45212b60ea02c32fbfbb34806faf0 64703: 3cbfc51476a10178f35ca61b888fe5624b4537f8 64639: 5ce0438dad4ddfcb09a5dbcd88b58556127d9bc7 64511: c3008c10cc12a0d226a77b8a17719b53710bd4cb v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfsfh.c | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 271b258c72e2..9a1641fea964 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1033be72cdb053e182bb41e302a1c11e72b68bb +refs/heads/master: b8da0d1c27f144bce999c653467106f3f0d5a308 diff --git a/trunk/fs/nfsd/nfsfh.c b/trunk/fs/nfsd/nfsfh.c index 0eb464a39aae..7011d62acfc8 100644 --- a/trunk/fs/nfsd/nfsfh.c +++ b/trunk/fs/nfsd/nfsfh.c @@ -566,13 +566,23 @@ enum fsid_source fsid_source(struct svc_fh *fhp) case FSID_DEV: case FSID_ENCODE_DEV: case FSID_MAJOR_MINOR: - return FSIDSOURCE_DEV; + if (fhp->fh_export->ex_dentry->d_inode->i_sb->s_type->fs_flags + & FS_REQUIRES_DEV) + return FSIDSOURCE_DEV; + break; case FSID_NUM: - return FSIDSOURCE_FSID; - default: if (fhp->fh_export->ex_flags & NFSEXP_FSID) return FSIDSOURCE_FSID; - else - return FSIDSOURCE_UUID; + break; + default: + break; } + /* either a UUID type filehandle, or the filehandle doesn't + * match the export. + */ + if (fhp->fh_export->ex_flags & NFSEXP_FSID) + return FSIDSOURCE_FSID; + if (fhp->fh_export->ex_uuid) + return FSIDSOURCE_UUID; + return FSIDSOURCE_DEV; }