Backend support for simultaneous read-only dataset access.
Any number of users/experiments can mount a given dataset (given that they have permission) in read-only mode. Attempts to mount RW will fail if the dataset is currently in use. Attempts to mount RO while the dataset is in use RW are also prohibited. Under the hood, iSCSI lease exports (targets) are now managed per-lease instead of per-experiment. The set of authorized initiators (based on network) is manipulated as consumers come and go. When the last consumer goes, the export is torn down. Likewise, if there are no current consumers, a new consumer will cause an iSCSI export to be created for the lease. Also included in this commit is a small tweak to implicit lease permissions.
Showing with 232 additions and 86 deletions