[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4F9A5368.5000904@gmail.com>
Date: Fri, 27 Apr 2012 16:06:00 +0800
From: Miao Xie <miaoxie1984@...il.com>
To: Josef Bacik <josef@...hat.com>
CC: Xie Miao <miaoxie1984@...il.com>,
Dave Chinner <david@...morbit.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Linux FSDevel <linux-fsdevel@...r.kernel.org>,
Linux Btrfs <linux-btrfs@...r.kernel.org>,
miaox@...fujitsu.com, Kamal Mostafa <kamal@...onical.com>,
Linux Ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)
于 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@...morbit.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists