mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Report progress messages before filesystem snapshot operations
This commit is contained in:
parent
1c9e5df479
commit
5827c967a3
1 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue