mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -05:00
Add Btrfs snapshot support for atomic sync and recovery consistency
This commit is contained in:
parent
d2c1029017
commit
cffd1ca15c
18 changed files with 1094 additions and 39 deletions
|
|
@ -112,6 +112,7 @@ struct snapraid_option {
|
|||
struct snapraid_state {
|
||||
struct snapraid_option opt; /**< Setup options. */
|
||||
int mapped_device; /**< Devices were already mapped */
|
||||
int snapshot; /**< Enable snapshot support */
|
||||
int filter_hidden; /**< Filter out hidden files. */
|
||||
uint64_t autosave; /**< Autosave after the specified amount of data. 0 to disable. */
|
||||
int need_write; /**< If the state is changed. */
|
||||
|
|
@ -420,6 +421,26 @@ void state_load_ignore_file(tommy_list* filter_list, const char* path, const cha
|
|||
*/
|
||||
void state_attr(struct snapraid_state* state, tommy_list* low);
|
||||
|
||||
/**
|
||||
* Create (or reuse existing) pending snapshots
|
||||
*/
|
||||
int state_snapshot_new(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Make the pending snapshots as stable
|
||||
*/
|
||||
int state_snapshot_commit(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Use the snapshots for reading only commands
|
||||
*/
|
||||
void state_snapshot_read(struct snapraid_state* state);
|
||||
|
||||
/**
|
||||
* Use the snapshots for the reading part (filtered out disks) of writing commands
|
||||
*/
|
||||
void state_snapshot_write(struct snapraid_state* state, tommy_list* filterlist_disk);
|
||||
|
||||
/****************************************************************************/
|
||||
/* misc */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue