From: Dave Chinner <david@fromorbit.com>
To: Zachary Kotlarek <zach@kotlarek.com>
Cc: xfs@oss.sgi.com
Subject: Re: Files with non-ASCII names inaccessible after xfs_repair
Date: Wed, 15 Jan 2014 14:48:03 +1100 [thread overview]
Message-ID: <20140115034803.GT3469@dastard> (raw)
In-Reply-To: <61E74CEF-8244-4E90-BA7D-91D54DADC3C1@kotlarek.com>
On Tue, Jan 14, 2014 at 05:59:23PM -0800, Zachary Kotlarek wrote:
>
> On Jan 14, 2014, at 5:53 PM, Dave Chinner <david@fromorbit.com> wrote:
>
> > Pretty simple - the leaf[].address is simply a compressed offset
> > into the leaf. all dirents are 8 byte aligned, and the tag is the
> > byte offset into the leaf dirent space. Hence:
> >
> > leaf[].address = bu[16].tag >> 3
> > = 0x1d8 >> 3
> > = 0x3b
> > = bleaf[3].address
> >
> >> bleaf[3].hashval = 0x16d0707c
> >> bleaf[3].address = 0x3b
> >
> > And there were are - there's a single bit discrepancy in the lower
> > byte of the hash. That tends to imply we have a bug in xfs_repair.
> >
> > What version of xfs_repair did you use? (xfs_repair -V)
>
>
> 3.1.11.
OK, Now I've looked at the code, the answer is easy and you're
probably not going to like it. I missed this the first time through
from your xfs-info output:
naming =version 2 bsize=4096 ascii-ci=1
^^^^^^^^^^
It's called *ASCII* Case Insensitivity for a reason: it doesn't
support anything other than ASCII. So your usage is not actually
supported at all, hence it's no surprise that it has caused
breakage.
Internationalised UTF-8 character sets are not supported
because it causes case conversion issues when kernel and userspace
character sets don't match exactly. IOWs, to support UTF-8 case
insensitivity, we need to have on-disk translation tables so that
the kernel and userspace use the same case translations. See here:
http://xfs.org/index.php/Unfinished_work#Support_for_unicode_.2F_utf8_filesystems
I suspect that the way to fix your filesystem is to run xfs_repair
under a "C" locale so that the glibc tolower() function behaves the
same way the kernel behaves and so the hashes calculated by
xfs_repair match the what the kernel thinks is correct.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-01-15 3:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 13:28 Files with non-ASCII names inaccessible after xfs_repair Zachary Kotlarek
2014-01-12 18:47 ` Stan Hoeppner
2014-01-12 19:53 ` Zachary Kotlarek
2014-01-13 1:50 ` Dave Chinner
2014-01-13 2:36 ` Zachary Kotlarek
2014-01-13 3:19 ` Dave Chinner
2014-01-13 3:47 ` Zachary Kotlarek
2014-01-13 19:27 ` Dave Chinner
2014-01-13 23:07 ` Zachary Kotlarek
2014-01-14 2:24 ` Dave Chinner
2014-01-14 3:12 ` Zachary Kotlarek
2014-01-15 1:53 ` Dave Chinner
2014-01-15 1:59 ` Zachary Kotlarek
2014-01-15 3:48 ` Dave Chinner [this message]
2014-01-15 5:30 ` Zachary Kotlarek
2014-01-15 6:37 ` Dave Chinner
2014-01-15 8:21 ` Zachary Kotlarek
2014-01-15 15:54 ` Eric Sandeen
2014-01-15 21:08 ` Dave Chinner
2014-01-16 20:55 ` Michael Weissenbacher
2014-01-16 21:11 ` Shaun Gosse
2014-01-13 15:40 ` Michael Weissenbacher
2014-01-13 18:33 ` Zachary Kotlarek
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=20140115034803.GT3469@dastard \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
--cc=zach@kotlarek.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 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.