mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 01:46:32 -05:00
Check and report shared physical devices across array disks
This commit is contained in:
parent
ad165dfb67
commit
30aa997947
5 changed files with 119 additions and 32 deletions
|
|
@ -851,9 +851,7 @@ static int devtree(devinfo_t* parent, tommy_list* list)
|
|||
}
|
||||
|
||||
for (i = 0; i < vde->NumberOfDiskExtents; ++i) {
|
||||
devinfo_t* devinfo;
|
||||
|
||||
devinfo = calloc_nofail(1, sizeof(devinfo_t));
|
||||
devinfo_t* devinfo = calloc_nofail(1, sizeof(devinfo_t));
|
||||
|
||||
pathcpy(devinfo->name, sizeof(devinfo->name), parent->name);
|
||||
pathcpy(devinfo->smartctl, sizeof(devinfo->smartctl), parent->smartctl);
|
||||
|
|
@ -1747,10 +1745,14 @@ static int device_thread(tommy_list* list, void* (*func)(void* arg))
|
|||
return 0;
|
||||
}
|
||||
|
||||
int devquery(tommy_list* high, tommy_list* low, int operation)
|
||||
void devsync(tommy_list* high)
|
||||
{
|
||||
(void)high;
|
||||
}
|
||||
|
||||
int devquery(tommy_list* high, tommy_list* low)
|
||||
{
|
||||
tommy_node* i;
|
||||
void* (*func)(void* arg) = 0;
|
||||
|
||||
/* for each device */
|
||||
for (i = tommy_list_head(high); i != 0; i = i->next) {
|
||||
|
|
@ -1782,6 +1784,13 @@ int devquery(tommy_list* high, tommy_list* low, int operation)
|
|||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int devrun(tommy_list* low, int operation)
|
||||
{
|
||||
void* (*func)(void* arg) = 0;
|
||||
|
||||
switch (operation) {
|
||||
case DEVICE_UP : func = thread_spinup; break;
|
||||
case DEVICE_DOWN : func = thread_spindown; break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue