svn commit: r359995 - in head/sys/fs: nfsclient nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Wed Apr 15 21:27:53 UTC 2020
Author: rmacklem
Date: Wed Apr 15 21:27:52 2020
New Revision: 359995
URL: https://svnweb.freebsd.org/changeset/base/359995
Log:
Fix the NFSv4.2 extended attribute support for remove extended attrbute.
I missed the "atomic" field of the RemoveExtendedAttribute operation's
reply when I implemented it. It worked between FreeBSD client and server,
since it was missed for both, but it did not conform to RFC 8276.
This patch adds the field for both client and server.
Thanks go to Frank for doing interoperability testing of the extended
attribute support against patches for Linux.
Submitted by: Frank van der Linden <fllinden at amazon.com>
Reported by: Frank van der Linden <fllinden at amazon.com>
Modified:
head/sys/fs/nfsclient/nfs_clrpcops.c
head/sys/fs/nfsserver/nfs_nfsdserv.c
Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c Wed Apr 15 21:06:38 2020 (r359994)
+++ head/sys/fs/nfsclient/nfs_clrpcops.c Wed Apr 15 21:27:52 2020 (r359995)
@@ -8432,7 +8432,7 @@ nfsrpc_rmextattr(vnode_t vp, const char *name, struct
return (error);
if (nd->nd_repstat == 0) {
/* Just skip over the reply and Getattr op status. */
- NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_HYPER + 2 *
+ NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_HYPER + 3 *
NFSX_UNSIGNED);
error = nfsm_loadattr(nd, nap);
if (error == 0)
Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c Wed Apr 15 21:06:38 2020 (r359994)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c Wed Apr 15 21:27:52 2020 (r359995)
@@ -5729,7 +5729,8 @@ nfsrvd_rmxattr(struct nfsrv_descript *nd, __unused int
if (nd->nd_repstat == 0)
nd->nd_repstat = nfsvno_getattr(vp, &nva, nd, p, 1, &attrbits);
if (nd->nd_repstat == 0) {
- NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER);
+ NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER + NFSX_UNSIGNED);
+ *tl++ = newnfs_true;
txdr_hyper(ova.na_filerev, tl); tl += 2;
txdr_hyper(nva.na_filerev, tl);
}
More information about the svn-src-all
mailing list