HomeFreeBSD

fix a zfs boot regression introduced in r300117 by accident

Description

fix a zfs boot regression introduced in r300117 by accident

There is no reason to return non-zero value from zfs_probe_partition()
as that causes following partitions to not be probed for ZFS vdevs.
A particular scenario that I encountered is a GPT partitioned disk
where several partitions have freebsd-zfs type. A partition with a lower
index is used as a cache (l2arc) vdev and in that case case zfs_probe()
returned a non-zero status. That status was returned to ptable_iterate()
and caused it to abort the iteration. Because of that the subsequent
partitions were not probed and a root pool was not discovered resulting
in a boot failure.

While there fix the style for nearby return statements.

Approved by: re (kib)

Details

Provenance
avgAuthored on
Parents
rS301954: MFC 298039,298042
Branches
Unknown
Tags
Unknown