Date: Wed, 15 Apr 2020 21:27:53 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359995 - in head/sys/fs: nfsclient nfsserver Message-ID: <202004152127.03FLRrNr034137@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@amazon.com> Reported by: Frank van der Linden <fllinden@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004152127.03FLRrNr034137>