Try underlying NVME device first

This commit is contained in:
Jamie Cameron
2018-11-21 19:09:53 -08:00
parent 2e6020d28e
commit fe3cf26889

View File

@@ -279,6 +279,12 @@ Returns a hash reference containing the status of some drive
sub get_drive_status
{
local ($device, $drive) = @_;
if ($device =~ /^(\/dev\/nvme\d+)n\d+$/) {
# For NVME drives, try the underlying device first
local $nd = $1;
local $st = &get_drive_status($nd, $drive);
return $st if ($st->{'support'} && $st->{'enabled'});
}
local %rv;
local $qd = quotemeta($device);
local $extra_args = &get_extra_args($device, $drive);