From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: ->quota_sync Date: Wed, 20 Jul 2011 15:31:04 +0200 Message-ID: <20110720133104.GB8626@quack.suse.cz> References: <20110719161406.GA17144@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , swhiteho@redhat.com, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from cantor2.suse.de ([195.135.220.15]:54662 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006Ab1GTNbF (ORCPT ); Wed, 20 Jul 2011 09:31:05 -0400 Content-Disposition: inline In-Reply-To: <20110719161406.GA17144@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, On Tue 19-07-11 12:14:06, Christoph Hellwig wrote: > is there any reason the ->quota_sync operations (which always ends up in > dquot_quota_sync, or gfs2_quota_sync) is called before writing back the > inodes? Hmm, historically, there was a reason because writing of quota entries might have needed to allocate new blocks to quota file. But these days I don't see any reason since we allocate necessary blocks when quota entry is first looked up and directly modify block device pages when it is modified. > Given that writeback can perform allocations in filesystem not > using ->page_mkwrite or at least cause delalloc conversions that seems > like the wrong place to me. Yes, doing quota writeout after inode writeout would be a more logical place. > Even more so fixing the placement means > we could just call dquot_quota_sync from ->sync_fs, similar how XFS > does it's quota writeout, and thus avoiding the duplicate call to > ->sync_fs from inside dquot_quota_sync, as well as getting rid of the > abuse of the quotactl ops from VFS code. True. I'll add these changes to my patches cleaning up sync code. Honza -- Jan Kara SUSE Labs, CR