All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Jan Kara <jack@suse.cz>
Cc: Miao Xie <miaox@cn.fujitsu.com>,
	Linux Fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>,
	Linux Ext4 <linux-ext4@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	dsterba@suse.cz, Christoph Hellwig <hch@infradead.org>,
	Kamal Mostafa <kamal@canonical.com>,
	Al Viro <viro@ZenIV.linux.org.uk>
Subject: Re: [PATCH V2] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them
Date: Sat, 12 Jan 2013 10:54:01 +0800	[thread overview]
Message-ID: <20130112025401.GA8948@localhost> (raw)
In-Reply-To: <20130111201211.GA20981@quack.suse.cz>

On Fri, Jan 11, 2013 at 09:12:11PM +0100, Jan Kara wrote:
> On Thu 10-01-13 13:47:57, Miao Xie wrote:
> > writeback_inodes_sb(_nr)_if_idle() is re-implemented by replacing down_read()
> > with down_read_trylock() because
> > - If ->s_umount is write locked, then the sb is not idle. That is
> >   writeback_inodes_sb(_nr)_if_idle() needn't wait for the lock.
> > - writeback_inodes_sb(_nr)_if_idle() grabs s_umount lock when it want to start
> >   writeback, it may bring us deadlock problem when doing umount. In order to
> >   fix the problem, ext4 and btrfs implemented their own writeback functions
> >   instead of writeback_inodes_sb(_nr)_if_idle(), but it introduced the redundant
> >   code, it is better to implement a new writeback_inodes_sb(_nr)_if_idle().
> > 
> > The name of these two functions is cumbersome, so rename them to
> > try_to_writeback_inodes_sb(_nr).
> > 
> > This idea came from Christoph Hellwig.
> > Some code is from the patch of Kamal Mostafa.
>   The patch looks good. Thanks! You can add:
> Reviewed-by: Jan Kara <jack@suse.cz>
> 
>   BTW, since changes to filesystems are minimal, maybe Fengguang can take
> the patch through his writeback tree? Fengguang?

OK, done. The patch looks good, thanks!

Fengguang

      reply	other threads:[~2013-01-12  2:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 10:09 [PATCH RESEND] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them Miao Xie
2012-12-28 14:33 ` David Sterba
2013-01-10  3:24   ` Miao Xie
2013-01-10  5:47   ` [PATCH V2] " Miao Xie
2013-01-11 20:12     ` Jan Kara
2013-01-12  2:54       ` Fengguang Wu [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=20130112025401.GA8948@localhost \
    --to=fengguang.wu@intel.com \
    --cc=dsterba@suse.cz \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=kamal@canonical.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.