mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 17:36:26 -05:00
Uses inodes to identify files.
It allows to automatically handle file move or rename without the need to rehash the file.
This commit is contained in:
parent
8fb43ddefa
commit
de07510220
6 changed files with 183 additions and 39 deletions
5
sync.c
5
sync.c
|
|
@ -117,7 +117,10 @@ static int state_sync_process(struct snapraid_state* state, int parity_f, block_
|
|||
}
|
||||
|
||||
/* check if the file is changed */
|
||||
if (handle[j].st.st_size != block->file->size || handle[j].st.st_mtime != block->file->mtime) {
|
||||
if (handle[j].st.st_size != block->file->size
|
||||
|| handle[j].st.st_mtime != block->file->mtime
|
||||
|| handle[j].st.st_ino != block->file->inode
|
||||
) {
|
||||
fprintf(stderr, "Unexpected change at file '%s'.\n", handle[j].path);
|
||||
fprintf(stderr, "WARNING! You cannot modify data disk during a sync. Rerun the sync command when finished.\n");
|
||||
fprintf(stderr, "Stopping at block %u\n", i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue