summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
195d1d7)
In addition to closing mdfd, propagate helpers to manage file
descriptors across IncrementalScan().
Signed-off-by: Mateusz Grzonka <mateusz.grzonka@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
}
mdfd = open_dev(me->devnm);
}
mdfd = open_dev(me->devnm);
+ if (!is_fd_valid(mdfd))
continue;
if (!isdigit(me->metadata[0])) {
/* must be a container */
continue;
if (!isdigit(me->metadata[0])) {
/* must be a container */
if (st && st->ss->load_container)
ret = st->ss->load_container(st, mdfd, NULL);
if (st && st->ss->load_container)
ret = st->ss->load_container(st, mdfd, NULL);
if (!ret && st && st->ss->container_content) {
if (map_lock(&map))
pr_err("failed to get exclusive lock on mapfile\n");
if (!ret && st && st->ss->container_content) {
if (map_lock(&map))
pr_err("failed to get exclusive lock on mapfile\n");
continue;
}
if (md_array_active(mdfd)) {
continue;
}
if (md_array_active(mdfd)) {
continue;
}
/* Ok, we can try this one. Maybe it needs a bitmap */
continue;
}
/* Ok, we can try this one. Maybe it needs a bitmap */
int bmfd;
bmfd = open(mddev->bitmap_file, O_RDWR);
int bmfd;
bmfd = open(mddev->bitmap_file, O_RDWR);
+ if (is_fd_valid(bmfd)) {
added = ioctl(mdfd, SET_BITMAP_FILE, bmfd);
added = ioctl(mdfd, SET_BITMAP_FILE, bmfd);
}
if (c->verbose >= 0) {
if (added == 0)
}
if (c->verbose >= 0) {
if (added == 0)
}
map_free(mapl);
return rv;
}
map_free(mapl);
return rv;