struct supertype *container)
{
/* Of interest here are:
- * - if a new device has been added to the container, we
+ * - if a new device has been added to the container, we
* add it to the array ignoring any metadata on it.
* - if a device has been removed from the container, we
* remove it from the device list and update the metadata.
char buf[64];
int frozen;
struct supertype *container = a->container;
+ unsigned long long int component_size = 0;
if (container == NULL)
/* Raced with something */
a->info.array.raid_disks = mdstat->raid_disks;
// MORE
+ if (sysfs_get_ll(&a->info, NULL, "component_size", &component_size) >= 0)
+ a->info.component_size = component_size << 1;
+
/* honor 'frozen' */
if (sysfs_get_str(&a->info, NULL, "metadata_version", buf, sizeof(buf)) > 0)
frozen = buf[9] == '-';
GET_LEVEL|GET_CHUNK|GET_DISKS|GET_COMPONENT|
GET_DEGRADED|GET_DEVS|GET_OFFSET|GET_SIZE|GET_STATE);
-
if (!mdi)
return;
new = xcalloc(1, sizeof(*new));
* manage this instance
*/
if (!aa_ready(new) || container->ss->open_new(container, new, inst) < 0) {
- fprintf(stderr, "mdmon: failed to monitor %s\n",
+ pr_err("failed to monitor %s\n",
mdstat->metadata_version);
new->container = NULL;
free_aa(new);
if (msg->len == 0) { /* ping_monitor */
int cnt;
-
+
cnt = monitor_loop_cnt;
if (cnt & 1)
cnt += 2; /* wait until next pselect */