public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Tim Anderson" <tanderson@mvista.com>
To: <Bruce_Leonard@selinc.com>,
	"'Andrew Morton'" <akpm@linux-foundation.org>
Cc: linux-mtd-bounces@lists.infradead.org,
	'David Woodhouse' <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	'Bruce Leonard' <brucle@earthlink.net>
Subject: RE: [PATCH 2/2][MTD] Add support for > 2GiB MTD devices
Date: Tue, 26 Aug 2008 23:01:08 -0700	[thread overview]
Message-ID: <000101c9080a$4ec3a6b0$6b01a8c0@mvista.com> (raw)
In-Reply-To: <OF7C027ED9.D9F1F324-ON882574B2.0007025B-882574B2.000767B6@selinc.com>

Bruce,

I have been experimenting with this. I think there is at least 3 maybe 4
IOCTLS that are going to need to have a LARGE mode. The 2 most obvious are
MEMGETINFO and MEMERASE. I was starting to code something up that passes the
size as blocks as opposed to bytes. That may be more consistent with UBI. I am
doing a little experimenting if you want some help there. In any case, it can
be done where the old utility can work (for 2GB and less size devices) and a
new call not supported by the kernel will let the utility try the new
interface and revert to the old if the kernel does not support block mode
interfaces.

Then we can either re-use the existing structures passed through another
ioctl, changing the definition of START and SIZE to be blocks or define new
erase_info_user and mtd_info_user structures for the large call.

David, would you thing re-using the same structure would be to obscure?

I have started looking at a MEMGETLINFO defining size as blocks instead of
bytes.


> -----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 :).
> 
> > Please cc linux-mtd@lists.infradead.org (at least) on MTD-related
> > patches, thanks.
> 
> I started with the MTD list and then also posted to lkml when 
> I realized I 
> had forgotten to CC it.
> 
> Thanks.
> 
> Bruce
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

  parent reply	other threads:[~2008-08-27  6:01 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
2008-08-27  2:42       ` Bruce_Leonard
2008-08-27  5:56     ` Artem Bityutskiy
2008-08-27  6:01     ` Tim Anderson [this message]
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='000101c9080a$4ec3a6b0$6b01a8c0@mvista.com' \
    --to=tanderson@mvista.com \
    --cc=Bruce_Leonard@selinc.com \
    --cc=akpm@linux-foundation.org \
    --cc=brucle@earthlink.net \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd-bounces@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /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