Most recent kernel where this bug did not occur: Distribution: ubuntu Hardware Environment: ppc Mac Software Environment: Problem Description: You can't rename foo to Foo because hfsplus wrongly create 2 dentries for foo and Foo. Note: the steps below work when the fs is jfs (OS2 compatible mode). Steps to reproduce: from a shell command line. (this is more or less what nautilus does) $ > foo $ stat foo $ stat Foo $ mv foo fooBAR $ stat Foo Here it should return an error.
Created attachment 11769 [details] custom dentry hash and comparison operations This patch adds dentry operations to do filename comparison and hashing. If the filesystem is case-sensitive and the NODECOMPOSE flag is set the generic dentry operations are used, as they are now. In order to implement the case-insensitive/decomposing comparison and hashing the logic inside hfsplus_asc2uni function has been factored out and reused. For submission to the HFS+ maintainer and LKML I'll split the initial refactoring work into a separate patch. This has been tested on i386 and x86_64. Tests on PPC and/or feedback on the patch would be much appreciated. See also: http://bugs.gentoo.org/show_bug.cgi?id=178298
Created attachment 11770 [details] test script to generate and lookup filenames of varying case Perl test script that generates a file with a composed unicode character then attempts to access it through various equivalent filenames. Should fail without the patch and succeed with it (on a case-sensitive filesystem).
> This has been tested on i386 and x86_64. Tests on PPC and/or feedback on the > patch would be much appreciated. Works on PPC G4, tested with Ubuntu Linux 2.6.22-rc3 kernel.
Thanks very much!
Duane, are you planning on submitting the patch? Thanks.
I've submitted it to Roman and LKML. Roman fixed a couple of things and made some improvements, after which akpm picked it up for -mm. As I understand it, assuming no problems are found in -mm, it will be merged into mainline for 2.6.24. You can get the latest version of the patches, as they are in -mm, from here: ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-rc6/2.6.22-rc6-mm1/broken-out/hfs-refactor-ascii-to-unicode-conversion-routine.patch ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-rc6/2.6.22-rc6-mm1/broken-out/hfs-refactor-ascii-to-unicode-conversion-routine-fix.patch ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-rc6/2.6.22-rc6-mm1/broken-out/hfs-add-custom-dentry-hash-and-comparison-operations.patch
Great, thanks. Closing the bug.