mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Fix spinup and spindown failure when skipping non-rotational devices
This commit is contained in:
parent
55f0644004
commit
175649e236
2 changed files with 12 additions and 4 deletions
|
|
@ -1584,7 +1584,7 @@ static void* thread_spinup(void* arg)
|
|||
|
||||
/* skip not rotational devices */
|
||||
if (devpower(devinfo->device, devinfo->name, devinfo->wfile) == 0)
|
||||
return (void*)-1;
|
||||
return 0;
|
||||
|
||||
start = os_tick_ms();
|
||||
|
||||
|
|
@ -1624,7 +1624,7 @@ static void* thread_spindown(void* arg)
|
|||
|
||||
/* skip not rotational devices */
|
||||
if (devpower(devinfo->device, devinfo->name, devinfo->wfile) == 0)
|
||||
return (void*)-1;
|
||||
return 0;
|
||||
|
||||
start = os_tick_ms();
|
||||
|
||||
|
|
@ -1648,6 +1648,10 @@ static void* thread_spindownifup(void* arg)
|
|||
uint64_t start;
|
||||
int power;
|
||||
|
||||
/* skip not rotational devices */
|
||||
if (devpower(devinfo->device, devinfo->name, devinfo->wfile) == 0)
|
||||
return 0;
|
||||
|
||||
start = os_tick_ms();
|
||||
|
||||
if (devdownifup(devinfo->device, devinfo->name, devinfo->smartctl, devinfo->smartctl_info, &power) != 0) {
|
||||
|
|
|
|||
|
|
@ -3475,7 +3475,7 @@ static void* thread_spinup(void* arg)
|
|||
|
||||
/* skip not rotational devices */
|
||||
if (devpower(devinfo->device) == 0)
|
||||
return (void*)-1;
|
||||
return 0;
|
||||
|
||||
start = os_tick_ms();
|
||||
|
||||
|
|
@ -3520,7 +3520,7 @@ static void* thread_spindown(void* arg)
|
|||
|
||||
/* skip not rotational devices */
|
||||
if (devpower(devinfo->device) == 0)
|
||||
return (void*)-1;
|
||||
return 0;
|
||||
|
||||
start = os_tick_ms();
|
||||
|
||||
|
|
@ -3549,6 +3549,10 @@ static void* thread_spindownifup(void* arg)
|
|||
uint64_t start;
|
||||
int power;
|
||||
|
||||
/* skip not rotational devices */
|
||||
if (devpower(devinfo->device) == 0)
|
||||
return 0;
|
||||
|
||||
start = os_tick_ms();
|
||||
|
||||
if (devdownifup(devinfo->device, devinfo->name, devinfo->smartctl, devinfo->smartctl_info, &power) != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue