mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-25 18:40:19 -04:00
Fail sync if snapshot setup fails on a supported filesystem
This commit is contained in:
parent
3f0c194a2f
commit
7b7a2d5d00
3 changed files with 9 additions and 4 deletions
|
|
@ -437,7 +437,7 @@ int fssnapshot_mount(const char* dir, struct fssnapshot_struct* fss)
|
|||
if (wcscmp(fs_name, L"NTFS") == 0)
|
||||
magic = WINDOWS_NTFS_MAGIC;
|
||||
else
|
||||
return -1; /* support only NTFS */
|
||||
return 1; /* support only NTFS */
|
||||
|
||||
/*
|
||||
* Obtain the canonical volume name: \\?\Volume{GUID}\
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -2177,12 +2177,12 @@ int fssnapshot_mount(const char* path, struct fssnapshot_struct* fss)
|
|||
} else if (sfs.f_type == ZFS_SUPER_MAGIC) {
|
||||
return fssnapshot_zfs(path, ZFS_SUPER_MAGIC, fss);
|
||||
} else {
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
(void)path;
|
||||
(void)fss;
|
||||
return -1;
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue