mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 13:50:09 -05:00
Always get the SMART info after a spinup
This commit is contained in:
parent
60bd71d184
commit
4da11411f1
3 changed files with 49 additions and 0 deletions
|
|
@ -781,6 +781,22 @@ bail:
|
|||
}
|
||||
}
|
||||
|
||||
static void state_up(struct snapraid_state* state, tommy_list* low)
|
||||
{
|
||||
tommy_node* i;
|
||||
|
||||
(void)state;
|
||||
|
||||
for (i = tommy_list_head(low); i != 0; i = i->next) {
|
||||
devinfo_t* devinfo = i->data;
|
||||
|
||||
double afr = smart_afr(devinfo->smart, devinfo->model);
|
||||
|
||||
state_info_log(devinfo);
|
||||
state_smart_log(devinfo, afr);
|
||||
}
|
||||
}
|
||||
|
||||
static void state_probe(struct snapraid_state* state, tommy_list* low)
|
||||
{
|
||||
tommy_node* i;
|
||||
|
|
@ -1034,6 +1050,9 @@ void state_device(struct snapraid_state* state, int operation, tommy_list* filte
|
|||
|
||||
if (operation == DEVICE_PROBE)
|
||||
state_probe(state, &low);
|
||||
|
||||
if (operation == DEVICE_UP)
|
||||
state_up(state, &low);
|
||||
}
|
||||
|
||||
tommy_list_foreach(&high, free);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue