HomeFreeBSD

vdev_id: Fix PHY sorting

Description

vdev_id: Fix PHY sorting

One of our developers noticed a bug in vdev_id where we were incorrectly
sorting PHYs using alphabetical sorting (which usually works) instead
of natural sorting (-v). For example:

[port-0:0]# ls -d phy*
phy-0:10 phy-0:11 phy-0:8 phy-0:9

[port-0:0]# ls -vd phy*
phy-0:8 phy-0:9 phy-0:10 phy-0:11

This fixes the issue.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #12699

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Oct 29 2021, 10:33 PM
Parents
rGd11b03ed81a0: vdev_id: Fix enclosure_symlinks feature
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGdb9e1c907a5b: vdev_id: Fix PHY sorting (authored by Tony Hutter <hutter2@llnl.gov>).Nov 2 2021, 11:31 PM