]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: Implement FATTR4_CLONE_BLKSIZE attribute
authorChuck Lever <chuck.lever@oracle.com>
Wed, 7 May 2025 14:45:15 +0000 (10:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:11:15 +0000 (11:11 +0100)
commit07862d4f7c357697f5af7d557d8a6707608f419e
tree435395c7527706b6f5be61b777f2e1b03a2aec5a
parent2029ca75cdfa6a25716a5a76b751486cce7e3822
NFSD: Implement FATTR4_CLONE_BLKSIZE attribute

commit d6ca7d2643eebe09cf46840bdc7d68b6e07aba77 upstream.

RFC 7862 states that if an NFS server implements a CLONE operation,
it MUST also implement FATTR4_CLONE_BLKSIZE. NFSD implements CLONE,
but does not implement FATTR4_CLONE_BLKSIZE.

Note that in Section 12.2, RFC 7862 claims that
FATTR4_CLONE_BLKSIZE is RECOMMENDED, not REQUIRED. Likely this is
because a minor version is not permitted to add a REQUIRED
attribute. Confusing.

We assume this attribute reports a block size as a count of bytes,
as RFC 7862 does not specify a unit.

Reported-by: Roland Mainz <roland.mainz@nrubsig.org>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Roland Mainz <roland.mainz@nrubsig.org>
Cc: stable@vger.kernel.org # v6.7+
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4xdr.c