Date: Mon, 3 Jan 2011 22:21:46 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Martin Matuska <mm@freebsd.org>, trasz@freebsd.org 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 Message-ID: <20110103202146.GG3140@deviant.kiev.zoral.com.ua> In-Reply-To: <201101031923.p03JNhNZ002826@svn.freebsd.org> References: <201101031923.p03JNhNZ002826@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <sys/systm.h> > #include <sys/sysmacros.h> > #include <sys/resource.h> > +#include <sys/resourcevar.h> > #include <sys/vfs.h> > #include <sys/vnode.h> > #include <sys/file.h> > @@ -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/--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110103202146.GG3140>