ubi: suspicious calculation in 'ubi_wl_get_peb'
dedekind1 at gmail.com
Thu Mar 8 06:00:20 EST 2012
On Wed, 2012-03-07 at 22:08 +0200, Shmulik Ladkani wrote:
> On Wed, 07 Mar 2012 19:20:08 +0200 Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> > On Fri, 2012-02-17 at 15:38 +0200, Shmulik Ladkani wrote:
> > > - e = find_wl_entry(&ubi->free, medium_ec);
> > > + e = find_wl_entry(&ubi->free, WL_FREE_MAX_DIFF/2)
> > >
> > > Did I get something wrong?
> > Yeah, I think you are right. Now I am completely convinced we should
> > remove this "short/long-term" stuff because this did even work
> > correctly :-)
> I would not jump into this conclusion just yet :-)
> Note the bug affects UBI_UNKNOWN requests, which are supposed to be
> general-purpose 'ubi_wl_get_peb' requests... troubling...
> UBI_LONGTERM/UBI_SHORTTERM seem to work just fine.
UBI_UNKNOWN is used most of the time. And long/short are kind of
optimizations. UBIFS uses them but these are more like guesses and UBIFS
my tell the LEB is short term but it may easily be long term. And this
is not much of an optimization.
More information about the linux-mtd