-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
good first issueIssues that are good for learning the codebaseIssues that are good for learning the codebase
Milestone
Description
The utility function ensure_filesystem in the illumos-utils ZFS code has the intention of creating a ZFS fileysystem, unless it already exists. It first performs a zfs list via dataset_exists, then a zfs create. This is inherently racy. The zfs create command has a -p flag that will give us the behavior we want here:
-p Creates all the non-existing parent datasets. Datasets created in
this manner are automatically mounted according to the mountpoint
property inherited from their parent. Any property specified on
the command line using the -o option is ignored. If the target
filesystem already exists, the operation completes successfully.
We should switch to using zfs create -p here instead of listing the datasets first.
Per @smklein, this probably isn't a problem yet because we tend to have singletons controlling filesystem allocation. So probably not high priority for now.
Metadata
Metadata
Assignees
Labels
good first issueIssues that are good for learning the codebaseIssues that are good for learning the codebase