From: Matthew Wilcox Subject: Re: 32/64 bit b_rsector type Date: Wed, 24 Mar 2004 12:17:13 +0000 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040324121713.GG25059@parcelfarce.linux.theplanet.co.uk> References: <40612C6D.6030205@shaolinmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:16359 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S263304AbUCXMRp (ORCPT ); Wed, 24 Mar 2004 07:17:45 -0500 To: David Chow Content-Disposition: inline In-Reply-To: <40612C6D.6030205@shaolinmicro.com> List-Id: linux-fsdevel.vger.kernel.org On Wed, Mar 24, 2004 at 02:36:29PM +0800, David Chow wrote: > On a native 32-bit Linux system, the bh->b_resetor (type unsigned long) > max is limited to 16TB. For 64 bit systems, I know it can get through > this point, but what about if I chanage the bh->b_rsector in fs.h to u64 > (unsigned long long on 32-bit systems)? Can I simply break through the > 16TB on 32-bit Linux by doing so? Please advice with possiblility of > impacts. Thanks. The 16TB limit on a block device is due to the page cache -- 4k pages * 4GB of 'unsigned long index'. Linus has drawn a line in the sand on that one -- index is not going to be u64. The only other ways to go bigger than this are: - Use a 64-bit machine (duh ;-) - Stop using the page cache for blockdevs (not popular) - Steal some bits from elsewhere to increase the size The last one is probably best exemplified by pgcl. That increases the page size so you can have, say, 16k * 4GB which would get you to a 64GB blockdev limit, or 64k * 4GB limiting you to 256GB. -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain