public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Barry Naujok <bnaujok@sgi.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH] XFS: Fix returning case-preserved name with CI node form directories
Date: Thu, 19 Jun 2008 04:32:43 -0400	[thread overview]
Message-ID: <20080619083243.GA8821@infradead.org> (raw)
In-Reply-To: <op.ucxszl2d3jf8g2@pc-bnaujok.melbourne.sgi.com>

On Wed, Jun 18, 2008 at 07:07:59PM +1000, Barry Naujok wrote:
> xfs_dir2_node_lookup() calls xfs_da_node_lookup_int() which iterates
> through leaf blocks containing the matching hash value for the name
> being looked up. Inside xfs_da_node_lookup_int(), it calls the
> xfs_dir2_leafn_lookup_for_entry() for each leaf block.
> xfs_dir2_leafn_lookup_for_entry() iterates through each matching
> hash/offset pair doing a name comparison to find the matching
> dirent.
>
> For CI mode, the state->extrablk retains the details of the block
> that has the CI match so xfs_dir2_node_lookup() can return the
> case-preserved name.
>
> The original implementation didn't retain the xfs_da_buf_t properly,
> so the lookup was returning a bogus name to be stored in the dentry.
>
> In the case of unlink, the bad name was passed and in debug mode,
> ASSERTed when it can't find the entry.

Looks good to me, although I don't really like how much of a mess
xfs_dir2_leafn_lookup_for_entry has become. No idea for a nice why
to write it, though.

Btw, any chance we could get some CI tests in xfsqa?  Looks like you
have quite a few testcases that found issues so far.

  reply	other threads:[~2008-06-19  8:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18  9:07 [PATCH] XFS: Fix returning case-preserved name with CI node form directories Barry Naujok
2008-06-19  8:32 ` Christoph Hellwig [this message]
2008-06-19  8:39   ` Barry Naujok

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=20080619083243.GA8821@infradead.org \
    --to=hch@infradead.org \
    --cc=bnaujok@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