https://bugs.kde.org/show_bug.cgi?id=402154

--- Comment #32 from Joachim Wagner <jwag...@computing.dcu.ie> ---
(In reply to tagwerk19 from comment #31)
> Apologies, I fear you'll have to step through your process for me. I'm
> somehow missing something...
> [...]
> The mapping would have to work when indexing (going from full filename to an
> invariant, unique, internal docID)

I only described the indexing part. The docID is the pair (filesystemID,
inode_number) where filesystemID := I(mount_point(filepath)). M is only
introduced to make determining mount_point(filepath) more efficient by using
cached values M(stat.st_dev(filepath)). The number of cache entries never
exceeds the number of mounted filesystems.

> and when searching (going from the docID
> to the canonical filename).

To get from docID to the filepath, without storing the filepath, one can
maintain a reverse map of I to get the mount point for a given internal
filesystem ID. Once one has the mount point, one can get the current
stat.st_dev for the filesystem which is currently used to get the filepath for
a given inode_number. 

I am suggesting this alternative as the current proposal requires
filesystem-specific code such as looking for the special string "subvolid" in
findmnt output. Another filesystem may call it something else. One doesn't want
to write code for each possible filesystem and update it each time somebody
publishes a new filesystem.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to