All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: dedekind@infradead.org
Cc: MTDML <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] UBI: introduce sequential counter
Date: Fri, 09 Feb 2007 07:12:09 -0600	[thread overview]
Message-ID: <1171026729.4884.177.camel@zod.rchland.ibm.com> (raw)
In-Reply-To: <1171012339.10670.33.camel@sauron>

On Fri, 2007-02-09 at 11:12 +0200, Artem Bityutskiy wrote:
> Hello Josh,
> 
> On Thu, 2007-02-08 at 16:16 -0600, Josh Boyer wrote:
> > Do image creation tools now how to understand how to increment the
> > counter for each block in a binary image that would be flashed onto the
> > card raw?  Or do you leave the counter in all the VID headers as 0 for
> > such images?
> 
> They don't and they should be updated. But yes, they write zeroes to the
> sqnum and UBI is happy.

If writing zeroes to the field for all LEBs is valid, then I don't think
the tools need updating.  At least not the image creation tools.  We've
already declared the padding fields to be zero filled.

The unubi tool will need updating though.

> Here is an example:
> 
> I know the number of PEBs on the media N and I may introduce an
> empirical criteria of oldness M = F(N). For example, M=kN, k is a
> natural number. Its a subject for an investigation.
> 
> I know the highest sqnum (= the current global sequence counter) H, and
> any LEB with sqnum=S is treated it as old if S < H-M, and as "fresh"
> otherwise.
> 
> When I move a PEB with low EC, and I need to pick the target PEB (T),
> where I move the data to. I pick T with the highest EC if the data is
> old, and I pick T with an average EC if the data is fresh.

If you replace "old" with "stale" I agree.  My stupid english thinking
brain equates "old" with the passage of time, and that isn't what sqnum
is tracking.  It is valid to use stale though.

> > >  	ubi32_t data_crc;
> > > -	uint8_t padding1[24];
> > > +	uint8_t padding1[4];
> > > +	ubi64_t sqnum;
> > > +	uint8_t padding2[12];
> > 
> > Can't you add the field at the bottom before hdr_crc so you don't have
> > split padding like that?
> 
> No, it is 64-bit and I want it to be aligned.

Ah, aligned within on a 64-bit boundary... I see.  Looks odd, but ok.

josh

  reply	other threads:[~2007-02-09 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 20:02 [PATCH] UBI: introduce sequential counter Artem Bityutskiy
2007-02-08 22:16 ` Josh Boyer
2007-02-09  5:50   ` Jörn Engel
2007-02-09  9:19     ` Artem Bityutskiy
2007-02-09  9:12   ` Artem Bityutskiy
2007-02-09 13:12     ` Josh Boyer [this message]
2007-02-09 14:40       ` Artem Bityutskiy
2007-02-09 14:50         ` Josh Boyer
2007-02-09 14:54           ` Artem Bityutskiy
2007-02-13 15:11         ` Frank Haverkamp
2007-02-13 15:40           ` Artem Bityutskiy

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=1171026729.4884.177.camel@zod.rchland.ibm.com \
    --to=jwboyer@linux.vnet.ibm.com \
    --cc=dedekind@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.