+(** {3 Create ownership tables} *)
+
+type ownership
+
+val create_ownership : machine -> ownership
+ (** This creates the ownership tables (mapping disk blocks to the
+ ultimate filesystem, etc., which owns each one).
+ *)
+
+type owner =
+ [ `Filesystem of filesystem
+ | `Partitions of partitions
+ | `PhysicalVolume of pv ]
+
+val get_owners_lookup : machine -> ownership -> block_device ->
+ (Int63.t -> (owner * Int63.t) list)
+ (** [get_owners_lookup machine disk] returns a specialized
+ function for looking up owners (filesystems, etc.)
+ which reside on block device [disk].
+
+ [disk] must be a block device of the machine.
+
+ The specialized lookup function that is returned
+ can be called as [lookup offset] to look up the
+ owners of byte offset [offset].
+
+ Returns a list of [(owner, owner_offset)] where [owner]
+ is the filesystem, etc., and [owner_offset] is the byte
+ offset relative to the owner.
+
+ It is common for there to be multiple owners: for example
+ in the case where a filesystem is created on a partition,
+ both the filesystem ([`Filesystem fs]) and
+ partition scheme ([`Partitions parts]) will be returned.
+
+ The specialized function is efficient. {!create_ownership}
+ creates a tree structure which allows ownership to be determined
+ in just a few steps. *)
+
+val offset_is_free : (owner * Int63.t) list -> bool
+ (** [offset_is_free owners] tests if the offset is free (unused).
+
+ If an offset is free, then it may be discarded without
+ changing the semantics of the disk image. In normal cases
+ this extends to the end of the current block, but blocksize
+ will differ for each owner, so what this really means is
+ tricky in practice. *)
+