Project

General

Profile

Bug #3712

nfs_svc() does not consider NFSv4 for the message size

Added by Marcel Telka almost 7 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
nfs - NFS server and client
Start date:
2013-04-10
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

The nfs_svc function determines the max message size by quering the nfs3tsize function only:

439    readsize = nfs3tsize() + (RPC_MAXDATASIZE - NFS_MAXDATA);
440    if (readsize < RPC_MAXDATASIZE)
441        readsize = RPC_MAXDATASIZE;

In a case the max message size for NFSv3 (the nfs3_max_transfer_size tunable) is set to a lower value (for example 128kB) than the max message size for NFSv4, we could end up in a situation when the NFSv4 server will announce a support for large NFSv4 reads and writes (by default 1MB), but the rpcmod will refuse such big write operations, because the message size (up to 1MB) would exceed the max message size determined by the nfs_svc function.

In such a case the check in mir_check_len might fail and we could see notices like this:

Apr  9 14:23:49 nfs-02 rpcmod: [ID 332748 kern.notice] NOTICE: KRPC: record fragment from client of size(524428) exceeds maximum (131880). Disconnecting
Apr  9 14:23:52 nfs-02 rpcmod: [ID 332748 kern.notice] NOTICE: KRPC: record fragment from client of size(171278) exceeds maximum (131880). Disconnecting
Apr  9 14:23:53 nfs-02 rpcmod: [ID 332748 kern.notice] NOTICE: KRPC: record fragment from client of size(224726) exceeds maximum (131880). Disconnecting
Apr  9 14:23:53 nfs-02 rpcmod: [ID 332748 kern.notice] NOTICE: KRPC: record fragment from client of size(163924) exceeds maximum (131880). Disconnecting

We should modify the nfs_svc function to also consider the size returned by the nfs4tsize function.


Related issues

Related to illumos gate - Bug #3711: nfs4_max_transfer_size is too lowIn Progress2013-04-10

Actions

Also available in: Atom PDF