Re: dcache problems with vfat

Gordon Chaffee (chaffee@cs.berkeley.edu)
Wed, 6 Jan 1999 12:46:42 -0800 (PST)


Alexander Viro writes:
> Now, if it would be the only bug... rename() starts from unlink() /
> rmdir() on target - there goes rename() semantics. rename() doesn't notice
> if somebody keeps alias opened and breaks a lot of stuff (semaphore sits
> in inode). unlink() and rmdir() are also unhappy with it. Please, don't
> take it as whining - I'm going to submit fixes for that, but I suspect
> that it might be easier to provide an ioctl (for directories) that would
> convert short name into the long one and make WINE use it.

It would be easier if aliases didn't exist. They do. I think the programs
that actively make use of short names are dosemu, wine, and possibly samba.
You also cannot create files if a short alias exists, and if there is no
exposure of the aliases, you just get weird EEXISTS or EPERM type errors
without being able to access the file. I don't think the thing to do is
to change the semantics of the filesystem. Linus suggested something to
simplify things so you won't end up with multiple dentry chains to the same
file. I think that would be a better change than to change the filesystem
semantics because dealing with dentries and inodes in combination is hard.
It certainly was easier dealing with these issues when only inodes existed.

> BTW, IMHO changing inode under dentry is evil and unnecessary:
> we can remove_inode_hash(), change i_ino and then do insert_inode_hash().
> It's what I did (testing right now) with msdosfs.

Any way you can get it to work is fine with me. Just make sure you
run through the test suite before you conclude that your changes work.
Changing the inode under the dentry was the only way I could deal with
moving open files. After a move, the inode refers to something
different on disk than before the move. It looks like you found a way
to change the inode by using remove_inode_hash() and insert_inode_hash().
Great. If it works, I'll be happy. You seem to understand the dcache
behavior better than I do. I still get the feeling that vfat is very
easily broken by any dcache changes.

- Gordon

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