aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/zfs_ctldir.h
diff options
context:
space:
mode:
authorRudd-O <[email protected]>2016-10-06 17:26:47 +0000
committerBrian Behlendorf <[email protected]>2016-10-06 10:26:47 -0700
commitb0f578a8073da49dd0af879944a1b8e8dfd6db56 (patch)
tree8ff70c9bbd1982cb99fdb55a30957f88a395b3ca /include/sys/zfs_ctldir.h
parent64c688d7161daac0a799b11b40cb791f6fd264db (diff)
Use a different technique to detect whether to mount-zfs
The behavior of the Dracut module was very wrong before. The correct behavior: initramfs should not run `zfs-mount` to completion if the two generator files exist. If, however, one of them is missing, it indicates one of three cases: * The kernel command line did not specify a root ZFS file system, and another Dracut module is already handling root mount (via systemd). `mount-zfs` can run, but it will do nothing. * There is no systemd to run `sysroot.mount` to begin with. `mount-zfs` must run. * The root parameter is zfs:AUTO, which cannot be run in sysroot.mount. `mount-zfs` must run. In any of these three cases, it is safe to run `zfs-mount` to completion. `zfs-mount` must also delete itself if it determines it should not run, or else Dracut will do the insane thing of running it over and over again. Literally, the definition of insanity, doing the same thing that did not work before, expecting different results. Doing that may have had a great result before, when we had a race between devices appearing and pools being mounted, and `mount-zfs` was tasked with the full responsibility of importing the needed pool, but nowadays it is wrong behavior and should be suppressed. I deduced that self-deletion was the correct thing to do by looking at other Dracut code, because (as we all are very fully aware of) Dracut is entirely, ahem, "implementation-defined". Tested-by: @wphilips Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Manuel Amador (Rudd-O) <[email protected]> Closes #5157 Closes #5204
Diffstat (limited to 'include/sys/zfs_ctldir.h')
0 files changed, 0 insertions, 0 deletions