From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 3/3] quota: unify ->set_dqblk Date: Wed, 5 May 2010 18:09:56 +0200 Message-ID: <20100505160955.GF3938@quack.suse.cz> References: <20100505103937.040319545@bombadil.infradead.org> <20100505104022.078207055@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 cantor2.suse.de ([195.135.220.15]:57780 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932593Ab0EEQJ5 (ORCPT ); Wed, 5 May 2010 12:09:57 -0400 Content-Disposition: inline In-Reply-To: <20100505104022.078207055@bombadil.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed 05-05-10 06:39:40, Christoph Hellwig wrote: > Pass the larger struct fs_disk_quota to the ->set_dqblk operation so > that the Q_SETQUOTA and Q_XSETQUOTA operations can be implemented > with a single filesystem operation and we can retire the ->set_xquota > operation. The additional information (RT-subvolume accounting and > warn counts) are left zero for the VFS quota implementation. > > Add new fieldmask values for setting the numer of blocks and inodes > values which is required for the VFS quota, but wasn't for XFS. > > Signed-off-by: Christoph Hellwig > Just one minor nit below... ... > @@ -2405,11 +2424,14 @@ static int do_set_dqblk(struct dquot *dq > } > > int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, > - struct if_dqblk *di) > + struct fs_disk_quota *di) > { > struct dquot *dquot; > int rc; > > + if (!sb_has_quota_active(sb, type)) > + return -ESRCH; > + This is unnecessary... > dquot = dqget(sb, id, type); > if (!dquot) { > rc = -ESRCH; > Honza -- Jan Kara SUSE Labs, CR