mirror_zfs/contrib
Damian Szuberski 35d81a75a8
initramfs: use mount.zfs instead of mount
A followup to d7a67402a8

For `mount -t zfs -o opts ds mp` command line
some implementations of `mount(8)`, e. g. Busybox in Debian
work as follows:

```
newfstatat(AT_FDCWD, "ds", 0x7fff826f4ab0, 0) = -1
mount("ds", "mp", "zfs", MS_SILENT, NULL) = 0
```

The logic above skips completely `mount.zfs` and prevents us
from reading filesystem properties and applying mount options.

For comparison, the coreutils `mount(8)` implementation does:

```
openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_CLOEXEC) = 3
// figure out that zfs is a `nodev` filesystem and look for a helper
newfstatat(AT_FDCWD, "/sbin/mount.zfs" ...) = 0
execve("/sbin/mount.zfs" ...) = 0
```

Using `mount.zfs` in initramfs would help circumvent deficiencies
of some of `mount(8)` implementations. `mount -t zfs` translates
to `mount.zfs` invocation, except for cases when explicitly disabled
by `-i`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #13305
2022-04-11 15:51:23 -07:00
..
bash_completion.d Add --enable=all to ShellCheck by default 2022-02-07 11:59:09 -08:00
bpftrace Add --enable=all to ShellCheck by default 2022-02-07 11:59:09 -08:00
dracut contrib/dracut: README: note rootfstype=zfs 2022-03-03 10:45:31 -08:00
initramfs initramfs: use mount.zfs instead of mount 2022-04-11 15:51:23 -07:00
intel_qat Add intel_QAT patches 2020-09-30 13:17:30 -07:00
pam_zfs_key Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
pyzfs tests: clean out more temporary files 2022-04-01 18:03:21 -07:00
zcp Fix contrib/zcp/Makefile.am 2019-10-30 12:37:49 -07:00
Makefile.am Add --enable=all to ShellCheck by default 2022-02-07 11:59:09 -08:00