Opened 11 years ago

Last modified 5 years ago

#547 new defect

VFS_IN_RENAME does not work with directories

Reported by: Jiří Zárevúcky Owned by: Jiří Zárevúcky
Priority: minor Milestone:
Component: helenos/srv/vfs Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Internally, VFS server implements RENAME as a sequence of link and unlink. However, at least the EXT4 filesystem does not support unlinking non-empty directories, even when other hard link exists. Furthermore, the filesystem implementation may choose to reject the second link entirely.

Thus it would be helpful if filesystems implemented the rename operation directly, instead of playing with links like this.

Change History (3)

comment:1 by Jakub Jermář, 11 years ago

Keep in mind that the FS servers should be easy to implement, thus not doing RENAME in them can be considered a design goal leading to simplicity.

comment:2 by Jiří Zárevúcky, 11 years ago

True, but flexibility is a consideration as well.
It is possible for the explicitly implemented rename to be optional, with libfs falling back to the original mechanism if not present.

Another possible simplification would result from simply not supporting standalone link operation, since hard links are evil, effectively replacing link with relink.

comment:3 by Jiri Svoboda, 5 years ago

How can this work with FAT? In the interest of being generic, VFS should allow file systems to get the requests as close to the form in which they come from the client as possible. Allowing the FS to defer some functionality to generic code in VFS is okay, but the other option *must* be available.

Note: See TracTickets for help on using tickets.