From owner-svn-src-stable-8@FreeBSD.ORG Mon Jan 3 20:21:50 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F90106564A; Mon, 3 Jan 2011 20:21:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5B9D78FC0A; Mon, 3 Jan 2011 20:21:49 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p03KLkd3054040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Jan 2011 22:21:46 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p03KLk62005190; Mon, 3 Jan 2011 22:21:46 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p03KLkNU005189; Mon, 3 Jan 2011 22:21:46 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Jan 2011 22:21:46 +0200 From: Kostik Belousov To: Martin Matuska , trasz@freebsd.org Message-ID: <20110103202146.GG3140@deviant.kiev.zoral.com.ua> References: <201101031923.p03JNhNZ002826@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8S1fMsFYqgBC+BN/" Content-Disposition: inline In-Reply-To: <201101031923.p03JNhNZ002826@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r216927 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2011 20:21:50 -0000 --8S1fMsFYqgBC+BN/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 03, 2011 at 07:23:43PM +0000, Martin Matuska wrote: > Author: mm > Date: Mon Jan 3 19:23:43 2011 > New Revision: 216927 > URL: http://svn.freebsd.org/changeset/base/216927 >=20 > Log: > MFC r207745 (trasz): > =20 > Enforce RLIMIT_FSIZE in ZFS. > =20 > Note: original implementation without vn_rlimit_fsize (pre-r207662) > =20 Can we merge vn_rlimit_fsize() and stop duplicating this code ? > Reviewed by: trasz > Approved by: pjd >=20 > Modified: > stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) >=20 > Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vno= ps.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 > --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c M= on Jan 3 18:34:28 2011 (r216926) > +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c M= on Jan 3 19:23:43 2011 (r216927) > @@ -30,6 +30,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -4362,6 +4363,17 @@ zfs_freebsd_write(ap) > } */ *ap; > { > =20 > + if (ap->a_vp->v_type =3D=3D VREG && ap->a_uio->uio_td !=3D NULL) { > + PROC_LOCK(ap->a_uio->uio_td->td_proc); > + if (ap->a_uio->uio_offset + ap->a_uio->uio_resid > > + lim_cur(ap->a_uio->uio_td->td_proc, RLIMIT_FSIZE)) { > + psignal(ap->a_uio->uio_td->td_proc, SIGXFSZ); > + PROC_UNLOCK(ap->a_uio->uio_td->td_proc); > + return (EFBIG); > + } > + PROC_UNLOCK(ap->a_uio->uio_td->td_proc); > + } > + > return (zfs_write(ap->a_vp, ap->a_uio, ioflags(ap->a_ioflag), > ap->a_cred, NULL)); > } --8S1fMsFYqgBC+BN/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk0iL9kACgkQC3+MBN1Mb4jKoACdGV6OzjiTto3C8Y1KCGBgt9c9 GRoAoIc2Rnms/UmulPGcVoXreNOQ8VXR =Y6+g -----END PGP SIGNATURE----- --8S1fMsFYqgBC+BN/--