Persist reallocated mapping before parity resize in force-realloc sync

This commit is contained in:
Andrea Mazzoleni 2026-08-28 18:08:29 +02:00
parent f4a5b58c52
commit 408d4be1b5
5 changed files with 81 additions and 20 deletions

View file

@ -257,6 +257,7 @@ void log_close(const char* file)
#define OPT_TEST_SPEED_DISKS_NUMBER 308
#define OPT_TEST_SPEED_BLOCKS_SIZE 309
#define OPT_TEST_KILL_BEFORE_SYNC 310
#define OPT_TEST_KILL_AFTER_RESIZE 311
#if HAVE_GETOPT_LONG
@ -312,7 +313,10 @@ static struct option long_options[] = {
/* After syncing, do not write the new content file */
{ "test-kill-after-sync", 0, 0, OPT_TEST_KILL_AFTER_SYNC },
/* Do not execure syncing after writing the new initial content file */
/* Do not execute syncing after resizing parity files, before the normal post-resize content write */
{ "test-kill-after-resize", 0, 0, OPT_TEST_KILL_AFTER_RESIZE },
/* Do not execute syncing after writing the new initial content file */
{ "test-kill-before-sync", 0, 0, OPT_TEST_KILL_BEFORE_SYNC },
/* Exit with failure if after check/fix there ARE NOT unrecoverable errors. */
@ -860,6 +864,9 @@ int snapraid_main(int argc, char* argv[])
case OPT_TEST_KILL_AFTER_SYNC :
opt.kill_after_sync = 1;
break;
case OPT_TEST_KILL_AFTER_RESIZE :
opt.kill_after_resize = 1;
break;
case OPT_TEST_KILL_BEFORE_SYNC :
opt.kill_before_sync = 1;
break;