linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miao Xie <miaoxie1984@gmail.com>
To: Josef Bacik <josef@redhat.com>
Cc: Xie Miao <miaoxie1984@gmail.com>,
	Dave Chinner <david@fromorbit.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christoph Hellwig <hch@infradead.org>,
	Linux FSDevel <linux-fsdevel@vger.kernel.org>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>,
	miaox@cn.fujitsu.com, Kamal Mostafa <kamal@canonical.com>,
	Linux Ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)
Date: Fri, 27 Apr 2012 16:06:00 +0800	[thread overview]
Message-ID: <4F9A5368.5000904@gmail.com> (raw)
In-Reply-To: <20120426151159.GB25603@dhcp231-144.rdu.redhat.com>

于 2012年04月26日 23:12, Josef Bacik 写道:

> On Thu, Apr 26, 2012 at 03:55:52PM +0800, Xie Miao wrote:
>> On Thu, Apr 26, 2012 at 11:11 AM, Dave Chinner <david@fromorbit.com> wrote:
>>>> writeback_inodes_sb(_nr) grabs s_umount lock when it want to start
>>>> writeback,
>>>> it may bring us deadlock problem when doing umount. So we introduce new
>>>> functions -- try_to_writeback_inodes_sb(_nr) -- which use
>>>> down_read_trylock()
>>>> instead of down_read() to avoid that deadlock problem.
>>>>
>>>> This idea came from Christoph Hellwig.
>>>> Some code is from the patch of Kamal Mostafa.
>>>
>>> This just re-implements writeback_inodes_[nr]_sb_if_idle() with a
>>> trylock instead of a blocking lock.
>>>
>>> Just replace the blocking lock in writeback_inodes_[nr]_sb_if_idle()
>>> with a trylock and use that.
>>
>> The change of these two functions is relative to three modules,  so I think
>> the patch set now is easy to be reviewed by the developers of each module.
>>
> 
> I agree with David, there's no sense in making something completely seperate,
> this function was introduced soley to kick off background writeout if we could
> with no garuntees, if the other users suddenly don't like the behavior they can
> creating something different for themselves.  Thanks,


OK, I'll make them together.

Thanks
Miao
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2012-04-27  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26  2:57 [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr) Miao Xie
2012-04-26  3:11 ` Dave Chinner
2012-04-26  7:55   ` Xie Miao
2012-04-26 15:12     ` Josef Bacik
2012-04-27  8:06       ` Miao Xie [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=4F9A5368.5000904@gmail.com \
    --to=miaoxie1984@gmail.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=josef@redhat.com \
    --cc=kamal@canonical.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miaox@cn.fujitsu.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).