From owner-freebsd-current@FreeBSD.ORG Tue Dec 14 07:04:11 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEC16106564A; Tue, 14 Dec 2010 07:04:11 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 754778FC16; Tue, 14 Dec 2010 07:04:10 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id AA4FA45CA6; Tue, 14 Dec 2010 08:04:09 +0100 (CET) Received: from localhost (89-73-192-49.dynamic.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 959B145C99; Tue, 14 Dec 2010 08:04:04 +0100 (CET) Date: Tue, 14 Dec 2010 08:03:59 +0100 From: Pawel Jakub Dawidek To: Steven Hartland Message-ID: <20101214070359.GL2038@garage.freebsd.pl> References: <20101213214556.GC2038@garage.freebsd.pl> <461DD46B04234127AC0984F945FF6CA6@multiplay.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2YJj5f1P6Th4nBRw" Content-Disposition: inline In-Reply-To: <461DD46B04234127AC0984F945FF6CA6@multiplay.co.uk> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: Next ZFSv28 patchset ready for testing. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 07:04:11 -0000 --2YJj5f1P6Th4nBRw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 13, 2010 at 11:00:31PM -0000, Steven Hartland wrote: > What's the expected behaviour for the sendfile changes as > sendfile is one of the problems we have here with the > double memory allocation required for it under ZFS compared > to UFS. Does this patch address that? No. The patch doesn't address that. It only adds support for sendfile(2), as it was commented out in the previous patchset. > Inspecting the patch the following segment looks odd:- > --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c.orig > +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > ... > while (n > 0) { > nbytes =3D MIN(n, zfs_read_chunk_size - > P2PHASE(uio->uio_loffset, zfs_read_chunk_size)); >=20 > +#ifdef __FreeBSD__ > + if (uio->uio_segflg =3D=3D UIO_NOCOPY) > + error =3D mappedread_sf(vp, nbytes, uio); > + else > +#endif /* __FreeBSD__ */ > if (vn_has_cached_data(vp)) > error =3D mappedread(vp, nbytes, uio); > else >=20 > Is there an extra "else" in there which will break things or should > the __FreeBSD__ mappedread_sf block replace the standard mappedread > call or is the indentation just a bit weird? The code is correct. It is just hard to split 'else' and 'if' with a '#endif' and keep the indentation pretty. Depends on the conditions we use one of the three methods to read the data. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --2YJj5f1P6Th4nBRw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0HFt8ACgkQForvXbEpPzQv7ACg8/MXfzFBhw/3Anqp662p9S9a AqQAoNJBzLjkCHVVWerdU1PCfI1oGUFG =5U9O -----END PGP SIGNATURE----- --2YJj5f1P6Th4nBRw--