]> git.proxmox.com Git - mirror_zfs.git/commit
vdev_id: Fix PHY sorting
authorTony Hutter <hutter2@llnl.gov>
Fri, 29 Oct 2021 22:33:34 +0000 (15:33 -0700)
committerGitHub <noreply@github.com>
Fri, 29 Oct 2021 22:33:34 +0000 (15:33 -0700)
commit4d4998ea39a21e070e2c8dc7f5d2a33d3e6760f4
tree9b0ee0b35171d5ce368f32ba6b8c9d3c3551d4e1
parentd5a5ec46934c00d1c2e59ece2a32aad1ba9c982e
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
cmd/vdev_id/vdev_id