From: Nikolay Borisov <nborisov@suse.com>
To: Josef Bacik <josef@toxicpanda.com>,
kernel-team@fb.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: don't check nbytes on unlinked files
Date: Fri, 9 Aug 2019 18:27:14 +0300 [thread overview]
Message-ID: <b48e52c5-46dd-17c6-e9ba-a933f3b83dda@suse.com> (raw)
In-Reply-To: <20190809131831.26370-1-josef@toxicpanda.com>
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@toxicpanda.com>
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 ||
>
next prev parent reply other threads:[~2019-08-09 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 13:18 [PATCH] btrfs-progs: don't check nbytes on unlinked files Josef Bacik
2019-08-09 15:27 ` Nikolay Borisov [this message]
2019-08-09 15:30 ` Josef Bacik
2019-08-10 1:06 ` Qu Wenruo
2019-08-26 18:34 ` David Sterba
2019-08-26 18:36 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b48e52c5-46dd-17c6-e9ba-a933f3b83dda@suse.com \
--to=nborisov@suse.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).