On Mon, 3 May 1999, a sun wrote:

> 
> 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.

POSIX-mandated. Sorry. Yes, POSIX is braindead wrt rename() behaviour.
 
> 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.

Something similar would make sense and I have a code for that, but not
exactly the way you are talking about. We need an equivalent of nameidata
to do it right. Wait till 2.3, OK? That's an interface-changing
modification and thus not a 2.2 stuff.

Reply via email to