public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Tim Anderson" <tanderson@mvista.com>
Cc: 'David Woodhouse' <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	Bruce_Leonard@selinc.com, 'Bruce Leonard' <brucle@earthlink.net>
Subject: Re: [PATCH 2/2][MTD] Add support for > 2GiB MTD devices
Date: Tue, 26 Aug 2008 19:08:35 -0700	[thread overview]
Message-ID: <20080826190835.802cd676.akpm@linux-foundation.org> (raw)
In-Reply-To: <008601c907e5$e1bac9f0$9101320a@mvista.com>

On Tue, 26 Aug 2008 18:40:26 -0700 "Tim Anderson" <tanderson@mvista.com> wrote:

> > -----Original Message-----
> > From: linux-mtd-bounces@lists.infradead.org 
> > [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf Of 
> > Bruce_Leonard@selinc.com
> > Sent: Tuesday, August 26, 2008 6:21 PM
> > To: Andrew Morton
> > Cc: linux-mtd-bounces@lists.infradead.org; 
> > linux-mtd@lists.infradead.org; David Woodhouse; 
> > linux-kernel@vger.kernel.org; Bruce Leonard
> > Subject: Re: [PATCH 2/2][MTD] Add support for > 2GiB MTD devices
> > 
> > linux-mtd-bounces@lists.infradead.org wrote on 08/26/2008 04:55:36 PM:
> > 
> > > On Thu, 21 Aug 2008 19:00:55 -0700 (GMT-07:00)
> > > Bruce Leonard <brucle@earthlink.net> wrote:
> > > 
> > > > --- a/include/mtd/mtd-abi.h
> > > > +++ b/include/mtd/mtd-abi.h
> > > > @@ -6,7 +6,7 @@
> > > >  #define __MTD_ABI_H__
> > > > 
> > > >  struct erase_info_user {
> > > > -   uint32_t start;
> > > > +   uint64_t start;
> > > >     uint32_t length;
> > > >  };
> > > > 
> > > > @@ -50,7 +50,7 @@ struct mtd_oob_buf {
> > > >  struct mtd_info_user {
> > > >     uint8_t type;
> > > >     uint32_t flags;
> > > > -   uint32_t size;    // Total size of the MTD
> > > > +   uint64_t size;    // Total size of the MTD
> > > >     uint32_t erasesize;
> > > >     uint32_t writesize;
> > > >     uint32_t oobsize;   // Amount of OOB data per block (e.g. 16)
> > > 
> > > This changes the kernel<->userspace ABI and is hence a big no-no.  I
> > > assume that this change will cause old userspace to 
> > malfunction on new
> > > kernels, and vice versa.
> > > 
> > 
> > Well, in my posting I noted that the mtd-utils were broken 
> > because of this 
> > but I didn't really have any idea as to how to fix things.  I 
> > can see why 
> > it would be a big no-no to change this.  Do you have any 
> > suggestions on 
> > what I could do differently to prevent making that change?
> > 
> > > Supporting >2Gb MTD devices sounds useful (I'm surprised 
> > that we don't
> > > already do so).
> > > 
> > 
> > There was a LOT of interest in this over the last few months 
> > while I was 
> > working on it, but a very suprising silence has developed 
> > since I posted 
> > the patches.  I guess I'm more cutting edge than I thought :).
> > 

(top-posting repaired.  Please don't.)

> Bruce,
> 
> Since you don't want to change the ABI you need to extend it. Andrew, should
> he add an new ioctl that passes a new structure definition? That way the
> original code works and you have to do a new ioctl to get the new size data.
> 

Yes, I expect that a new ioctl would be best.  Sometimes it is possible
to extend an existing one (and its associated payload) but that
requires versioning info which usually wasn't thought of on day one.

But David's the man.

  reply	other threads:[~2008-08-27  2:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <25387440.1219370455174.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net>
2008-08-26 23:55 ` [PATCH 2/2][MTD] Add support for > 2GiB MTD devices Andrew Morton
2008-08-27  1:21   ` Bruce_Leonard
2008-08-27  1:40     ` Tim Anderson
2008-08-27  2:08       ` Andrew Morton [this message]
2008-08-27  2:42       ` Bruce_Leonard
2008-08-27  5:56     ` Artem Bityutskiy
2008-08-27  6:01     ` Tim Anderson
2008-08-27  6:03       ` Artem Bityutskiy
2008-08-27  6:20         ` Tim Anderson
2008-08-27  6:35           ` David Woodhouse
2008-08-27  6:49             ` Ricard Wanderlof
2008-08-27  7:08               ` Artem Bityutskiy
2008-08-27  7:10               ` Bruce Leonard
2008-08-27  6:38           ` Artem Bityutskiy
2008-08-27  8:39           ` Alan Cox
2008-08-27  9:01             ` David Woodhouse
2008-08-27 14:34               ` Jörn Engel
2008-08-27 14:47                 ` Artem Bityutskiy
2008-08-27 15:25                   ` Jörn Engel
2008-08-29  5:48                     ` Artem Bityutskiy
2008-08-29 10:23                       ` Jörn Engel
2008-08-29 12:19                     ` David Woodhouse
2008-08-27 19:44                   ` Trent Piepho

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=20080826190835.802cd676.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Bruce_Leonard@selinc.com \
    --cc=brucle@earthlink.net \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tanderson@mvista.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox