From: David Woodhouse <dwmw2@infradead.org>
To: Roberts Nathan-mcg31137 <Nathan.Roberts@motorola.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: JFFS2 deadlock with alloc_sem
Date: Sat, 05 May 2007 09:23:36 +0100 [thread overview]
Message-ID: <1178353416.11851.17.camel@pmac.infradead.org> (raw)
In-Reply-To: <F0A7A3D5461CB54F878D218854074FCE01F7425F@de01exm63.ds.mot.com>
On Mon, 2007-04-30 at 15:41 -0400, Roberts Nathan-mcg31137 wrote:
> [<c006141c>] (__lock_page+0x0/0x98) from [<c006301c>] (read_cache_page+0x21c/0x324)
> r5 = 00000000 r4 = C0336FE0
> [<c0062e00>] (read_cache_page+0x0/0x324) from [<c00df8f8>] (jffs2_gc_fetch_page+0x2c/0x64)
> [<c00df8cc>] (jffs2_gc_fetch_page+0x0/0x64) from [<c00dc664>] (jffs2_garbage_collect_pass+0x14a4/0x1c28)
> NOTE3: jffs2_gc_fetch_page() attempts to get page_lock
This bit confuses me.
In jffs2_commit_write() we deliberately mark the page up to date, in
order to avoid this situation -- if the page is up to date,
read_cache_page() won't attempt to lock it.
(Note that we only set it up to date manually there if we're writing the
whole page. If we're writing less than a whole page, then
jffs2_prepare_write() will have read it and marked it up to date anyway.
So it's possible that read_cache_page() will try to lock a page when
called from jffs2_gc_fetch_page() -- but it _shouldn't_ be a page which
is already locked for writing. It should be a _different_ page.
Can you add a WARN_ON(!PageUptodate(pg)) into jffs2_commit_write(), just
before the call to jffs2_write_inode_range(). And/or otherwise try to
check which page each one is locking?
--
dwmw2
next prev parent reply other threads:[~2007-05-05 8:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-30 19:41 JFFS2 deadlock with alloc_sem Roberts Nathan-mcg31137
2007-05-05 8:23 ` David Woodhouse [this message]
2007-06-02 17:42 ` David Woodhouse
2007-06-05 14:21 ` Roberts Nathan-mcg31137
2007-06-07 14:29 ` Josh Boyer
-- strict thread matches above, loose matches on Subject: below --
2007-06-08 19:26 Dave Kleikamp
2007-06-11 12:14 ` David Woodhouse
2007-06-12 1:45 ` Roberts Nathan-mcg31137
2007-06-19 16:11 ` Dave Kleikamp
2007-06-19 19:42 ` Dave Kleikamp
[not found] <af3ea28a0707262032h7ee22775t6ef54e364a9cd704@mail.gmail.com>
2007-07-27 3:38 ` ye janboe
2007-07-27 13:42 ` Dave Kleikamp
2007-07-27 16:35 ` ye janboe
2007-07-27 17:38 ` Dave Kleikamp
2007-07-30 12:45 ` David Woodhouse
2007-07-30 16:45 ` Dave Kleikamp
2007-07-31 12:10 ` David Woodhouse
2007-07-31 12:40 ` David Woodhouse
2007-07-31 13:23 ` Dave Kleikamp
2007-07-31 15:23 ` David Woodhouse
2007-07-31 15:36 ` Dave Kleikamp
2007-07-31 16:23 ` David Woodhouse
2007-08-02 4:11 ` ye janboe
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=1178353416.11851.17.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=Nathan.Roberts@motorola.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).