[RFC] Support for > 2Gib MTD

Bruce_Leonard at selinc.com Bruce_Leonard at selinc.com
Thu Oct 9 14:49:17 EDT 2008


Hi Artem,

Sorry for the lateness of this, had a couple of fires to put out in 
manufacturing this week :).

Artem Bityutskiy <dedekind at infradead.org> wrote on 10/05/2008 10:24:48 PM:

> Hi,
> 
> On Fri, 2008-10-03 at 13:36 -0700, Bruce_Leonard at selinc.com wrote:
> > Here's a rough idea of what I'm thinking.  In 
.../include/mtd/mtd-abi.h 
> > add new 64 bit structs like this:
> > 
> > +struct erase_info_user_64 {
> > +       uint64_t start;
> > +       uint64_t length;
> > +}
> > 
> > +struct mtd_info_user_64 {
> > +       ...
> > +       uint32_t flags;
> > +       uint64_t size;
> > +       ...
> > +}
> > 
> > These new structs would be identical to the old ones execept for the 
types 
> > on a few fields.
> 
> Please, add something like
> uint8_t padding[128]; /* Reserved for future, should be zeroed */
> to the new data structures.
>

Is this for future expandibility?
 
> >   To indicate that the new 64 bit interface is to be used 
> > I would introduce a new flag for 'struct mtd_info_user_XX->flags', 
> > something like this:
> > 
> > #define MTD_LARGE_SIZE 0x4000
> 
> No need for this. Because you'll change size of data structures and
> their layout, this is not going to be compatible anyway.
> 

How then would you indicate to user space that they need to use the new 
64-bit structures and IOCTLs?  How does using another bit in an existing 
'flags' field of a structure change the size and layout of the structure?

Bruce



More information about the linux-mtd mailing list