Disk quota for Jail. Discussion.

Kostik Belousov kostikbel at gmail.com
Tue May 26 13:20:52 UTC 2009


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:
> >  
> >>Kostik Belousov wrote:
> >>    
> >>>On Tue, May 26, 2009 at 10:32:24AM +0400, Menshikov Konstantin wrote:
> >>>      
> >>>>In structure prison it is added structures containing disk quotas and 
> >>>>usage.
> >>>>At start Jail, we calculate the size root path and number of files in 
> >>>>it, thus receiving current use of a disk.
> >>>>In functions of allocation of disk blocks and inode, we check quotas 
> >>>>and we increase current use.
> >>>>   
> >>>>        
> >>>UFS cannot determine whether the new allocation goes under the jail
> >>>root or not.
> >>> 
> >>>      
> >>Yes. But jail cannot allocate block and inode above root path. In 
> >>allocation functions, whether for example ffs_alloc we have access to 
> >>ucred process and we can check up there is a process in jail.
> >>    
> >
> >Yes, you can check this for jailed process. Think about non-jailed 
> >processes
> >that can do allocation below the jail root.
> >  
> Processes out of jail are not considered.
> I do not understand, these processes have what relation to disk to 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20090526/dfdbb8cd/attachment.pgp


More information about the freebsd-hackers mailing list