limit jail disk space

From: Jone Jas (jas_arlerr_at_yahoo.com.cn)
Date: 07/12/05

  • Next message: Mario Lobo: "Re: Forcing a packet through an interface (OT?)"
    Date: Tue, 12 Jul 2005 17:50:48 +0800 (CST)
    To: freebsd-hackers@freebsd.org
    
    

    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邮箱-中国第一绝无垃圾邮件骚扰超大邮箱
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Mario Lobo: "Re: Forcing a packet through an interface (OT?)"