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