hi all,
i brought this up with bill hawes early last year, but i thought i'd
bring it up again. currently, if you do the obvious things with
d_compare for a case-preserving/case-insensitive filesystem, rename()
doesn't allow you to do a rename("AbCdEf", "aBcDeF"). that's because
rename calls d_lookup for both the source and destination paths. as a
result, you get a successful lookup on the destination path even
though the exact spelling isn't the same. i would like to fix that in
2.3.x.
so, here's a potential solution that's a bit overboard, but general:
how do people feel about adding a field to dentry_lookup (and
propagating it to d_lookup and d_compare) that specifies the
filesystem call? e.g., lookup_dentry(name, base, flags,
DENTRY_RENAME_DEST) would allow d_compare to return a negative result
if it wanted to do so on a rename. if all filesystem calls get them,
you could conceivably create a filesystem with different comparison
functions for each call.
as i'm not sure what filesystem really needs to be able to define
different comparison functions for anything except rename, just adding
a LOOKUP_RENAME to the flags for the destination lookup_dentry()
should also work. d_lookup and d_compare would still need to get
expanded a little to handle a passed in flag, but it means that
lookup_dentry doesn't need to get changed. that way, d_compare's
behaviour can be different on renames.
comments?
-a
[EMAIL PROTECTED]