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

On Mon, 2005-04-18 at 16:31 +0400, Artem B. Bityuckiy wrote:
> Yes, exactly. VFS developers may always say "it is your problem -
> redesign JFFS2", but I think it is too late to redesign it.

Bear in mind that the reason I added the state tracking to the internal
jffs2_inode_cache state was specifically to deal with the fact that the
VFS can call read_inode() for an inode which was previously in core and
for which it hasn't yet called clear_inode().

I suspect that there's a way we could work around this problem in JFFS2,
and if not hch is probably right -- exporting the lock isn't good
enough; if we're going to change the VFS we should fix the actual
problem.

I'm confused by this though -- I thought we'd already _fixed_ this in
the VFS. What you describe shouldn't happen because I believe you're
missing a step:

> JFFS2 writer: looks at the inode state, realizes it is in state PRESENT,
> i.e. it is in the inode cache (which is wrong).
> JFFS2 writer: runs iget() to acquire a pointer to the struct inode of
> the inode 15601.

wait_for_freeing_inode() waits for the existing inode in state I_FREEING
to finish being cleared...

> JFFS2 writer: iget() calls ->read_inode(), i.e., jffs2_read_inode().
> JFFS2 writed: JFFS2 is surprised why read_inode() is called for the
> already built inode 15601.

... and this shouldn't happen.

-- 
dwmw2

WARNING: multiple messages have this Message-ID (diff)
From: David Woodhouse <dwmw2@infradead.org>
To: dedekind@infradead.org
Cc: Christoph Hellwig <hch@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 22:46:44 +1000	[thread overview]
Message-ID: <1113828405.5286.19.camel@localhost.localdomain> (raw)
In-Reply-To: <1113827466.2125.47.camel@sauron.oktetlabs.ru>

On Mon, 2005-04-18 at 16:31 +0400, Artem B. Bityuckiy wrote:
> Yes, exactly. VFS developers may always say "it is your problem -
> redesign JFFS2", but I think it is too late to redesign it.

Bear in mind that the reason I added the state tracking to the internal
jffs2_inode_cache state was specifically to deal with the fact that the
VFS can call read_inode() for an inode which was previously in core and
for which it hasn't yet called clear_inode().

I suspect that there's a way we could work around this problem in JFFS2,
and if not hch is probably right -- exporting the lock isn't good
enough; if we're going to change the VFS we should fix the actual
problem.

I'm confused by this though -- I thought we'd already _fixed_ this in
the VFS. What you describe shouldn't happen because I believe you're
missing a step:

> JFFS2 writer: looks at the inode state, realizes it is in state PRESENT,
> i.e. it is in the inode cache (which is wrong).
> JFFS2 writer: runs iget() to acquire a pointer to the struct inode of
> the inode 15601.

wait_for_freeing_inode() waits for the existing inode in state I_FREEING
to finish being cleared...

> JFFS2 writer: iget() calls ->read_inode(), i.e., jffs2_read_inode().
> JFFS2 writed: JFFS2 is surprised why read_inode() is called for the
> already built inode 15601.

... and this shouldn't happen.

-- 
dwmw2


  reply	other threads:[~2005-04-18 12:46 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 [this message]
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
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=1113828405.5286.19.camel@localhost.localdomain \
    --to=dwmw2@infradead.org \
    --cc=dedekind@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.