Hi Anton, On Tue, 23 Oct 2007 20:07:47 +1000, Anton Altaparmakov <aia21@xxxxxxxxx> wrote: > I forgot to say: If you do what I did for NTFS you can also throw > away your custom dentry operations that your patch adds as the dcache > then only holds correctly cased names so you are fine to do case > sensitive dcache lookups at all times. Access via wrongly cased name > will always go to ->lookup inode operation and that is fine because > such lookups almost never happen because majority of users will either > use a GUI in which case all names are always correctly cased as the > names displayed in the GUI are obtained from a ->readdir and thus show > the correct case or they will use the command line in which case they > will be savvy enough to use tab-completion in which case the names are > correct case, too. Tab-completion does not work on wrongly cased > names so you are very unlikely to ever get a wrongly cased name at all. > > And yes of course you can on purpose construct a test / benchmark > where having to do the ->lookup each time will be really slow because > you keep creating files and then accessing them by wrongly cased name > on purpose (or whatever) but I would hope that you do not care about > such artificial benchmarks that do not reflect any real-world loads... I have been looking at ntfs_lookup() and seeing how it does its stuff. It seems that is the best way to go. One thing I have noticed is with two or more attempted case-insensitive lookups that don't exist yet case match the same (ie. ntfs_lookup_inode_by_name() fails with -ENOENT), d_add(dent, NULL) is called, populating the dentry with effective duplicates. Eg: # cat /mnt/foo/fileNOTexist # cat /mnt/foo/FILEnotEXIST Will have two negative dentries, am I correct? Regards, Barry. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html