nfs: simplify and guarantee owner uniqueness.
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Steven Price
Hi Neil,
(Dropping the list/others due to the attachment)
(re-adding others now - thanks for the attachment).
Quoted 4 lines
Attached, this is booting a kernel compiled from
00fd839ca761("nfs:
simplify and guarantee owner uniqueness.") which uses an NFS root with a Debian bullseye userspace.
This shows that the owner_id was always different - or almost always. Once it repeated we got an error because the seqid kept increasing. This is because the xdr encoding is broken.
Please apply this incremental patch and confirm that it works now.
Thanks,
NeilBrown
fs/nfs/nfs4xdr.c +1 -1
@@ -1429,7 +1429,7 @@ static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena *p++ =cpu_to_be32 (28 ); p =xdr_encode_opaque_fixed (p,"open id:" ,8 ); *p++ =cpu_to_be32 (arg->server->s_dev); -xdr_encode_hyper (p, arg->id.uniquifier); + p =xdr_encode_hyper (p, arg->id.uniquifier);xdr_encode_hyper (p, arg->id.create_time); }
Steven Price
Tested-byQuoted 12 lines · NeilBrown
Quoted 3 lines · Steven Price
Hi Neil,
(Dropping the list/others due to the attachment)
(re-adding others now - thanks for the attachment).
Quoted 4 lines
Attached, this is booting a kernel compiled from
00fd839ca761("nfs:
simplify and guarantee owner uniqueness.") which uses an NFS root with a Debian bullseye userspace.
Quoted 5 lines
This shows that the
owner_idwas always different - or almost always. Once it repeated we got an error because the seqid kept increasing. This is because the xdr encoding is broken.Please apply this incremental patch and confirm that it works now.
Thanks, I've tested the below and I don't see NFS errors any more.
Thanks,
Steve
Quoted 16 lines
Thanks,
NeilBrownfs/nfs/nfs4xdr.c +1
-1@@ -1429,7 +1429,7 @@ static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena *p++ =cpu_to_be32 (28 ); p =xdr_encode_opaque_fixed (p,"open id:" ,8 ); *p++ =cpu_to_be32 (arg->server->s_dev); -xdr_encode_hyper (p, arg->id.uniquifier); + p =xdr_encode_hyper (p, arg->id.uniquifier);xdr_encode_hyper (p, arg->id.create_time); }
Quoted 17 lines · Steven Price
Quoted 16 lines · NeilBrown
Quoted 3 lines · Steven Price
Hi Neil,
(Dropping the list/others due to the attachment)
(re-adding others now - thanks for the attachment).
Quoted 4 lines
Attached, this is booting a kernel compiled from
00fd839ca761("nfs:
simplify and guarantee owner uniqueness.") which uses an NFS root with a Debian bullseye userspace.This shows that the
owner_idwas always different - or almost always. Once it repeated we got an error because the seqid kept increasing. This is because the xdr encoding is broken.
Quoted 5 lines
Quoted 1 line
Please apply this incremental patch and confirm that it works now.
Thanks, I've tested the below and I don't see NFS errors any more.
Tested-by Steven Price <[email protected]>
Thanks Steve.
Anna: could you please squash this fix in to the commit?
Jon: could you please confirm that this fixes your problem too.
Thanks,
NeilBrown
fs/nfs/nfs4xdr.c +1 -1
@@ -1429,7 +1429,7 @@ static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena *p++ =cpu_to_be32 (28 ); p =xdr_encode_opaque_fixed (p,"open id:" ,8 ); *p++ =cpu_to_be32 (arg->server->s_dev); -xdr_encode_hyper (p, arg->id.uniquifier); + p =xdr_encode_hyper (p, arg->id.uniquifier);xdr_encode_hyper (p, arg->id.create_time); }
Hi Neil,
Quoted 37 lines · NeilBrown
Quoted 17 lines · Steven Price
Quoted 16 lines · NeilBrown
Quoted 3 lines · Steven Price
Hi Neil,
(Dropping the list/others due to the attachment)
(re-adding others now - thanks for the attachment).
Quoted 4 lines
Attached, this is booting a kernel compiled from
00fd839ca761("nfs:
simplify and guarantee owner uniqueness.") which uses an NFS root with a Debian bullseye userspace.This shows that the
owner_idwas always different - or almost always. Once it repeated we got an error because the seqid kept increasing. This is because the xdr encoding is broken.Quoted 5 lines
Quoted 1 line
Please apply this incremental patch and confirm that it works now.
Thanks, I've tested the below and I don't see NFS errors any more.
Tested-by Steven Price <[email protected]>Thanks Steve.
Anna: could you please squash this fix in to the commit?
Jon: could you please confirm that this fixes your problem too.Thanks,
NeilBrownfs/nfs/nfs4xdr.c +0
-0
fs/nfs/nfs4xdr.c static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena · line 1434
Quoted 7 lines
fs/nfs/nfs4xdr.c +1
-1@@ -1429,7 +1429,7 @@ static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena *p++ =cpu_to_be32 (28 ); p =xdr_encode_opaque_fixed (p,"open id:" ,8 ); *p++ =cpu_to_be32 (arg->server->s_dev); -xdr_encode_hyper (p, arg->id.uniquifier); + p =xdr_encode_hyper (p, arg->id.uniquifier);xdr_encode_hyper (p, arg->id.create_time); }
Works for me!
Thanks
Jon
Signature · 1 line
nvpublic
Quoted 35 lines · Jon Hunter
Hi Neil,
Quoted 32 lines · NeilBrown
Quoted 17 lines · Steven Price
Quoted 16 lines · NeilBrown
Quoted 3 lines · Steven Price
Hi Neil,
(Dropping the list/others due to the attachment)
(re-adding others now - thanks for the attachment).
Quoted 4 lines
Attached, this is booting a kernel compiled from
00fd839ca761("nfs:
simplify and guarantee owner uniqueness.") which uses an NFS root with a Debian bullseye userspace.This shows that the
owner_idwas always different - or almost always. Once it repeated we got an error because the seqid kept increasing. This is because the xdr encoding is broken.Quoted 5 lines
Quoted 1 line
Please apply this incremental patch and confirm that it works now.
Thanks, I've tested the below and I don't see NFS errors any more.
Tested-by Steven Price <[email protected]>Thanks Steve.
Anna: could you please squash this fix in to the commit?
Jon: could you please confirm that this fixes your problem too.Thanks,
NeilBrown
Quoted 15 lines
fs/nfs/nfs4xdr.c static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena · line 1434
Quoted 12 lines
fs/nfs/nfs4xdr.c +1
-1@@ -1429,7 +1429,7 @@ static inline void encode_openhdr(struct xdr_stream *xdr, const struct nfs_opena *p++ =cpu_to_be32 (28 ); p =xdr_encode_opaque_fixed (p,"open id:" ,8 ); *p++ =cpu_to_be32 (arg->server->s_dev); -xdr_encode_hyper (p, arg->id.uniquifier); + p =xdr_encode_hyper (p, arg->id.uniquifier);xdr_encode_hyper (p, arg->id.create_time); }Works for me!
Thanks Jon.
Anna has updated the patch so the fixed version is what will land upstream.
NeilBrown