From: David Woodhouse <dwmw2@infradead.org>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] jffs2: Move erasing from write_super to GC.
Date: Tue, 18 May 2010 19:37:24 +0100 [thread overview]
Message-ID: <1274207844.6930.7754.camel@macbook.infradead.org> (raw)
In-Reply-To: <OF7E076EC4.DAE6F9AF-ONC1257723.0042AFF4-C1257723.00430591@transmode.se>
On Fri, 2010-05-14 at 14:12 +0200, Joakim Tjernlund wrote:
> +/* erase.c */
> +static inline void jffs2_erase_pending_trigger(struct jffs2_sb_info *c)
> +{
> + jffs2_garbage_collect_trigger(c);
> +}
Hrm, and now everything which calls jffs2_erase_pending_trigger() needs
_not_ to be holding c->erase_completion_lock, or it'll deadlock...
Eraseblock at 0x001c0000 completely dirtied. Removing from (dirty?) list...
...and adding to erase_pending_list
=============================================
[ INFO: possible recursive locking detected ]
2.6.34-rc7 #2
---------------------------------------------
dbench/4263 is trying to acquire lock:
(&(&c->erase_completion_lock)->rlock){+.+...}, at: [<ffffffffa011ae0e>] jffs2_garbage_collect_trigger+0x19/0x4e [jffs2]
but task is already holding lock:
(&(&c->erase_completion_lock)->rlock){+.+...}, at: [<ffffffffa01115cd>] jffs2_mark_node_obsolete+0xcb/0x737 [jffs2]
other info that might help us debug this:
5 locks held by dbench/4263:
#0: (&sb->s_type->i_mutex_key#12){+.+.+.}, at: [<ffffffff8107aeda>] generic_file_aio_write+0x47/0xa8
#1: (&c->alloc_sem){+.+.+.}, at: [<ffffffffa011239f>] jffs2_reserve_space+0x71/0x39e [jffs2]
#2: (&f->sem){+.+.+.}, at: [<ffffffffa0115c73>] jffs2_write_inode_range+0xb0/0x2f3 [jffs2]
#3: (&c->erase_free_sem){+.+...}, at: [<ffffffffa01115b6>] jffs2_mark_node_obsolete+0xb4/0x737 [jffs2]
#4: (&(&c->erase_completion_lock)->rlock){+.+...}, at: [<ffffffffa01115cd>] jffs2_mark_node_obsolete+0xcb/0x737 [jffs2]
stack backtrace:
Pid: 4263, comm: dbench Not tainted 2.6.34-rc7 #2
Call Trace:
[<ffffffff8105d40b>] __lock_acquire+0x1633/0x16cd
[<ffffffff8105a16f>] ? trace_hardirqs_off+0xd/0xf
[<ffffffff814d6d71>] ? mutex_lock_nested+0x2c7/0x31a
[<ffffffff8105b1c7>] ? trace_hardirqs_on_caller+0x10c/0x130
[<ffffffff8105d4fc>] lock_acquire+0x57/0x6d
[<ffffffffa011ae0e>] ? jffs2_garbage_collect_trigger+0x19/0x4e [jffs2]
[<ffffffff814d7fdd>] _raw_spin_lock+0x3b/0x4a
[<ffffffffa011ae0e>] ? jffs2_garbage_collect_trigger+0x19/0x4e [jffs2]
[<ffffffffa011ae0e>] jffs2_garbage_collect_trigger+0x19/0x4e [jffs2]
[<ffffffffa01118a9>] jffs2_mark_node_obsolete+0x3a7/0x737 [jffs2]
[<ffffffff814d4e51>] ? printk+0x3c/0x3e
[<ffffffffa011022c>] jffs2_obsolete_node_frag+0x2a/0x48 [jffs2]
[<ffffffffa01108e9>] jffs2_add_full_dnode_to_inode+0x2f3/0x3cc [jffs2]
[<ffffffffa0115dc6>] jffs2_write_inode_range+0x203/0x2f3 [jffs2]
[<ffffffffa010f94e>] jffs2_write_end+0x176/0x25b [jffs2]
[<ffffffff810790ca>] generic_file_buffered_write+0x188/0x282
--
dwmw2
next prev parent reply other threads:[~2010-05-18 18:37 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-03-20 10:03 [PATCH] jffs2: Move erasing from write_super to GC Joakim Tjernlund 2010-03-30 12:57 ` Artem Bityutskiy 2010-03-30 13:04 ` Joakim Tjernlund 2010-05-13 17:16 ` David Woodhouse 2010-05-14 10:10 ` Joakim Tjernlund 2010-05-14 10:35 ` David Woodhouse 2010-05-14 11:07 ` Joakim Tjernlund 2010-05-14 12:12 ` Joakim Tjernlund 2010-05-17 15:35 ` Joakim Tjernlund 2010-05-18 15:46 ` David Woodhouse 2010-05-18 18:19 ` Joakim Tjernlund 2010-05-18 18:37 ` David Woodhouse [this message] 2010-05-18 18:59 ` David Woodhouse 2010-05-18 22:44 ` Joakim Tjernlund 2010-05-18 23:42 ` David Woodhouse 2010-05-19 9:47 ` Joakim Tjernlund 2010-05-19 10:05 ` David Woodhouse 2010-05-19 10:36 ` Joakim Tjernlund 2010-05-19 16:49 ` David Woodhouse 2010-05-19 20:06 ` Joakim Tjernlund 2010-05-19 21:24 ` David Woodhouse -- strict thread matches above, loose matches on Subject: below -- 2010-02-26 9:19 Joakim Tjernlund 2010-02-15 7:40 Joakim Tjernlund
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=1274207844.6930.7754.camel@macbook.infradead.org \
--to=dwmw2@infradead.org \
--cc=joakim.tjernlund@transmode.se \
--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