[PATCH v2 0/2] sunrpc: fix handling of rq_bvec array in svc_rqst

From: Jeff Layton

Date: Wed Oct 08 2025 - 16:23:47 EST


I've seen this message pop intermittently on some knfsd servers:

rpc-srv/tcp: nfsd: sent 1045870 when sending 1045868 bytes - shutting down socket

Unfortunately, I've not been able to reproduce this on my own, but I've
noticed a bug that could cause this.

The first patch in this series fixes a bug in rq_bvec handling I noticed
by inspection. The second patch adds a slot to rq_bvec to account for
the slot used for the TCP record marker.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
Changes in v2:
- Better changelog message for patch #2
- Link to v1: https://lore.kernel.org/r/20251008-rq_bvec-v1-0-7f23d32d75e5@xxxxxxxxxx

---
Jeff Layton (2):
sunrpc: account for TCP record marker in rq_bvec array when sending
sunrpc: add a slot to rqstp->rq_bvec for TCP record marker

fs/nfsd/vfs.c | 6 +++---
net/sunrpc/svc.c | 3 ++-
net/sunrpc/svcsock.c | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
---
base-commit: 177818f176ef904fb18d237d1dbba00c2643aaf2
change-id: 20251008-rq_bvec-b66afd0fdbbb

Best regards,
--
Jeff Layton <jlayton@xxxxxxxxxx>