Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Kevin Paul Herbert <kevin.herbert@meraki.net>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Request for comments: UBI PEBs as a multiple of erase size
Date: Mon, 19 Sep 2011 07:55:11 +0300	[thread overview]
Message-ID: <1316408116.24366.51.camel@sauron> (raw)
In-Reply-To: <40BCDFDF-F9C8-46C5-99F8-E56050E8B32C@meraki.net>

On Tue, 2011-09-13 at 12:36 -0700, Kevin Paul Herbert wrote:
> I came across a situation where I wanted to be able to use the same
> pre-built (with UBI) image on two different FLASH devices, one of
> which having a larger erase size than the other. I actually did not
> notice that the device I was using had a different erase size, which
> caused UBI to quietly corrupt my FLASH.
> 
> I have a patch to UBI (kernel and ubinize) to store the size of a PEB
> in the EC header, reject attaching if the PEB size is not equal to or
> an integer multiple of the erase size, and treat multiple erase blocks
> as a "cluster" for I/O operations.
> 
> I looked through a few months of archives to see if this is a common
> problem, and I don't see this as being discussed. Is there interest in
> me publishing this patch for inclusion in the kernel. The only
> downside I can see of my change is that it adds an additional 32 bit
> quantity to struct ubi_ec_hdr, reducing the available free header
> byets from 35 to 31. For backwards compatibility, if this field is
> zero, I treat it as PEB size == erase size.
> 
> It seems to me that having the PEB size in the header, regardless of
> supporting multiple erase blocks as a single PEB, is a useful
> consistency check.
> 
> Comments please?

I think we do have this kind of "protection" in UBIFS, but non in UBI.
Please, go ahead and send patches!

-- 
Best Regards,
Artem Bityutskiy

      parent reply	other threads:[~2011-09-19  4:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 19:36 Request for comments: UBI PEBs as a multiple of erase size Kevin Paul Herbert
2011-09-14  5:21 ` [Resent with proper line wrap] " Kevin Paul Herbert
2012-03-09 13:41   ` Artem Bityutskiy
2011-09-14 12:01 ` Atlant Schmidt
2011-09-19  4:55 ` Artem Bityutskiy [this message]

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=1316408116.24366.51.camel@sauron \
    --to=dedekind1@gmail.com \
    --cc=kevin.herbert@meraki.net \
    --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