Map the file at path as the cage, creating it if it does not exist. Fails if a file is already open, if the file is not a cage of this size, if its allocator state is out of range (a corrupt file), or if address space or the file cannot be had.
Several processes may open, and create, the same file at once: open() holds an flock() on the file while it checks, creates and formats it, so exactly one of them formats a new file and the others wait for it. open() fails if the file system does not support flock(). A file whose creator failed after making it full size is removed again (or truncated to empty, if it existed before), so a later open() can create it.
The checks look at the header, the span table and every free list, so open() takes time in proportion to the number of free blocks. Tag is not recorded in the file: any mapped_cage of the same SizeLog2 opens it.