public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Todd Poynor <tpoynor@mvista.com>
To: Vitaly Wool <vwool@ru.mvista.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd/utils: sync with MTD ioctl interface rework to get rid of MEMGETOOBSEL/MEMSETOOBSEL
Date: Mon, 12 Dec 2005 16:02:33 -0800	[thread overview]
Message-ID: <439E0F99.8090008@mvista.com> (raw)
In-Reply-To: <4393D42C.9040303@ru.mvista.com>

Vitaly Wool wrote:
> Todd Poynor wrote:
...
>>>          if (writeoob) {
>>>              /* Read OOB data from input file, exit on failure */
>>> -            if ((cnt = read(ifd, oobreadbuf, meminfo.oobsize)) != 
>>> meminfo.oobsize) {
>>> +            if ((cnt = read(ifd, oobreadbuf, oobavail)) != oobavail) {
>>
>>
>> This requires the input file to be tailored to the oobavail of a 
>> specific destination device, reducing the benefit of autoplacement.  
>> It may be best to continue to pad input files oob data to the full 
>> oobsize, much like the data portion is handled.
> 
> Well, padding doesn't work in nandwrite if the image to be written 
> contains OOB data. The idea as I see it is if you are trying to write 
> the image with OOB data, you should know what you're doing, and that 
> implies knowledge of the oobavail size.
> On the other hand, it might be useful to implement an option for 
> nandwrite which specifies what OOB data length user supposes (default 
> will be the oobavail).

In order to make it work as above, we'd need a way for users to find out 
what oobavail their mtd driver uses (in dmesg and/or a util), and an 
option on all the fs utils to write that number of bytes.  A file format 
that specifies what data and OOB size have been generated would do the 
trick, if we want to get that fancy about it.  Just filling out all 16 
or 64 bytes in the input file and truncating to oobavail at nandwrite 
time seems a lower-cost workaround.


-- 
Todd

  reply	other threads:[~2005-12-13  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-02  7:05 [PATCH] mtd/utils: sync with MTD ioctl interface rework to get rid of MEMGETOOBSEL/MEMSETOOBSEL Vitaly Wool
2005-12-02 22:06 ` Todd Poynor
2005-12-05  5:46   ` Vitaly Wool
2005-12-13  0:02     ` Todd Poynor [this message]
2005-12-13  0:20       ` Thomas Gleixner
2005-12-06 10:30 ` Thomas Gleixner
2005-12-06 10:36   ` Vitaly Wool
2005-12-06 10:51     ` Thomas Gleixner

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=439E0F99.8090008@mvista.com \
    --to=tpoynor@mvista.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vwool@ru.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