[RFC] [PATCH] [MTD] Update internal API to support 64-bit device size

Artem Bityutskiy dedekind at infradead.org
Fri Nov 14 07:05:06 EST 2008

On Thu, 2008-11-06 at 15:16 +0200, Adrian Hunter wrote:
> MTD internal API presently uses 32-bit values to represent
> device size.  This patch updates them to 64-bits but leaves
> the external API unchanged.  Extending the external API
> is a separate issue for several reasons.  First, no one
> needs it at the moment.  Secondly, whether the implementation
> is done with IOCTLs, sysfs or both is still debated.  Thirdly
> external API changes require the internal API to be accepted
> first.
> Note that although the MTD API will be able to support 64-bit
> device sizes, existing drivers do not and are not required
> to do so, although NAND base has been updated.
> In general, changing from 32-bit to 64-bit values cause little
> or no changes to the majority of the code with the following
> exceptions:
> 	- printk message formats
> 	- division and modulus of 64-bit values
> 	- NAND base support
> 	- 32-bit local variables used by mtdpart and mtdconcat
> 	- naughtily assuming one structure maps to another
> 	in MEMERASE ioctl
> Signed-off-by: Adrian Hunter <ext-adrian.hunter at nokia.com>

Except of the minor issues (well, this is _RFC_), I support this patch.
I think it is a very good step towards 64-bit MTD support.

David, could you please look at this rather earlier than later, so we
would have time to fix and test this, because the patch touches
(slightly though) a lot of files.

I've included this and other nandsim patches to ubifs-2.6.git so that we
would test the patch more.

Adrian ran UBIFS on 8GiB nandsim device (backed to a file) and it works

Best regards,
Artem Bityutskiy (Битюцкий Артём)

More information about the linux-mtd mailing list