NFSD: FIDs need to take precedence over UUIDs
authorSteve Dickson <SteveD@redhat.com>
Wed, 7 Jan 2009 21:54:30 +0000 (16:54 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 7 Jan 2009 22:23:07 +0000 (17:23 -0500)
When determining the fsid_type in fh_compose(), the setting of the FID
via fsid= export option needs to take precedence over using the UUID
device id.

Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfsfh.c

index 019a8a20184dc8c529a2567848d1fdf7a7d57bab..9f1ca17293d3e0a54a42234643f250aa22c6e062 100644 (file)
@@ -484,6 +484,8 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
                                goto retry;
                        break;
                }
+       } else if (exp->ex_flags & NFSEXP_FSID) {
+               fsid_type = FSID_NUM;
        } else if (exp->ex_uuid) {
                if (fhp->fh_maxsize >= 64) {
                        if (root_export)
@@ -496,9 +498,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
                        else
                                fsid_type = FSID_UUID4_INUM;
                }
-       } else if (exp->ex_flags & NFSEXP_FSID)
-               fsid_type = FSID_NUM;
-       else if (!old_valid_dev(ex_dev))
+       } else if (!old_valid_dev(ex_dev))
                /* for newer device numbers, we must use a newer fsid format */
                fsid_type = FSID_ENCODE_DEV;
        else