From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>, Wu Fengguang <fengguang.wu@intel.com>,
linux-fsdevel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 7/7] writeback: Avoid iput() from flusher thread
Date: Mon, 30 Apr 2012 23:58:55 +0200 [thread overview]
Message-ID: <20120430215855.GD10105@quack.suse.cz> (raw)
In-Reply-To: <20120430153027.GA24324@infradead.org>
On Mon 30-04-12 11:30:27, Christoph Hellwig wrote:
> > - * Wait for writeback on an inode to complete.
> > + * Wait for writeback on an inode to complete. Called with i_lock held.
> > + * Caller must make sure inode cannot go away when we drop i_lock.
> > */
> > -static void inode_wait_for_writeback(struct inode *inode)
> > +void inode_wait_for_writeback(struct inode *inode)
> > {
> > DEFINE_WAIT_BIT(wq, &inode->i_state, __I_SYNC);
> > wait_queue_head_t *wqh;
> > @@ -340,6 +341,26 @@ static void inode_wait_for_writeback(struct inode *inode)
> > }
> > }
>
> This needs way better documentation, preferably using kernel doc.
OK, will improve.
> I also suspect we should rename inode_wait_for_writeback to
> __inode_wait_for_writeback and make inode_wait_for_writeback the public
> wrapper that takes i_lock.
Good idea. Will do.
> > diff --git a/fs/inode.c b/fs/inode.c
> > index d3ebdbe..3869714 100644
> > --- a/fs/inode.c
> > +++ b/fs/inode.c
> > @@ -510,7 +510,6 @@ void end_writeback(struct inode *inode)
> > BUG_ON(!list_empty(&inode->i_data.private_list));
> > BUG_ON(!(inode->i_state & I_FREEING));
> > BUG_ON(inode->i_state & I_CLEAR);
> > - inode_sync_wait(inode);
> > /* don't need i_lock here, no concurrent mods to i_state */
> > inode->i_state = I_FREEING | I_CLEAR;
> > }
>
> end_writeback is really misnamed now and needs a better name.
Yes. I think old good clear_inode() may be fine? The only thing we really
*do* in that function is setting of I_CLEAR. I guess I'll do the rename in
one big jumbo patch. Would that be OK? I don't want to spam with 50
one-line patches...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2012-04-30 21:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 22:56 [PATCH 0/7 v2] writeback: Avoid iput() from flusher thread Jan Kara
2012-03-20 22:56 ` [PATCH 1/7] writeback: Move clearing of I_SYNC into inode_sync_complete() Jan Kara
2012-04-30 14:36 ` Christoph Hellwig
2012-04-30 21:30 ` Jan Kara
2012-03-20 22:56 ` [PATCH 2/7] writeback: Move requeueing when I_SYNC set to writeback_sb_inodes() Jan Kara
2012-04-30 14:38 ` Christoph Hellwig
2012-03-20 22:56 ` [PATCH 3/7] writeback: Move I_DIRTY_PAGES handling Jan Kara
2012-03-22 2:41 ` Fengguang Wu
2012-03-22 8:35 ` Jan Kara
2012-03-28 3:11 ` Fengguang Wu
2012-03-28 15:12 ` Christoph Hellwig
2012-04-30 14:39 ` Christoph Hellwig
2012-04-30 14:41 ` Christoph Hellwig
2012-04-30 21:21 ` Jan Kara
2012-03-20 22:56 ` [PATCH 4/7] writeback: Separate inode requeueing after writeback Jan Kara
2012-04-30 14:43 ` Christoph Hellwig
2012-04-30 21:42 ` Jan Kara
2012-03-20 22:56 ` [PATCH 5/7] writeback: Remove wb->list_lock from writeback_single_inode() Jan Kara
2012-04-30 14:44 ` Christoph Hellwig
2012-03-20 22:56 ` [PATCH 6/7] writeback: Refactor writeback_single_inode() Jan Kara
2012-03-20 23:35 ` Dave Chinner
2012-03-21 10:03 ` Jan Kara
2012-04-30 14:46 ` Christoph Hellwig
2012-03-20 22:56 ` [PATCH 7/7] writeback: Avoid iput() from flusher thread Jan Kara
2012-03-20 23:50 ` Dave Chinner
2012-03-21 10:25 ` Jan Kara
2012-03-22 3:03 ` Fengguang Wu
2012-03-22 6:27 ` Dave Chinner
2012-03-22 9:50 ` Jan Kara
2012-03-22 3:01 ` Fengguang Wu
2012-04-30 15:30 ` Christoph Hellwig
2012-04-30 21:58 ` Jan Kara [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=20120430215855.GD10105@quack.suse.cz \
--to=jack@suse.cz \
--cc=fengguang.wu@intel.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--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).