Fix incorrect split size

This fixes invalid size stored in the content file
generated by previous bad BETA versions.
This commit is contained in:
Andrea Mazzoleni 2016-07-25 22:23:32 +02:00
parent 501b1d7983
commit 2b31d23a10

View file

@ -482,6 +482,12 @@ int parity_chsize(struct snapraid_parity_handle* handle, struct snapraid_parity*
run = size;
} else {
run = split->size;
/* in some 11.0 BETA it was possible to get wrong split size, adjust them here */
if ((run & block_mask) != 0) {
log_fatal("WARNING! Shrink split '%s' to block alignment removing extra '%llu' bytes\n", split->path, run & block_mask);
run &= ~block_mask;
}
}
} else {
run = size;