From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 13 13:23:01 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 7A26816A41C for ; Wed, 13 Jul 2005 13:23:01 +0000 (GMT) (envelope-from jas_arlerr@yahoo.com.cn) Received: from web15006.mail.cnb.yahoo.com (web15006.mail.cnb.yahoo.com [202.165.103.63]) by mx1.FreeBSD.org (Postfix) with SMTP id 92D5D43D48 for ; Wed, 13 Jul 2005 13:22:59 +0000 (GMT) (envelope-from jas_arlerr@yahoo.com.cn) Received: (qmail 2924 invoked by uid 60001); 13 Jul 2005 13:22:58 -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=hTKvsQ9O43y+waBqsVDlOP5TmZXLw6s9trYuTjhcuB5zjNw/jKECKDG8MSoj6469uLpidDXEbBVQVvXuzWgb794Yh23zaduSaYMxMwQ1vCOxK/5TIGMKsxU0RPWcp/qNW58Er4GOBzmqt78hIST4PUXkPywNp831Vb8psn+Nilo= ; Message-ID: <20050713132258.2922.qmail@web15006.mail.cnb.yahoo.com> Received: from [61.187.54.10] by web15006.mail.cnb.yahoo.com via HTTP; Wed, 13 Jul 2005 21:22:58 CST Date: Wed, 13 Jul 2005 21:22:58 +0800 (CST) From: Jone Jas To: Alex Lyashkov In-Reply-To: <1121251419.8832.14.camel@berloga.shadowland> 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: Wed, 13 Jul 2005 13:23:01 -0000 Alex Lyashkov 写道: > >option QUOTA? or jail disklimit? > I mean jail disk limit > > >for jail disklimit more easy create tools who controled all > limits >for jail. > >Look to LinuxVServer project (www.linux-vserver.org) or > >FreeVPS. > Sure. The tools may control all limits such as cpu time, > memory, bandwidth, disk space, etc. I have read the Linux > VServer dlimit code. But I am not very sure where to put the > hooks for inode/blocks control of jail in FreeBSD. This is why > I open this thread. Vlad GALU said I can look to the quota > method. I will try. Thanks. > -- >If you look into quota function you can see it called from >inode/blocks allocation/deallocation code at same points you >can install disklimits hooks. >I can`t find any benefit add new quota type (total size used at >jail) - this way was used at early version Linux VServer but >have are one problem - more difficult create separated per jail >diskquota. I am really not aware of this. Are there some conflicts? >If you create disklimit separated from quota code you can >easy add quota hash ptr into prison structure and switch >hashes when work. >Next problem - where store jail id for dinode struct. >rwantson@ say we need use xattr for this, but my opinion use >reserved fields in dinode. Yes. My opinion is the same with yours. -- FreeVPS Developers Team http://www.freevps.com __________________________________________________ 赶快注册雅虎超大容量免费邮箱? http://cn.mail.yahoo.com