public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: linux-mtd@lists.infradead.org, Richard Weinberger <rw@linutronix.de>
Subject: Re: ubi: suspicious calculation in 'ubi_wl_get_peb'
Date: Thu, 08 Mar 2012 13:00:20 +0200	[thread overview]
Message-ID: <1331204420.7257.3.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <20120307220803.045816fc@halley>

On Wed, 2012-03-07 at 22:08 +0200, Shmulik Ladkani wrote:
> On Wed, 07 Mar 2012 19:20:08 +0200 Artem Bityutskiy <dedekind1@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.

-- 
Best Regards,
Artem Bityutskiy

  reply	other threads:[~2012-03-08 10:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 13:38 ubi: suspicious calculation in 'ubi_wl_get_peb' Shmulik Ladkani
2012-03-07 17:20 ` Artem Bityutskiy
2012-03-07 17:31   ` Artem Bityutskiy
2012-03-07 20:08   ` Shmulik Ladkani
2012-03-08 11:00     ` Artem Bityutskiy [this message]
2012-03-07 20:26   ` Shmulik Ladkani
2012-03-07 20:43   ` Shmulik Ladkani

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=1331204420.7257.3.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rw@linutronix.de \
    --cc=shmulik.ladkani@gmail.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