btrfs-progs: check: don't check nbytes on unlinked files
We don't update the inode when evicting it, so the nbytes will be wrong in between transaction commits. This isn't a problem, stop complaining about it to make generic/269 stop randomly failing. The orphan outdated inodes can be still present but check will not skip them. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
50d2702e49
commit
73ff25c65d
|
@ -806,7 +806,8 @@ static void maybe_free_inode_rec(struct cache_tree *inode_cache,
|
|||
} else if (S_ISREG(rec->imode) || S_ISLNK(rec->imode)) {
|
||||
if (rec->found_dir_item)
|
||||
rec->errors |= I_ERR_ODD_DIR_ITEM;
|
||||
if (rec->found_size != rec->nbytes)
|
||||
/* Orphan inodes don't have correct nbytes */
|
||||
if (rec->nlink > 0 && rec->found_size != rec->nbytes)
|
||||
rec->errors |= I_ERR_FILE_NBYTES_WRONG;
|
||||
if (rec->nlink > 0 && !no_holes &&
|
||||
(rec->extent_end < rec->isize ||
|
||||
|
|
Loading…
Reference in New Issue