| To: | Barry Naujok <bnaujok@xxxxxxx> |
|---|---|
| Subject: | Re: [RFC 0/2] Case-insensitive filename lookup for XFS |
| From: | Anton Altaparmakov <aia21@xxxxxxxxx> |
| Date: | Tue, 23 Oct 2007 11:01:11 +0100 |
| Cc: | "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx> |
| In-reply-to: | <op.t0m36sn43jf8g2@pc-bnaujok.melbourne.sgi.com> |
| References: | <op.t0m36sn43jf8g2@pc-bnaujok.melbourne.sgi.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
Hi, On 23 Oct 2007, at 08:53, Barry Naujok wrote: Following is the initial test version of case-insensitive support for XFS in Linux. It implements case-insensitivity utilising a Unicode case folding table stored on disk generated from http://www.unicode.org/Public/UNIDATA/CaseFolding.txt Both of the above can be fairly easily fixed if you want. NTFS does it in the stock kernel. You would need to change the XFS ->lookup inode operation so that when it reads the directory to check whether a name exists, if it is found but the case is not matched, you need to make a copy of the correctly cased name (if NTFS this is done in fs/ntfs/ dir.c::ntfs_lookup_inode_by_name() if you want to take a look, the name is stored in the "ntfs_name" structure that is allocated during the lookup if a case mismatched match is found and this is returned to the caller). Then in ->lookup() if you got a correctly cased name structure (if the name was cased correctly the correctly cased named structure pointer would be NULL) then you need to replace the dentry passed into - >lookup with a new one with the correct case. This is a little complicated because such a dentry may already exist in which case you have to use the existing one (instantiating it if it was negative) and if it does not already exist you need to allocate a new one, instantiate it and then move it over the old one. Again a little complicated because of disconnected dentries for NFS. But it is not too bad and it works well in NTFS (see fs/ntfs/namei.c::ntfs_lookup() the code that does all of this starts at the "handle_name" goto label). Doing things this way means that you never have wrong case dentries in dcache. And this in turn means that things like handling ->unlink and ->rename inode operations is much easier as the dentry you receive there is returned from a ->lookup() call thus you know it is correctly cased already so you can do a case-sensitive match when looking up the directory entry to remove/rename! (I am afraid you cannot look at the NTFS code for that as that is not publicly available yet. )-:) Best regards, Anton Other TODOs:
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [RFC 2/2] Case-insensitive XFS - mkfs.xfs, Barry Naujok |
|---|---|
| Next by Date: | Re: [RFC 0/2] Case-insensitive filename lookup for XFS, Anton Altaparmakov |
| Previous by Thread: | [RFC 0/2] Case-insensitive filename lookup for XFS, Barry Naujok |
| Next by Thread: | Re: [RFC 0/2] Case-insensitive filename lookup for XFS, Anton Altaparmakov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |