From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 12 15:02:00 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BCD716A41C for ; Tue, 12 Jul 2005 15:02:00 +0000 (GMT) (envelope-from jas_arlerr@yahoo.com.cn) Received: from web15009.mail.cnb.yahoo.com (web15009.mail.cnb.yahoo.com [202.165.103.66]) by mx1.FreeBSD.org (Postfix) with SMTP id 288D343D4C for ; Tue, 12 Jul 2005 15:01:58 +0000 (GMT) (envelope-from jas_arlerr@yahoo.com.cn) Received: (qmail 32267 invoked by uid 60001); 12 Jul 2005 15:01:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2YZjPhc+S84i8SdtNzzp/X4xvb7BIYlFQEAri1wV3cjIbuHAas2HwmVWQd4BhBfmgs+shCHzCFBIqp+EdvF13p0+im6JWZD1LTuMsJwzIyZkig3xaEMFQfCOzqOZTLMJwElI5xwSZUIOHguuOrgiYqNuLT5Q3ipRA+jTt0D1FaI= ; Message-ID: <20050712150157.32265.qmail@web15009.mail.cnb.yahoo.com> Received: from [61.187.54.10] by web15009.mail.cnb.yahoo.com via HTTP; Tue, 12 Jul 2005 23:01:57 CST Date: Tue, 12 Jul 2005 23:01:57 +0800 (CST) From: Jone Jas To: Vlad GALU In-Reply-To: <79722fad0507120603528ab24c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd hackers Subject: Re: limit jail disk space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2005 15:02:00 -0000 Vlad GALU 写道: 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