mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 03:47:05 -05:00
Reserve snapraid- prefix for native ZFS snapshots and introduce fssnapshot_path
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
This commit is contained in:
parent
c8615f02a3
commit
a2626b6fc6
4 changed files with 56 additions and 14 deletions
|
|
@ -6036,10 +6036,9 @@ static int state_snapshot_dir(struct fssnapshot_struct* fss, const char* name, s
|
|||
|
||||
if (disk) {
|
||||
char vol[PATH_MAX];
|
||||
pathcpy(vol, sizeof(vol), fss->snapshot_dir);
|
||||
pathcat(vol, sizeof(vol), name);
|
||||
pathcatc(vol, sizeof(vol), '/');
|
||||
pathcat(vol, sizeof(vol), fss->sub_dir);
|
||||
|
||||
if (fssnapshot_path(fss, name, vol, sizeof(vol)) != 0)
|
||||
return -1;
|
||||
|
||||
pathcpy(disk->dir, sizeof(disk->dir), vol);
|
||||
disk->dir_device = st.st_dev;
|
||||
|
|
@ -6245,10 +6244,8 @@ void state_snapshot_write(struct snapraid_state* state, tommy_list* filterlist_d
|
|||
|
||||
/* set where to find deallocated files */
|
||||
char vol[PATH_MAX];
|
||||
pathcpy(vol, sizeof(vol), disk->fss.snapshot_dir);
|
||||
pathcat(vol, sizeof(vol), SNAPSHOT_STABLE "/");
|
||||
pathcat(vol, sizeof(vol), disk->fss.sub_dir);
|
||||
state_dealloc(state, vol, &disk->dealloclist);
|
||||
if (fssnapshot_path(&disk->fss, SNAPSHOT_STABLE, vol, sizeof(vol)) == 0)
|
||||
state_dealloc(state, vol, &disk->dealloclist);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue