Date: Tue, 26 May 2009 16:20:46 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Menshikov Konstantin <kostjn@peterhost.ru> Cc: freebsd-hackers@freebsd.org Subject: Re: Disk quota for Jail. Discussion. Message-ID: <20090526132046.GC1927@deviant.kiev.zoral.com.ua> In-Reply-To: <4A1BE827.2030303@peterhost.ru> References: <4A1B8CF8.7030102@peterhost.ru> <20090526120313.GA1927@deviant.kiev.zoral.com.ua> <4A1BE1F8.9050804@peterhost.ru> <20090526123632.GB1927@deviant.kiev.zoral.com.ua> <4A1BE827.2030303@peterhost.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--dXJXs/M7/ajzpbcK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 26, 2009 at 05:01:27PM +0400, Menshikov Konstantin wrote: > Kostik Belousov wrote: > >On Tue, May 26, 2009 at 04:35:04PM +0400, Menshikov Konstantin wrote: > > =20 > >>Kostik Belousov wrote: > >> =20 > >>>On Tue, May 26, 2009 at 10:32:24AM +0400, Menshikov Konstantin wrote: > >>> =20 > >>>>In structure prison it is added structures containing disk quotas and= =20 > >>>>usage. > >>>>At start Jail, we calculate the size root path and number of files in= =20 > >>>>it, thus receiving current use of a disk. > >>>>In functions of allocation of disk blocks and inode, we check quotas= =20 > >>>>and we increase current use. > >>>> =20 > >>>> =20 > >>>UFS cannot determine whether the new allocation goes under the jail > >>>root or not. > >>>=20 > >>> =20 > >>Yes. But jail cannot allocate block and inode above root path. In=20 > >>allocation functions, whether for example ffs_alloc we have access to= =20 > >>ucred process and we can check up there is a process in jail. > >> =20 > > > >Yes, you can check this for jailed process. Think about non-jailed=20 > >processes > >that can do allocation below the jail root. > > =20 > Processes out of jail are not considered. > I do not understand, these processes have what relation to disk to=20 > quotas for jail. Please explain more in detail Since the processes outside of the jail may allocate or delete blocks or inodes under the jail root, doing accounting only for actions initiated by jailed processes means that accounting does not reflect reality. --dXJXs/M7/ajzpbcK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkob7K4ACgkQC3+MBN1Mb4gOPQCgn/M4I6gRFY43uTSf1PdgTT4U uFEAn1Wln29DF/y743qBnyGq1/NtWwJU =hRFI -----END PGP SIGNATURE----- --dXJXs/M7/ajzpbcK--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090526132046.GC1927>