From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Subject: Re: [PATCH 2/3] quota: unify ->get_dqblk Date: Wed, 05 May 2010 14:52:54 +0100 Message-ID: <1273067574.7196.388.camel@localhost.localdomain> References: <20100505103937.040319545@bombadil.infradead.org> <20100505104021.693053400@bombadil.infradead.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: jack@suse.cz, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41201 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751472Ab0EENxF (ORCPT ); Wed, 5 May 2010 09:53:05 -0400 In-Reply-To: <20100505104021.693053400@bombadil.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, On Wed, 2010-05-05 at 06:39 -0400, Christoph Hellwig wrote: > plain text document attachment (quota-common-get_dqblk) > Pass the larger struct fs_disk_quota to the ->get_dqblk operation so > that the Q_GETQUOTA and Q_XGETQUOTA operations can be implemented > with a single filesystem operation and we can retire the ->get_xquota > operation. The additional information (RT-subvolume accounting and > warn counts) are left zero for the VFS quota implementation. > > Signed-off-by: Christoph Hellwig > > Index: linux-2.6/fs/quota/quota.c > =================================================================== > --- linux-2.6.orig/fs/quota/quota.c 2010-05-05 11:57:38.000000000 +0200 > +++ linux-2.6/fs/quota/quota.c 2010-05-05 11:58:46.681263382 +0200 > @@ -136,19 +136,32 @@ static int quota_setinfo(struct super_bl > return sb->s_qcop->set_info(sb, type, &info); > } > > +static void copy_to_if_dqblk(struct if_dqblk *dst, struct fs_disk_quota *src) > +{ > + dst->dqb_bhardlimit = src->d_blk_hardlimit; > + dst->dqb_bsoftlimit = src->d_blk_softlimit; > + dst->dqb_curspace = src->d_bcount; > + dst->dqb_ihardlimit = src->d_ino_hardlimit; > + dst->dqb_isoftlimit = src->d_ino_softlimit; > + dst->dqb_curinodes = src->d_icount; > + dst->dqb_btime = src->d_btimer; > + dst->dqb_itime = src->d_itimer; > + dst->dqb_valid = QIF_ALL; Do the fields needs to be individually marked as valid according to what is supported by a filesystem or can we always assume that a zero value means unknown/unsupported? Otherwise it looks good to me, Steve.