salvage: hook delete path through nwsalvage
All checks were successful
Source release / source-package (push) Successful in 55s
All checks were successful
Source release / source-package (push) Successful in 55s
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
typedef int (*nwsalvage_ini_getter)(int entry, char *str,
|
||||
size_t strsize, void *data);
|
||||
@@ -145,5 +146,14 @@ int nwsalvage_write_metadata(const char *metadata_path,
|
||||
const struct nwsalvage_deleted_entry *entry);
|
||||
int nwsalvage_read_metadata(const char *metadata_path,
|
||||
struct nwsalvage_metadata_entry *entry);
|
||||
/*
|
||||
* Capture a server-side delete before nw_unlink_node() would remove it.
|
||||
* Returns 0 when the file was moved to the recycle repository and metadata
|
||||
* was written. Returns 1 when salvage is disabled or the node is not
|
||||
* salvageable and the caller should continue with the normal unlink path.
|
||||
* Returns -1 on a real salvage failure; the caller should keep the live file.
|
||||
*/
|
||||
int nwsalvage_capture_node_delete(int volume, const char *unixname,
|
||||
const struct stat *stb);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user