Skip to contentSkip to conversation

NFSD: FIDs need to take precedence over UUIDs

PATCH Applied Steve Dickson 2 participants 2 messages Jan 7, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFSD: FIDs need to take precedence over UUIDs

[ Resent per Bruce's request]

Talking with Neil and Bruce, it seems somewhere down the line UUIDs started to taking precedence over the setting fsid= export option when composing file handles which is wrong. This patch restores fsids taking precedence over UUIDs during file handing composing.

One side note, this also can be done from mountd.
See "[PATCH 5/9] Dynamic Pseudo Root - Release 3"
(http://linux-nfs.org/pipermail/nfsv4/2008-November/009459.html)
Either way will work...

steved.

Author: Steve Dickson <[email protected]>
Date:   Thu Feb 14 15:48:20 EST 2008

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.

fs/nfsd/nfsfh.c renamed from fs/nfsd/nfsfh.c.orig +3 -3
diff -up linux-2.6.24.i686/fs/nfsd/nfsfh.c.orig linux-2.6.24.i686/fs/nfsd/nfsfh.c
@@ -410,6 +410,8 @@ fh_compose(struct svc_fh *fhp, struct sv
 				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)
@@ -422,9 +424,7 @@ fh_compose(struct svc_fh *fhp, struct sv
 			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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Applied, thanks.--b.

Quoted 50 lines · Steve Dickson

[ Resent per Bruce's request]

Talking with Neil and Bruce, it seems somewhere down the line UUIDs started to taking precedence over the setting fsid= export option when composing file handles which is wrong. This patch restores fsids taking precedence over UUIDs during file handing composing.

One side note, this also can be done from mountd.
See "[PATCH 5/9] Dynamic Pseudo Root - Release 3"
(http://linux-nfs.org/pipermail/nfsv4/2008-November/009459.html)
Either way will work...

steved.

Author: Steve Dickson <[email protected]>
Date:   Thu Feb 14 15:48:20 EST 2008

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.

diff -up linux-2.6.24.i686/fs/nfsd/nfsfh.c.orig linux-2.6.24.i686/fs/nfsd/nfsfh.c

fs/nfsd/nfsfh.c renamed from fs/nfsd/nfsfh.c.orig +3 -3
@@ -410,6 +410,8 @@ fh_compose(struct svc_fh *fhp, struct sv
 				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)
@@ -422,9 +424,7 @@ fh_compose(struct svc_fh *fhp, struct sv
 			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