Leave no leftover for a folder kept only while empty, and name filesystems by more than their mount point (hq ADR 0325 third review)
A folder kept because it was empty, then covered by its disk, was said as unhealthy leftover entries for ever: its entries sit on a hidden empty folder and grant nothing, so they are now forgotten, and only entries walked onto data under a warrant are kept to be taken out. A warrant and a kept folder now name their filesystem by mount point, source and type, so another pool at the same point is a move; records naming a mount point are read as its name. A record with no access ids is said under a path-free name.
This commit is contained in:
@@ -147,7 +147,11 @@ func mountinfoPoints(raw string) []string {
|
||||
|
||||
// mountSourceOf is the source and filesystem type of the mount at point, from mountinfo: for a ZFS dataset, its
|
||||
// name. Empty when the machine says nothing of it.
|
||||
func mountSourceOf(point string) (source, fstype string) {
|
||||
func mountSourceOf(point string) (source, fstype string) { return MountSource(point) }
|
||||
|
||||
// MountSource is mountSourceOf as the machine answers it. A variable so a test can stand in for another filesystem
|
||||
// mounted at the same point.
|
||||
var MountSource = func(point string) (source, fstype string) {
|
||||
raw, err := os.ReadFile("/proc/self/mountinfo")
|
||||
if err != nil {
|
||||
return "", ""
|
||||
|
||||
Reference in New Issue
Block a user