mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 22:00:19 -05:00
Handles correctly the diff case for filesystem without persistent inodes.
This commit is contained in:
parent
7f9ca6933e
commit
0e2a2b3f10
1 changed files with 8 additions and 5 deletions
13
scan.c
13
scan.c
|
|
@ -464,8 +464,11 @@ static void scan_file(struct snapraid_scan* scan, struct snapraid_state* state,
|
||||||
state->need_write = 1;
|
state->need_write = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the inode is different same */
|
/* if the disk support persistent inodes */
|
||||||
if (file->inode != st->st_ino) {
|
if (!disk->has_not_persistent_inodes) {
|
||||||
|
/* if persistent inodes are supported, we are sure that the inode number */
|
||||||
|
/* is now different, because otherwise the file would have been found */
|
||||||
|
/* when searching by inode. */
|
||||||
/* if the inode is different, it means a rewritten file with the same path */
|
/* if the inode is different, it means a rewritten file with the same path */
|
||||||
/* like when restoring a backup that restores also the timestamp */
|
/* like when restoring a backup that restores also the timestamp */
|
||||||
++scan->count_restore;
|
++scan->count_restore;
|
||||||
|
|
@ -490,9 +493,9 @@ static void scan_file(struct snapraid_scan* scan, struct snapraid_state* state,
|
||||||
/* we have to save the new inode */
|
/* we have to save the new inode */
|
||||||
state->need_write = 1;
|
state->need_write = 1;
|
||||||
} else {
|
} else {
|
||||||
/* this is the equal case when persistent inodes are not supported */
|
/* otherwise it's the case of not persistent inode, where doesn't */
|
||||||
assert(disk->has_not_persistent_inodes);
|
/* matter if the inode is different or equal, because they have no */
|
||||||
|
/* meaning, and then we don't even save them */
|
||||||
++scan->count_equal;
|
++scan->count_equal;
|
||||||
|
|
||||||
if (state->opt.gui) {
|
if (state->opt.gui) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue