From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: invalidate_inode_buffers call in invalidate_list?
Date: Mon, 18 Oct 2010 12:11:50 +1100 [thread overview]
Message-ID: <20101018011150.GI29677@dastard> (raw)
In-Reply-To: <20101017233900.GA1525@infradead.org>
On Sun, Oct 17, 2010 at 07:39:00PM -0400, Christoph Hellwig wrote:
> Does anyone remember why we call invalidate_inode_buffers in
> invalidate_list? These days we basically call invalidate_inode_buffers
> only in ->evict_inode, which we will call from invalidate_list in
> case of a zero refcount.
>
> For calls to invalidate_inode_buffers it's hamrless, but for other
> callers it means we lose track of which buffers were dirtied for
> an inode, and thus can write them out during fsync.
>
> Something like the untested patch below should fix it.
Seems reasonable to me. I can't see any obvious reason why the call
in evict_inode in not sufficient to ensure the inode is correctly
cleaned up, and none of the inode buffers take a reference to the
inode so they shouldn't need to be invalidated to get the reference
count to zero....
> While we're
> at it - any reaso not to consider I_NEW inodes as busy in
> invalidate_list?
Not that I can think of. I'd probably leave the WARN_ON() condition
there, though, so that if we do ever encounter them we hear about
it...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2010-10-18 1:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-17 23:39 invalidate_inode_buffers call in invalidate_list? Christoph Hellwig
2010-10-18 1:11 ` Dave Chinner [this message]
2010-10-18 2:18 ` 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=20101018011150.GI29677@dastard \
--to=david@fromorbit.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 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.