Commit 30fa8c01 authored by Steve Dickson's avatar Steve Dickson Committed by J. Bruce Fields

NFSD: FIDs need to take precedence over UUIDs

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: default avatarSteve Dickson <steved@redhat.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 24c3767e
...@@ -484,6 +484,8 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, ...@@ -484,6 +484,8 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
goto retry; goto retry;
break; break;
} }
} else if (exp->ex_flags & NFSEXP_FSID) {
fsid_type = FSID_NUM;
} else if (exp->ex_uuid) { } else if (exp->ex_uuid) {
if (fhp->fh_maxsize >= 64) { if (fhp->fh_maxsize >= 64) {
if (root_export) if (root_export)
...@@ -496,9 +498,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, ...@@ -496,9 +498,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
else else
fsid_type = FSID_UUID4_INUM; fsid_type = FSID_UUID4_INUM;
} }
} else if (exp->ex_flags & NFSEXP_FSID) } else if (!old_valid_dev(ex_dev))
fsid_type = FSID_NUM;
else if (!old_valid_dev(ex_dev))
/* for newer device numbers, we must use a newer fsid format */ /* for newer device numbers, we must use a newer fsid format */
fsid_type = FSID_ENCODE_DEV; fsid_type = FSID_ENCODE_DEV;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment