From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Zippel Subject: Re: fishy ->put_inode usage in affs Date: Thu, 14 Oct 2004 22:23:07 +0200 (CEST) Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: References: <20041014113005.GA24568@lst.de> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from scrub.xs4all.nl ([194.109.195.176]:25323 "EHLO scrub.xs4all.nl") by vger.kernel.org with ESMTP id S267657AbUJNUXN (ORCPT ); Thu, 14 Oct 2004 16:23:13 -0400 To: Christoph Hellwig In-Reply-To: <20041014113005.GA24568@lst.de> List-Id: linux-fsdevel.vger.kernel.org Hi, On Thu, 14 Oct 2004, Christoph Hellwig wrote: > looking at i_count in ->put_inode is racy. But ou could do the truncate > nicely in ->clear_inode, with some work you might be able to consolidate > the affs_truncate call in affs_delete_inode into that one aswell. I don't like the idea of delaying it that long. I'll probably should move it to affs_file_release() and affs_notify_change(). > Also what's the rationale for discarding the preallocations in > affs_put_inode? Inode reference counts are something purely internal, > depending in whether it's in core or ondisk reservations either > fops->release or iops->clear_inode sounds like the right thing for it. Well, the last time I did some major work on it, was somewhere during 2.2, but I guess I've put it there to make sure preallocation is released. The problem are directories, I'd like to avoid that preallocation for them is kept too long. Actually I'd like to have some mechanism to explicitly free all preallocations, e.g. when a disk gets full, it can be used to completely fill it. At some point I played around with some code to do this by basically doing a sync (that's why there is another call in affs_write_inode()). bye, Roman