mtd partitions limited to 4 GB?
jwboyer at gmail.com
Mon Jun 16 20:22:47 EDT 2008
On Mon, 16 Jun 2008 14:04:06 -1000
Mitch Bradley <wmb at firmworks.com> wrote:
> In drivers/mtd/mtdpart.c, struct mtd_part has "u_int32_t offset", thus
> (apparently) limiting the partition start offset to 4 GiB. Similarly,
> struct mtd_partition in include/linux/mtd/partititions.h has "u_int32_t
> size" and "u_int32_offset".
This is not limited to partitions. The entire MTD subsystem is limited
to 4 GiB sized devices.
> Now that NAND FLASH device sizes have exceeded that, this appears to be
> a significant limitation.
> Is anyone in the mtd community already addressing this?
There have been some that have offered to help in recent weeks. A
brainstorming session of sorts happened on the list a couple of weeks
ago. You might check there for what was decided.
> Fixing the core infrastructure might be as simple as using "loff_t"
> instead of "u_int32_t" for those fields. However, all of the existing
> partition map parsers appear to have the same 32-bit limitation, so
> partitioning a >4GiB device will require a new or modified partition map
IIRC, one of the outcomes of the discussion was to introduce a new
interface so that chips are addressed in block+offset mappings. This
will be better overall, but requires a bit more overhead in the initial
More information about the linux-mtd