Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 24 Oct 2001 11:43:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 24 Oct 2001 11:43:07 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.31.123]:6414 "EHLO atrey.karlin.mff.cuni.cz") by vger.kernel.org with ESMTP id ; Wed, 24 Oct 2001 11:42:52 -0400 Date: Wed, 24 Oct 2001 17:39:30 +0200 From: Jan Kara To: James Sutherland Cc: Neil Brown , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: RFC - tree quotas for Linux (2.4.12, ext2) Message-ID: <20011024173930.A19777@atrey.karlin.mff.cuni.cz> In-Reply-To: <20011024171658.B10075@atrey.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.20i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > On Wed, 24 Oct 2001, Jan Kara wrote: > > > But how do you solve the following: mv > > The parent changes. You need to go through all the subdirs of and change > > the TID. This is really hard to get right and to avoid deadlocks > > and races... At least it seems to me so. > > Provided you are tracking the total size in each directory, it's just a > matter of subtracting dir's size from the old parent, and adding it to the > new parent. (With suitable checks beforehand to avoid a result which > exceeds quota.) Nope. If you'd just keep usage in directory than you need to go all the way up and decrease the usage and then go all the way down in the new directory. It's simplier but also nontrivial... Honza -- Jan Kara SuSE CR Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/