From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mingming Cao Subject: Re: [PATCH 14/14] quota: Support 64-bit quota format Date: Tue, 28 Oct 2008 17:41:51 -0700 Message-ID: <1225240911.6452.5.camel@mingming-laptop> References: <1225109512852-git-send-email-jack@suse.cz> <12251095123763-git-send-email-jack@suse.cz> <12251095124166-git-send-email-jack@suse.cz> <1225109512758-git-send-email-jack@suse.cz> <12251095122803-git-send-email-jack@suse.cz> <12251095124165-git-send-email-jack@suse.cz> <1225109513735-git-send-email-jack@suse.cz> <12251095131095-git-send-email-jack@suse.cz> <12251095133646-git-send-email-jack@suse.cz> <12251095133281-git-send-email-jack@suse.cz> <12251095131431-git-send-email-jack@suse.cz> <1225109513299-git-send-email-jack@suse.cz> <12251095133700-git-send-email-jack@suse.cz> <122510951372-git-send-email-jack@suse.cz> <1225109513200-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, Andrew Perepechko To: Jan Kara Return-path: Received: from e35.co.us.ibm.com ([32.97.110.153]:49130 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753387AbYJ2Alx (ORCPT ); Tue, 28 Oct 2008 20:41:53 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e35.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id m9T0fgxY017223 for ; Tue, 28 Oct 2008 18:41:42 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9T0fqZU146046 for ; Tue, 28 Oct 2008 18:41:52 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9T0fNSM022572 for ; Tue, 28 Oct 2008 18:41:23 -0600 In-Reply-To: <1225109513200-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: =E5=9C=A8 2008-10-27=E4=B8=80=E7=9A=84 13:11 +0100=EF=BC=8CJan Kara=E5=86= =99=E9=81=93=EF=BC=9A > Implement conversion functions for new version (version 1) of quota > format which supports 64-bit block and inode limits and 64-bit inode > usage. The original implementation has been written by Andrew Perepec= hko. >=20 > Signed-off-by: Andrew Perepechko > Signed-off-by: Jan Kara > --- > fs/quota_v2.c | 140 ++++++++++++++++++++++++++++++++++++++++++++-= ---------- > fs/quotaio_v2.h | 26 ++++++++-- > 2 files changed, 132 insertions(+), 34 deletions(-) >=20 > diff --git a/fs/quota_v2.c b/fs/quota_v2.c > index a371919..ac6668d 100644 > --- a/fs/quota_v2.c > +++ b/fs/quota_v2.c =2E.. > @@ -73,7 +90,13 @@ static int v2_read_file_info(struct super_block *s= b, int type) > struct mem_dqinfo *info =3D sb_dqinfo(sb, type); > struct qtree_mem_dqinfo *qinfo; > ssize_t size; > + int version =3D v2_check_quota_file_header(sb, type); >=20 > + if (version < 0) { > + printk(KERN_WARNING "Cannot identify quota file version on " > + "device %s: %d\n", sb->s_id, version); > + return -1; > + } > size =3D sb->s_op->quota_read(sb, type, (char *)&dinfo, > sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF); > if (size !=3D sizeof(struct v2_disk_dqinfo)) { > @@ -88,9 +111,14 @@ static int v2_read_file_info(struct super_block *= sb, int type) > return -1; > } > qinfo =3D info->dqi_priv; > - /* limits are stored as unsigned 32-bit data */ > - info->dqi_maxblimit =3D 0xffffffff; > - info->dqi_maxilimit =3D 0xffffffff; > + if (version =3D=3D 0) { > + /* limits are stored as unsigned 32-bit data */ > + info->dqi_maxblimit =3D 0xffffffff; > + info->dqi_maxilimit =3D 0xffffffff; > + } else { > + info->dqi_maxblimit =3D 0x7fffffffffffffff; > + info->dqi_maxilimit =3D 0x7fffffffffffffff; > + } I got some compile warning saying=20 fs/quota_v2.c: In function =E2=80=98v2_read_file_info=E2=80=99: fs/quota_v2.c:119: warning: integer constant is too large for =E2=80=98= long=E2=80=99 type fs/quota_v2.c:120: warning: integer constant is too large for =E2=80=98= long=E2=80=99 type qsize_t is defined as __u64, however... Mingming -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html