Changeset d04a350 in mainline
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/metadata/foreign/geom/hr_g_mirror.c
r059885c rd04a350 178 178 memcpy(vol->in_mem_md, main_meta, sizeof(struct g_mirror_metadata)); 179 179 180 bool rebuild = false;180 bool rebuild_set = false; 181 181 182 182 uint8_t index = 0; … … 192 192 193 193 bool invalidate = false; 194 bool rebuild_this_ext = false; 194 195 195 196 if (iter_meta->md_dflags & G_MIRROR_DISK_FLAG_DIRTY) … … 200 201 if (iter_meta->md_dflags & G_MIRROR_DISK_FLAG_SYNCHRONIZING && 201 202 !invalidate) { 202 if (rebuild ) {203 if (rebuild_set) { 203 204 HR_DEBUG("only 1 rebuilt extent allowed"); 204 205 rc = EINVAL; 205 206 goto error; 206 207 } 207 rebuild = true; 208 rebuild_set = true; 209 rebuild_this_ext = true; 208 210 vol->rebuild_blk = iter_meta->md_sync_offset; 209 211 } 210 212 211 if (!rebuild && !invalidate)213 if (!rebuild_this_ext && !invalidate) 212 214 vol->extents[index].state = HR_EXT_ONLINE; 213 else if (rebuild && !invalidate)215 else if (rebuild_this_ext && !invalidate) 214 216 vol->extents[index].state = HR_EXT_REBUILD; 215 217 else
Note:
See TracChangeset
for help on using the changeset viewer.