From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 2/9] sector_t format string Date: Wed, 9 Aug 2006 23:40:19 -0700 Message-ID: <20060809234019.c8a730e3.akpm@osdl.org> References: <1155172843.3161.81.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, ext2-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Return-path: To: cmm@us.ibm.com In-Reply-To: <1155172843.3161.81.camel@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ext2-devel-bounces@lists.sourceforge.net Errors-To: ext2-devel-bounces@lists.sourceforge.net List-Id: linux-fsdevel.vger.kernel.org On Wed, 09 Aug 2006 18:20:43 -0700 Mingming Cao wrote: > > Define SECTOR_FMT to print sector_t in proper format > > ... > > #define HAVE_SECTOR_T > typedef u64 sector_t; > +#define SECTOR_FMT "%llu" We've thus-far avoided doing this. In fact a similar construct in device-mapper was recently removed. Unlike many other attempts, this one appears to be correct (people usually get powerpc wrong, due to its u64=unsigned long). That being said, I'm not really sure we want to add this. It produces rather nasty-looking source code and thus far we've just used %llu and we've typecasted the sector_t to `unsigned long long'. That happens in a lot of places in the kernel and perhaps we don't want to start innovating in ext4 ;) That also being said... does a 32-bit sector_t make any sense on a 48-bit-blocknumber filesystem? I'd have thought that we'd just make ext4 depend on 64-bit sector_t and be done with it. Consequently, sector_t should largely vanish from ext4 and JBD2, except for those places where it interfaces with the VFS and the block layer. Internally it should just use 64-bit quantities. That could be u64, but I'd suggest that the fs simply open-code `unsigned long long' so that we don't need to play any gams at all when passing these things into printk. Finally, perhaps the code is printing block numbers too much ;) I'd suggest that "[patch] ext3: remove E3FSBLK" be written and merged before we clone ext4, too... ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642