linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel Bowen" <dbowen@logitech.com>
To: "'Brian Norris'" <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: RE: Question about ubiformat
Date: Fri, 8 Aug 2014 09:10:44 -0600	[thread overview]
Message-ID: <1b4901cfb31a$ee57b240$cb0716c0$@com> (raw)
In-Reply-To: <20140808061936.GA3246@norris-Latitude-E6410>

Great, thanks for the response!  So, if the mtd partition were say 500 erase
blocks large, and the image was 300 erase blocks large, would "ubiformat
/dev/mtd4 -f /mnt/source/ubi.img" 
1. only touch the first 300 blocks of the partition, and leave the other 200
unmodified?  Or 
2. would it write the image into the first 300 blocks, and erase the
remaining 200 blocks?

Thanks!
-Daniel

-----Original Message-----
From: Brian Norris [mailto:computersforpeace@gmail.com] 
Sent: Friday, August 08, 2014 12:20 AM
To: Daniel Bowen
Cc: linux-mtd@lists.infradead.org
Subject: Re: Question about ubiformat

Hi Daniel,

On Thu, Aug 07, 2014 at 06:06:27PM -0600, Daniel Bowen wrote:
> Let's say that I've prepared an image using mkfs.ubifs and ubinize.  Is
> there any advantage, disadvantage or difference to doing ubiformat twice -
> once without specifying an image file, then running it a second time with
an
> image file?  In other words, is there a difference between these two
> sequences:
> 
> ubiformat /dev/mtd4
> ubiformat /dev/mtd4 -f /mnt/source/ubi.img
> 
> and
> 
> ubiformat /dev/mtd4 -f /mnt/source/ubi.img

ubiformat always saves erase counters, so running it twice should not be
extra-destructive. The primary effect is that you will put the whole
device through an extra erase cycle unnecessarily (slightly reducing the
flash's lifetime), because ubiformat.c's format() function loops through
all eraseblocks and erases them.

But I think either sequence should have the same functional result.

Brian

  reply	other threads:[~2014-08-08 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08  0:06 Question about ubiformat Daniel Bowen
2014-08-08  6:19 ` Brian Norris
2014-08-08 15:10   ` Daniel Bowen [this message]
2014-08-08 16:27     ` Brian Norris
2014-08-08 16:34       ` Artem Bityutskiy
2014-08-08 16:55         ` Daniel Bowen

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='1b4901cfb31a$ee57b240$cb0716c0$@com' \
    --to=dbowen@logitech.com \
    --cc=computersforpeace@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).