On 9.08.19 г. 16:18 ч., Josef Bacik wrote:
> 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.
>
> Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
We shouldn't be able to see unlinked files in the tree. At the very
least they should be orphans, no ? So why do we need this check ?
> ---
> check/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/check/main.c b/check/main.c
> index ca2ace10..45726e6e 100644
> --- a/check/main.c
> +++ b/check/main.c
> @@ -807,7 +807,7 @@ 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)
> + 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 ||
>