From owner-svn-src-all@FreeBSD.ORG Sat Jun 22 04:22:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B092CBBF; Sat, 22 Jun 2013 04:22:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with ESMTP id 7945B1B2E; Sat, 22 Jun 2013 04:22:24 +0000 (UTC) Received: from glenbarber.us (nucleus.glenbarber.us [IPv6:2001:470:8:1205:2:2:ff:29]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 9160323F840; Sat, 22 Jun 2013 00:22:22 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.8.3 onyx.glenbarber.us 9160323F840 Authentication-Results: onyx.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 22 Jun 2013 00:22:19 -0400 From: Glen Barber To: Rick Macklem Subject: Re: svn commit: r252074 - head/sys/fs/nfsclient Message-ID: <20130622042219.GC1888@glenbarber.us> References: <201306212246.r5LMkHBY070137@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oJ71EGRlYNjSvfq7" Content-Disposition: inline In-Reply-To: <201306212246.r5LMkHBY070137@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 04:22:24 -0000 --oJ71EGRlYNjSvfq7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 21, 2013 at 10:46:17PM +0000, Rick Macklem wrote: > Author: rmacklem > Date: Fri Jun 21 22:46:16 2013 > New Revision: 252074 > URL: http://svnweb.freebsd.org/changeset/base/252074 >=20 > Log: > The NFSv4.1 LayoutCommit operation requires a valid offset and length. > (0, 0 is not sufficient) This patch a loop for each file layout, using > the offset, length of each file layout in a separate LayoutCommit. >=20 > Modified: > head/sys/fs/nfsclient/nfs_clstate.c >=20 > Modified: head/sys/fs/nfsclient/nfs_clstate.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfsclient/nfs_clstate.c Fri Jun 21 22:45:03 2013 (r252073) > +++ head/sys/fs/nfsclient/nfs_clstate.c Fri Jun 21 22:46:16 2013 (r252074) > @@ -5145,16 +5145,28 @@ static void > nfscl_dolayoutcommit(struct nfsmount *nmp, struct nfscllayout *lyp, > struct ucred *cred, NFSPROC_T *p) > { > + struct nfsclflayout *flp; > + uint64_t len; > int error; > =20 > - error =3D nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen, > - 0, 0, 0, lyp->nfsly_lastbyte, &lyp->nfsly_stateid, > - NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL); > - if (error =3D=3D NFSERR_NOTSUPP) { > - /* If the server doesn't want it, don't bother doing it. */ > - NFSLOCKMNT(nmp); > - nmp->nm_state |=3D NFSSTA_NOLAYOUTCOMMIT; > - NFSUNLOCKMNT(nmp); > + LIST_FOREACH(flp, &lyp->nfsly_flayrw, nfsfl_list) { > + if (flp->nfsfl_off <=3D lyp->nfsly_lastbyte) { > + len =3D flp->nfsfl_end - flp->nfsfl_off; > + error =3D nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, > + lyp->nfsly_fhlen, 0, flp->nfsfl_off, len, > + lyp->nfsly_lastbyte, &lyp->nfsly_stateid, > + NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL); > + NFSCL_DEBUG(4, "layoutcommit err=3D%d off=3D%qd len=3D%qd " > + "lastbyte=3D%qd\n", error, flp->nfsfl_off, len, > + lyp->nfsly_lastbyte); > + if (error =3D=3D NFSERR_NOTSUPP) { > + /* If not supported, don't bother doing it. */ > + NFSLOCKMNT(nmp); > + nmp->nm_state |=3D NFSSTA_NOLAYOUTCOMMIT; > + NFSUNLOCKMNT(nmp); > + break; > + } > + } > } > } > =20 This breaks head/. /src/sys/fs/nfsclient/nfs_clstate.c:5161:8: error: format specifies type 'l= ong long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] lyp->nfsly_lastbyte); ^~~~~~~~~~~~~~~~~~~ /src/sys/fs/nfs/nfscl.h:74:11: note: expanded from macro 'NFSCL_DEBUG' printf(__VA_ARGS__); \ ^ 3 errors generated. *** Error code 1 Stop. make: stopped in /obj/amd64.amd64/src/sys/LINT *** Error code 1 Stop. make: stopped in /src Glen --oJ71EGRlYNjSvfq7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBCAAGBQJRxSZ7AAoJEFJPDDeguUajOrsIALUzOKiltTLEN60HQLw00pEa U3OsGNV307LKbVD9QOwwj9XccXnruf70I4sT92VZZqew5WN9MhPnKTmlBCotqy+U t7JmRyeVYq+Lb7HXpxh1IzxE2mQ2FzjXe0zIkjLjfD+73z4mBoQ8p4yKfnZisEsr FEioPGqpH+PM7xhI+lfSPXGImG2Vl3/PFieM+kH3Nk0nGdLMJzrWvJEGnhJ82UGb pUMS6DgBhzBp2FO/kpn+mH9A4KTKLfSPmUeFUABPRg0J0c5ZOUkuPDDLTN69k+rT IqhFuagPw2qCn35zd1ts8N3dsqIZDV5u6GTbUQezqa0e6WFP5cp/S5ooDRqf5Dc= =Wbj4 -----END PGP SIGNATURE----- --oJ71EGRlYNjSvfq7--