]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsclient: Fix the stripe unit size for a File Layout pNFS layout
authorRick Macklem <rmacklem@FreeBSD.org>
Mon, 1 Mar 2021 20:49:32 +0000 (12:49 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Mon, 15 Mar 2021 19:51:26 +0000 (12:51 -0700)
commitf419fd9ad81707f831a48412ecbc5c958675d38c
tree2eadad32d94842cb4b89be6e9d45d7e2aa0ed4c9
parenta1224bee90c6a54909d279ec631ea2ad8241ddf4
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