From: Andrew Morton <akpm@zip.com.au>
To: Peter Chubb <peter@chubb.wattle.id.au>
Cc: linux-kernel@vger.kernel.org, martin@dalecki.de, neilb@cse.unsw.edu.au
Subject: Re: [PATCH] remove 2TB block device limit
Date: Thu, 09 May 2002 21:05:37 -0700 [thread overview]
Message-ID: <3CDB4711.1A4FFDAC@zip.com.au> (raw)
In-Reply-To: <15579.16423.930012.986750@wombat.chubb.wattle.id.au>
Peter Chubb wrote:
>
> Hi,
> At present, linux is limited to 2TB filesystems even on 64-bit
> systems, because there are various places where the block offset on
> disc are assigned to unsigned or int 32-bit variables.
>
> There's a type, sector_t, that's meant to hold offsets in sectors and
> blocks. It's not used consistently (yet).
>
> The patch at
> http://www.gelato.unsw.edu.au/patches/2.5.14-largefile-patch
>
> ...
>
> As this touches lots of places -- the generic block layer (Andrew?)
> the IDE code (Martin?) and RAID (Neil?) and minor changes to the scsi
> I've CCd a few people directly.
That would be more Jens and aviro than I.
My vote would be: just merge the sucker while it still (almost)
applies. 2TB is a showstopper for some people in 2.4 today. Obviously
2.6 will need 64-bit block numbers.
The next obstacle will be page cache indices into the blockdev mapping.
That's either an 8TB or 16TB limit, depending on signedness correctness.
One minor point - it is currently not possible to print sector_t's.
This code:
printk("%lu%s", some_sector, some_string);
will work fine with 32-bit sector_t. But with 64-bit sector_t it
will generate a warning at compile-time and an oops at runtime.
The same problem applies to dma_addr_t. Jeff, davem and I kicked
that around a while back and ended up deciding that although there
are a number of high-tech solutions, the dumb one was best:
--- 2.5.14/include/linux/types.h~sector_t-printing Thu May 9 17:08:13 2002
+++ 2.5.14-akpm/include/linux/types.h Thu May 9 17:08:13 2002
@@ -120,8 +120,10 @@ typedef __s64 int64_t;
#ifdef BLK_64BIT_SECTOR
typedef u64 sector_t;
+#define FMT_SECTOR_T "%Lu"
#else
typedef unsigned long sector_t;
+#define FMT_SECTOR_T "%lu"
#endif
#endif /* __KERNEL_STRICT_NAMES */
--- 2.5.14/fs/buffer.c~sector_t-printing Thu May 9 17:08:13 2002
+++ 2.5.14-akpm/fs/buffer.c Thu May 9 17:09:35 2002
@@ -179,7 +179,8 @@ __clear_page_buffers(struct page *page)
static void buffer_io_error(struct buffer_head *bh)
{
- printk(KERN_ERR "Buffer I/O error on device %s, logical block %ld\n",
+ printk(KERN_ERR "Buffer I/O error on device %s,"
+ " logical block " FMT_SECTOR_T "\n",
bdevname(bh->b_bdev), bh->b_blocknr);
}
next prev parent reply other threads:[~2002-05-10 4:02 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-10 3:36 [PATCH] remove 2TB block device limit Peter Chubb
2002-05-10 4:05 ` Andrew Morton [this message]
2002-05-10 8:43 ` Anton Altaparmakov
2002-05-10 9:04 ` Andrew Morton
2002-05-16 19:08 ` Daniel Phillips
2002-05-10 9:05 ` Jens Axboe
2002-05-10 9:53 ` Peter Chubb
2002-05-10 10:01 ` Jens Axboe
2002-05-10 11:43 ` Anton Altaparmakov
2002-05-10 4:51 ` Martin Dalecki
[not found] ` <20020510084713.43ce396e.jeremy@kerneltrap.org>
2002-05-10 19:12 ` Peter Chubb
2002-05-10 23:46 ` Andreas Dilger
2002-05-11 0:07 ` David Mosberger
2002-05-15 22:17 ` Andreas Dilger
2002-05-16 20:22 ` Daniel Phillips
2002-05-16 22:54 ` Andreas Dilger
2002-05-17 1:17 ` Daniel Phillips
2002-05-11 4:40 ` Peter Chubb
2002-05-15 13:49 ` Pavel Machek
2002-05-11 18:13 ` Padraig Brady
-- strict thread matches above, loose matches on Subject: below --
2002-05-10 3:53 Neil Brown
[not found] <1060250300@toto.iv>
2002-05-13 10:28 ` Peter Chubb
2002-05-13 12:13 ` Christoph Hellwig
2002-05-14 0:30 ` Peter Chubb
2002-05-14 1:36 ` Anton Altaparmakov
2002-05-16 20:32 ` Daniel Phillips
2002-05-14 2:09 ` Andrew Morton
2002-05-14 2:58 ` Peter Chubb
2002-05-14 7:22 ` Christoph Hellwig
2002-05-14 7:21 ` Christoph Hellwig
2002-05-15 9:41 Hirotaka Sasaki
2002-05-15 21:49 ` Steve Lord
[not found] <581856778@toto.iv>
2002-05-17 0:04 ` Peter Chubb
2002-05-17 0:18 ` Daniel Phillips
2002-05-17 13:32 ` Jesse Pollard
2002-05-17 18:02 ` Daniel Phillips
2002-05-17 18:26 ` Jesse Pollard
2002-05-17 18:36 ` Andreas Dilger
2002-05-17 19:52 ` Daniel Phillips
2002-05-17 20:25 ` Andrew Morton
2002-05-17 15:26 ` Jason L Tibbitts III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CDB4711.1A4FFDAC@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=martin@dalecki.de \
--cc=neilb@cse.unsw.edu.au \
--cc=peter@chubb.wattle.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.