Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2005 17:50:48 +0800 (CST)
From:      Jone Jas <jas_arlerr@yahoo.com.cn>
To:        freebsd-hackers@freebsd.org
Subject:   limit jail disk space
Message-ID:  <20050712095048.60122.qmail@web15007.mail.cnb.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi hackers, 
   As far as I know, there is no limit of the disk space that a jail can use. As for the Linux VServer(similar to jail), its dlimit does such thing for the "security context". I read the dlimit code and find that it achieves that by limiting the number of inodes and data blocks the vserver can get. The hooks are inserted in the functions such as ext2_new_inode, ext2_free_inode, ext2_new_block and ext2_free_block. 
   My question is if we can do such thing to the jail. If so, where should we insert the hooks? It seems that the FreeBSD inode/block allocation/free functions are not so explicit as Linux. 
   There are serveral places, I'm not sure which are the correct ones:        
   for inodes: ffs_valloc, ffs_vfree 
   for blocks: ffs_alloc, ffs_freeblk, 
               or ufs_balloc_ufs1/2 

  Any reply or hints is appreciated! 
  Regards! 

  Jas 


		
---------------------------------
DO YOU YAHOO!?
  雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050712095048.60122.qmail>