Add more robust generic attribute emulation variant
The new configure option "--use-xattr-ref" enables an xattr assisted variant of the generic attribute emulation. Instead of using the inode ID of a node to identify its attribute directory, we use a reasonably unique random 128 bit number, which we generate and attach as an attribute to the node. This way, when a node changes its inode ID (defragmentation?) or the inode ID of a removed node with a left-over attribute directory is reused, attributes won't get mixed up. The old method is still used for symlinks (since on Linux only priviledged users can write attributes on symlinks), but those usually only have a rather boring BEOS:TYPE attribute, so mix-ups wouldn't be that problematic anyway.
This commit is contained in:
@@ -914,6 +914,11 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
|
||||
tools rm_attrs ] -f ;
|
||||
# assumes that rm_attrs is built with debugging disabled
|
||||
HOST_RM_ATTRS_TARGET = <build>rm_attrs ;
|
||||
|
||||
# If specified, use xattr support to tag files with unique IDs.
|
||||
if $(HAIKU_HOST_USE_XATTR_REF) = 1 {
|
||||
HOST_DEFINES += HAIKU_HOST_USE_XATTR_REF ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user