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:
@@ -272,8 +272,8 @@ func TakeFolder(ctx context.Context, d *declaration.Declaration, id, path, warra
|
||||
f.Kept, f.How, f.At, f.Users = true, store.KeptByWarrant, started, nil
|
||||
}
|
||||
f.Warrant, f.By, f.Mount, f.Want, f.IDs = warrant, by, v.mount, users, want.ids
|
||||
// The warrant is for the filesystem it was carried out on (§8).
|
||||
f.TakenOn = v.mount
|
||||
// The warrant is for the filesystem it was carried out on (§8), named as a wait names it.
|
||||
f.Placed, f.TakenOn = PlacedID(v.mount), PlacedID(v.mount)
|
||||
f.Act = &store.KeptAct{Act: "take", Warrant: warrant, By: by, State: "running", Started: started}
|
||||
return true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user