From: Jan Kara Subject: Re: [RFC] quota: 64-bit limits with vfs, updated Date: Mon, 17 Mar 2008 15:51:14 +0100 Message-ID: <20080317145114.GG17307@duck.suse.cz> References: <200803061641.12274.andrew.perepechko@sun.com> <200803152158.07398.andrew.perepechko@sun.com> <20080315224726.GU3542@webber.adilger.int> <0JXS005BBU0ZQO00@mail-amer.sun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andreas Dilger , linux-fsdevel@vger.kernel.org, Johann Lombardi , Zhiyong Landen tian , Alex Lyashkov To: Andrew Perepechko Return-path: Received: from styx.suse.cz ([82.119.242.94]:45652 "EHLO duck.suse.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750870AbYCQOvS (ORCPT ); Mon, 17 Mar 2008 10:51:18 -0400 Content-Disposition: inline In-Reply-To: <0JXS005BBU0ZQO00@mail-amer.sun.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, On Sun 16-03-08 04:14:58, Andrew Perepechko wrote: > > > struct mem_dqblk { > > > - __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ > > > - __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ > > > + qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ > > > + qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */ > > > qsize_t dqb_curspace; /* current used space */ > > > - __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ > > > - __u32 dqb_isoftlimit; /* preferred inode limit */ > > > - __u32 dqb_curinodes; /* current # allocated inodes */ > > > + qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ > > > + qsize_t dqb_isoftlimit; /* preferred inode limit */ > > > + qsize_t dqb_curinodes; /* current # allocated inodes */ > > > time_t dqb_btime; /* time limit for excessive disk use */ > > > time_t dqb_itime; /* time limit for excessive inode use */ > > > }; > > > > Is there a reason to use "qsize_t" instead of just using __u64 directly? > > > > Well, I'm not sure if there's a special meaning for qsize_t. I have only followed > the dqb_curspace convention, which is of qsize_t type. While I see no > special usage for qsize_t (well, it looks more nice than __u64 :), I at the same time > see no problems using qsize_t. Maybe Jan will tell us more about qsize_t. Well, when designing these structures originally, I wanted to have one clear type for holding quota space information and so I introduced qsize_t. Speaking about it, logically we should have a similar type for "number of inodes" (something like qcount_t) because there is no logical connection between number of inodes and space... But I don't really care much. Honza -- Jan Kara SUSE Labs, CR