Fail sync if snapshot setup fails on a supported filesystem

This commit is contained in:
Andrea Mazzoleni 2026-08-12 15:03:15 +02:00
parent b71996984f
commit b425ff3a4f
3 changed files with 9 additions and 4 deletions

View file

@ -5965,8 +5965,13 @@ int state_snapshot_scan(struct snapraid_state* state)
struct snapraid_disk* disk = i->data;
/* check if it supports snapshot */
if (fssnapshot_mount(disk->mount_point, &disk->fss) != 0)
int res = fssnapshot_mount(disk->mount_point, &disk->fss);
if (res > 0)
continue;
if (res < 0) {
log_fatal(EINTERNAL, "Failed to setup snapshot for disk '%s'.\n", disk->name);
return -1;
}
size_t root_len = strlen(disk->fss.root_dir);