From 5827c967a3f7bd3cf5253587e94db20fb4a89de6 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 7 Sep 2026 22:34:53 +0200 Subject: [PATCH] Report progress messages before filesystem snapshot operations --- cmdline/state.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmdline/state.c b/cmdline/state.c index 0fd1c401..8996a0b9 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -6450,6 +6450,8 @@ int state_snapshot_scan(struct snapraid_state* state) return -1; } + msg_progress("Creating disk %s scan snapshot...\n", disk->name); + /* delete a potential previous scan snapshot */ if (state_snapshot_dir(&disk->fss, SNAPSHOT_SCAN, 0) == 0) { if (fssnapshot_delete(&disk->fss, SNAPSHOT_SCAN) != 0) { @@ -6464,8 +6466,6 @@ int state_snapshot_scan(struct snapraid_state* state) return -1; } - msg_progress("Created disk %s scan snapshot...\n", disk->name); - /* setup the snapshot in use */ if (state_snapshot_dir(&disk->fss, SNAPSHOT_SCAN, disk) != 0) { log_error(errno, "Error stating scan snapshot '%s'. %s.\n", disk->fss.snapshot_dir, strerror(errno)); @@ -6490,6 +6490,8 @@ int state_snapshot_pending(struct snapraid_state* state) if (disk->fss.magic == 0) continue; + msg_progress("Creating disk %s pending snapshot...\n", disk->name); + /* delete the pending snapshot only after the content state was saved */ if (state_snapshot_dir(&disk->fss, SNAPSHOT_PENDING, 0) == 0) { if (fssnapshot_delete(&disk->fss, SNAPSHOT_PENDING) != 0) { @@ -6506,8 +6508,6 @@ int state_snapshot_pending(struct snapraid_state* state) continue; } - msg_progress("Created disk %s pending snapshot...\n", disk->name); - /* setup the snapshot in use */ if (state_snapshot_dir(&disk->fss, SNAPSHOT_PENDING, disk) != 0) { log_error(errno, "Error stating pending snapshot '%s'. %s.\n", disk->fss.snapshot_dir, strerror(errno)); @@ -6533,6 +6533,8 @@ int state_snapshot_commit(struct snapraid_state* state) if (disk->fss.magic == 0) continue; + msg_progress("Committing disk %s stable snapshot...\n", disk->name); + /* delete a potential previous stable snapshot */ if (state_snapshot_dir(&disk->fss, SNAPSHOT_STABLE, 0) == 0) { if (fssnapshot_delete(&disk->fss, SNAPSHOT_STABLE) != 0) { @@ -6548,8 +6550,6 @@ int state_snapshot_commit(struct snapraid_state* state) error = -1; continue; } - - msg_progress("Committed disk %s stable snapshot...\n", disk->name); } return error;