Date: Mon, 15 Mar 2021 20:52:07 GMT From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: f419fd9ad817 - stable/12 - nfsclient: Fix the stripe unit size for a File Layout pNFS layout Message-ID: <202103152052.12FKq7sq020028@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f419fd9ad81707f831a48412ecbc5c958675d38c commit f419fd9ad81707f831a48412ecbc5c958675d38c Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2021-03-01 20:49:32 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2021-03-15 19:51:26 +0000 nfsclient: Fix the stripe unit size for a File Layout pNFS layout During a recent virtual NFSv4 testing event, a bug in the FreeBSD client was detected when doing a File Layout pNFS DS I/O operation. The size of the I/O operation was smaller than expected. The I/O size is specified as a stripe unit size in bits 6->31 of nflh_util in the layout. I had misinterpreted RFC5661 and had shifted the value right by 6 bits. The correct interpretation is to use the value as presented (it is always an exact multiple of 64), clearing bits 0->5. This patch fixes this. Without the patch, I/O through the DSs work, but the I/O size is 1/64th of what is optimal. (cherry picked from commit 94f2e42f5e0b78a7a4684d4a4eb62ea470a57eb1) --- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index e1c5c7ff3316..cab5ec4005ba 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -5911,7 +5911,7 @@ nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, np = VTONFS(vp); rel_off = off - flp->nfsfl_patoff; - stripe_unit_size = (flp->nfsfl_util >> 6) & 0x3ffffff; + stripe_unit_size = flp->nfsfl_util & NFSFLAYUTIL_STRIPE_MASK; stripe_pos = (rel_off / stripe_unit_size + flp->nfsfl_stripe1) % dp->nfsdi_stripecnt; transfer = stripe_unit_size - (rel_off % stripe_unit_size);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103152052.12FKq7sq020028>