Re: [PATCH] remove 2TB block device limit

Neil Brown (neilb@cse.unsw.edu.au)
Fri, 10 May 2002 13:53:45 +1000 (EST)


On Friday May 10, peter@chubb.wattle.id.au 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.
>

Thanks.
MD part looks sane to me. However I would rather the

+#ifdef CONFIG_LFS
+#include <asm/div64.h>
+#else
+#undef do_div
+#define do_div(n, b)({ int _res; _res = (n) % (b); (n) /= (b); _res;})
+#endif
+

part went in linux/raid/md_k.h and defined "sector_div" (or similar)
as either do_div or ({ int _res; _res = (n) % (b); (n) /= (b); _res;})
as appropriate.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/