From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 3/6] dquot: move unmount handling into the filesystem Date: Tue, 18 May 2010 00:58:55 +0200 Message-ID: <20100517225855.GI3364@quack.suse.cz> References: <20100512194408.620390318@bombadil.infradead.org> <20100512194453.848250753@bombadil.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: jack@suse.cz, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from cantor.suse.de ([195.135.220.2]:50760 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752381Ab0EQW7A (ORCPT ); Mon, 17 May 2010 18:59:00 -0400 Content-Disposition: inline In-Reply-To: <20100512194453.848250753@bombadil.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed 12-05-10 15:44:11, Christoph Hellwig wrote: > Currently the VFS calls into the quotactl interface for unmounting > filesystems. This means filesystems with their own quota handling > can't easily distinguish between user-space originating quotaoff > and an unount. Instead move the responsibily of the unmount handling > into the filesystem to be consistent with all other dquot handling. > > Note that we do call dquot_disable a lot later now, e.g. after > a sync_filesystem. But this is fine as the quota code takes care > of writing out the quota file by itself. Well, we don't really write quota file by ourselves but we do the writes via blockdev's mapping and that is synced after put_super is called so you are right it should be fine. > Index: linux-2.6/fs/ocfs2/super.c > =================================================================== > --- linux-2.6.orig/fs/ocfs2/super.c 2010-05-10 22:42:36.910005803 +0200 > +++ linux-2.6/fs/ocfs2/super.c 2010-05-10 23:22:59.035004827 +0200 > @@ -1595,6 +1595,8 @@ static void ocfs2_put_super(struct super > { > mlog_entry("(0x%p)\n", sb); > > + dquot_disable(sb, -1, DQUOT_LIMITS_ENABLED); > + OCFS2 disables quotas completely on it's own slightly later in ocfs2_dismount_volume so you can just remove this. Otherwise the patch looks fine. Honza -- Jan Kara SUSE Labs, CR