Locking composefs images with flock

For the last couple of weeks, I&rsquo;ve been working on garbage collection for composefs repositories. A composefs repository is a content-addressed object store, and it needs a garbage collector to reclaim space from images that are no longer referenced. The hard part is deciding what &ldquo;referenced&rdquo; actually means when an image has no ref in the repository but is mounted somewhere,…