From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
To: Radoslaw Bisewski <radbis@googlemail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: JFFS2 appears to "freeze" during erase
Date: Thu, 21 Sep 2006 13:17:52 +0200 [thread overview]
Message-ID: <451274E0.6090602@transmode.se> (raw)
In-Reply-To: <ee47688c0609210125vf796aa2qb2817c4e77c42417@mail.gmail.com>
Radoslaw Bisewski wrote:
> This bug is caused by the use of erase_free_sem semaphore. Block erasing
> function jffs2_erase_block is called with erase_free_sem locked, i.e.
> erase_free_sem will be locked for the time needed to erase flash block (
> ~1 s for typical NOR chip), in the worst scenario access to file system
> may be blocked for a numer of seconds when the number of blocks is being
> erased. Workaround for this bug is simple - erase_free_sem cannot be
> locked when jffs2_erase_block function is called. See attached patch.
>
Me again
I think there is a bug in jffs2_erase_pending_blocks() after applying your patch:
spin_unlock(&c->erase_completion_lock);
done:
D1(printk(KERN_DEBUG "jffs2_erase_pending_blocks completed\n"));
up(&c->erase_free_sem);
the up(&c->erase_free_sem); needs to move to before done:
Jocke
next prev parent reply other threads:[~2006-09-21 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-20 9:30 JFFS2 appears to "freeze" during erase Joakim Tjernlund
[not found] ` <ee47688c0609210125vf796aa2qb2817c4e77c42417@mail.gmail.com>
2006-09-21 11:17 ` Joakim Tjernlund [this message]
2006-09-21 12:05 ` Josh Boyer
[not found] <F6AD7E21CDF4E145A44F61F43EE6D9399B4CB1@tmnt04.transmode.se>
2006-10-02 13:40 ` Radoslaw Bisewski
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=451274E0.6090602@transmode.se \
--to=joakim.tjernlund@transmode.se \
--cc=linux-mtd@lists.infradead.org \
--cc=radbis@googlemail.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 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.