public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Shailendra Tripathi <stripathi@agami.com>
Cc: David Chinner <dgc@sgi.com>,
	xfs@oss.sgi.com, t-nagano@ah.jp.nec.com, xfs-dev@sgi.com
Subject: Re: [REVIEW 3 of 4] Fix recalim handling in xfs_iget_core
Date: Thu, 26 Oct 2006 19:58:49 +1000	[thread overview]
Message-ID: <20061026095849.GN8394166@melbourne.sgi.com> (raw)
In-Reply-To: <453E5A0F.4070902@agami.com>

On Tue, Oct 24, 2006 at 11:23:11AM -0700, Shailendra Tripathi wrote:
> Hi David,
>               I can't really see why we need this test:
>                if (xfs_iflags_test(ip, XFS_IRECLAIMABLE))
>                I think, An inode with no VP can be possibly in only 3 
> states (NEW, RECLAIM or RECLAIMABLE). This check is being made inside 
> (inode_vp == NULL)  check. If I am correct, may be we can omit an extra 
> instruction here.

We can't have an I_NEW here - that is checked even before we we try
to get the vnode. Hence we can be in either RECLAIM or RECLAIMABLE state.
Then we check RECLAIm and retry. So only reclaimable can get here.

Yes, I think you're right. Good catch. I'll replace the test
with an ASSERT.

>              It appears that you can see inode with XFS_ISTALE can 
> potentially reach. I am not sure how it should reach that path. 
> Following code just after this assumes that it must be in reclaimable path:
>        
>                                XFS_MOUNT_ILOCK(mp);
>                                list_del_init(&ip->i_reclaim);
>                                XFS_MOUNT_IUNLOCK(mp);

That's a no-op if it's not on the reclaim list (next and prev both
point to itself) so it should be safe even on non-IRECLAIMABLE
inodes.

Thanks, Shailendra.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

      reply	other threads:[~2006-10-26 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-24  7:20 [REVIEW 3 of 4] Fix recalim handling in xfs_iget_core David Chinner
2006-10-24 18:23 ` Shailendra Tripathi
2006-10-26  9:58   ` David Chinner [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=20061026095849.GN8394166@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=stripathi@agami.com \
    --cc=t-nagano@ah.jp.nec.com \
    --cc=xfs-dev@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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