From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] fs: move i_wb_list out from under inode_lock
Date: Fri, 29 Oct 2010 08:47:44 +1100 [thread overview]
Message-ID: <20101028214744.GF2715@dastard> (raw)
In-Reply-To: <20101028141949.GB19174@infradead.org>
On Thu, Oct 28, 2010 at 10:19:49AM -0400, Christoph Hellwig wrote:
> > + * Write out an inode's dirty pages. Called under inode_wb_list_lock. Either
> > + * the caller has ref on the inode (either via __iget or via syscall against an
> > + * fd) or the inode has I_WILL_FREE set.
>
> Just drop mentioning of how we got the reference ,it's rather pointless.
OK.
> > writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
> > @@ -354,7 +368,7 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
> > inode->i_state |= I_SYNC;
> > inode->i_state &= ~I_DIRTY_PAGES;
> > spin_unlock(&inode->i_lock);
> > - spin_unlock(&inode_lock);
> > + spin_unlock(&inode_wb_list_lock);
>
> We don't actually need inode_wb_list_lock here. But I guess we can
> fix this later and be conservative for now.
Hmmm - I think you are right. However, there are lots of
opportunities for cleaning up the locking in this areaş so leaving
it for later is probably best.
> > @@ -963,63 +976,62 @@ void __mark_inode_dirty(struct inode *inode, int flags)
>
> I think the __mark_inode_dirty cleanup should be a separate patch,
> it's rather confusing in the current form.
Ok. I'll leave it out for now - there's various other cleanups
needed here now as well (e.g. the unlocked flags check is not needed
to avoid a global lock anymore) so I'll leave that for later, too.
> > + if (was_dirty) {
> > +out_unlock_inode:
> > spin_unlock(&inode->i_lock);
> > + return;
> > + }
>
> Please just move the label to the end of the function and add another
> goto here.
Will do.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2010-10-28 21:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 11:42 [PATCH 0/3] fs: peel back the inode_lock some more Dave Chinner
2010-10-28 11:42 ` [PATCH 1/3] fs: move i_sb_list out from under inode_lock Dave Chinner
2010-10-28 14:11 ` Christoph Hellwig
2010-10-28 11:42 ` [PATCH 2/3] fs: move i_wb_list " Dave Chinner
2010-10-28 14:19 ` Christoph Hellwig
2010-10-28 21:47 ` Dave Chinner [this message]
2010-10-28 11:42 ` [PATCH 3/3] fs: move i_hash " Dave Chinner
2010-10-28 14:24 ` Christoph Hellwig
2010-10-28 12:00 ` [PATCH 0/3] fs: peel back the inode_lock some more Christoph Hellwig
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=20101028214744.GF2715@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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).