Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2005 23:01:57 +0800 (CST)
From:      Jone Jas <jas_arlerr@yahoo.com.cn>
To:        Vlad GALU <vladgalu@gmail.com>
Cc:        freebsd hackers <freebsd-hackers@freebsd.org>
Subject:   Re: limit jail disk space
Message-ID:  <20050712150157.32265.qmail@web15009.mail.cnb.yahoo.com>
In-Reply-To: <79722fad0507120603528ab24c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


Vlad GALU <vladgalu@gmail.com> 写道:
On 7/12/05, Jone Jas wrote:
> Thanks for your reply. I googled and found this method but I just
> did not have a try.
> As for the code-hacking method I mentioned, anyone with any idea
> is appreciated!


See ufs_quota.c, especially chkdqchg(). It is passed a struct
ucred* parameter, which contains a struct prison* pointer. So I assume you can make your decision based on that. 

:Yes. It seems that following the quota way may help. Actually, the "#ifdef QUOTA" is scattered in many places, so trivial work need to do.

Of course, the userland quota management tools and the jail utilities need to be made aware of the kernel changes.

:Yes. It may need some new user utilities, e.g. jail_conf to do the configuration jobs (configure the jail's disk space) according to the kernel changes.

-- 
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.



__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com



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