All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATC] small VFS change for JFFS2
Date: Mon, 18 Apr 2005 23:08:26 +1000	[thread overview]
Message-ID: <1113829708.5286.30.camel@localhost.localdomain> (raw)
In-Reply-To: <20050418124656.GA23387@infradead.org>

On Mon, 2005-04-18 at 13:46 +0100, Christoph Hellwig wrote:
> Any, this sounds like you'd want to use ilookup because you don't want
> to read the inode in the cache anyway, right?

We use ilookup() in some circumstances -- if the inode has zero nlink
and hence we definitely don't want to pull it back again if it's gone.

But sometimes we really do mean to use iget() to bring it into core. And
it's in that case that I believe Artem has found the problem, because if
I understand correctly he's still seeing two consecutive calls to
read_inode() for the same inode, without a clear_inode() in between.

prune_icache() is removing the inode from i_hash at line 457 of inode.c,
then being preempted when it drops the inode_lock at line 464, which is
_before_ it calls dispose_list() to actually get rid of the inode(s) in
question. So when iget() is called, the VFS ends up calling read_inode()
again instead of waiting for the original inode to finish going away.

-- 
dwmw2

WARNING: multiple messages have this Message-ID (diff)
From: David Woodhouse <dwmw2@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Artem B. Bityuckiy" <dedekind@infradead.org>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [PATC] small VFS change for JFFS2
Date: Mon, 18 Apr 2005 23:08:26 +1000	[thread overview]
Message-ID: <1113829708.5286.30.camel@localhost.localdomain> (raw)
In-Reply-To: <20050418124656.GA23387@infradead.org>

On Mon, 2005-04-18 at 13:46 +0100, Christoph Hellwig wrote:
> Any, this sounds like you'd want to use ilookup because you don't want
> to read the inode in the cache anyway, right?

We use ilookup() in some circumstances -- if the inode has zero nlink
and hence we definitely don't want to pull it back again if it's gone.

But sometimes we really do mean to use iget() to bring it into core. And
it's in that case that I believe Artem has found the problem, because if
I understand correctly he's still seeing two consecutive calls to
read_inode() for the same inode, without a clear_inode() in between.

prune_icache() is removing the inode from i_hash at line 457 of inode.c,
then being preempted when it drops the inode_lock at line 464, which is
_before_ it calls dispose_list() to actually get rid of the inode(s) in
question. So when iget() is called, the VFS ends up calling read_inode()
again instead of waiting for the original inode to finish going away.

-- 
dwmw2


  parent reply	other threads:[~2005-04-18 13:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18  8:47 [PATC] small VFS change for JFFS2 Artem B. Bityuckiy
2005-04-18  8:47 ` Artem B. Bityuckiy
2005-04-18  8:51 ` Christoph Hellwig
2005-04-18  8:51   ` Christoph Hellwig
2005-04-18  8:58   ` Artem B. Bityuckiy
2005-04-18  8:58     ` Artem B. Bityuckiy
2005-04-18 10:53     ` Christoph Hellwig
2005-04-18 10:53       ` Christoph Hellwig
2005-04-18 11:46       ` Artem B. Bityuckiy
2005-04-18 11:46         ` Artem B. Bityuckiy
2005-04-18 11:52         ` Christoph Hellwig
2005-04-18 11:52           ` Christoph Hellwig
2005-04-18 12:31           ` Artem B. Bityuckiy
2005-04-18 12:31             ` Artem B. Bityuckiy
2005-04-18 12:46             ` David Woodhouse
2005-04-18 12:46               ` David Woodhouse
2005-04-18 12:46             ` Christoph Hellwig
2005-04-18 12:46               ` Christoph Hellwig
2005-04-18 12:56               ` Artem B. Bityuckiy
2005-04-18 12:56                 ` Artem B. Bityuckiy
2005-04-18 13:08               ` David Woodhouse [this message]
2005-04-18 13:08                 ` David Woodhouse
2005-04-18 13:37                 ` ntfs ->iput use - was: " Anton Altaparmakov
2005-04-18 13:38                   ` Anton Altaparmakov
2005-04-18 13:16               ` David Woodhouse
2005-04-18 13:16                 ` David Woodhouse
2005-04-18 14:07                 ` Artem B. Bityuckiy
2005-04-18 14:07                   ` Artem B. Bityuckiy

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=1113829708.5286.30.camel@localhost.localdomain \
    --to=dwmw2@infradead.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /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.