Re: [PATCH] nfs: simplify and guarantee owner uniqueness.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Neil,

On 20/09/2024 04:02, NeilBrown wrote:
On Thu, 19 Sep 2024, Steven Price wrote:
On 19/09/2024 02:29, NeilBrown wrote:
On Wed, 18 Sep 2024, Steven Price wrote:
Hi Neil,

(Dropping the list/others due to the attachment)

(re-adding others now - thanks for the attachment).


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, I've tested the below and I don't see NFS errors any more.

Tested-by: Steven Price <steven.price@xxxxxxx>

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

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 1aaf908acc5d..88bcbcba1381 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -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!

Tested-by: Jon Hunter <jonathanh@xxxxxxxxxx>

Thanks
Jon

--
nvpublic




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux