lkml.org 
[lkml]   [1999]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] rename() on braindead filesystems


On 29 May 1999, Eric W. Biederman wrote:

>
> For handling case changes how about something like this:
>
> Where the idea is for renames:
> a) Always change the case of the name in the dcache, (if the bytes don't match)
> It doesn't hurt as it hashes the same, and compares the same,
> and could be anything anyway, d_lookup is what sets it.
> b) Explicitly allow the case where old_dentry->d_inode == new_dentry->d_inode
> and the case has changed. (Either by calling inode->i_op->rename,
> or a new function inode->i_op->case_change..)
> c) In the filesystems affected handle the case where new_dentry == old_dentry.

> The code below mostly implements this but it doesn't handle storage allocation
> properly.

It doesn't cover the situation when you
a) have a file called "foo"
b) already did a lookup on "FOO" and got a dentry.
c) rename("foo","FOO"). There we go - dentry looks nice and dandy.
Besides, on VFAT "a." == "A." == "a" == "A....". So you'll have to
normalize the newname somehow.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.050 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site