From: Ilya Dryomov <idryomov@gmail.com>
To: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Cc: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [BUG] umount command doesn't end forever
Date: Fri, 2 Sep 2011 15:43:26 +0300 [thread overview]
Message-ID: <20110902124325.GA2022@zambezi.lan> (raw)
In-Reply-To: <4E6094F5.8000506@jp.fujitsu.com>
On Fri, Sep 02, 2011 at 05:33:57PM +0900, Tsutomu Itoh wrote:
> In current for-linus branch, I encountered the problem that the
> umount command doesn't end forever.
(snipped)
> umount acquires down_write(&s->s_umount) by deactivate_super() and
> waits for the end of btrfs-cleaner.
> But, btrfs-cleaner stops because of the acquisition waiting of
> down_read(&sb->s_umount) by writeback_inodes_sb_nr_if_idle().
A similar thing happens on remount while balancing, I think I saw this
in some other case too. It's always due to the fact that vfs acquires
s_umount for read/write and then the writeback code wants to down_read()
it (in case of balancing it has nothing to do with the cleaner thread,
balance calls into writeback by itself).
> So, the deadlock has happened, I think.
>
> -Tsutomu
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-09-02 12:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 8:33 [BUG] umount command doesn't end forever Tsutomu Itoh
2011-09-02 12:43 ` Ilya Dryomov [this message]
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=20110902124325.GA2022@zambezi.lan \
--to=idryomov@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=t-itoh@jp.fujitsu.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;
as well as URLs for NNTP newsgroup(s).