linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Lu Fengqi <lufq.fnst@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Cc: Su Yue <suy.fnst@cn.fujitsu.com>
Subject: Re: [PATCH] btrfs: verify_dir_item fails in replay_xattr_deletes
Date: Wed, 2 Aug 2017 09:10:53 +0300	[thread overview]
Message-ID: <51264c09-335f-d6fe-4dc8-a757642024a8@suse.com> (raw)
In-Reply-To: <20170802053521.22053-1-lufq.fnst@cn.fujitsu.com>



On  2.08.2017 08:35, Lu Fengqi wrote:
> From: Su Yue <suy.fnst@cn.fujitsu.com>
> 
> In replay_xattr_deletes(), the argument @slot of verify_dir_item()
> should be variable @i instead of path->slots[0].


This was already fix in a patch sent by Filipe. Title is:

[PATCH] Btrfs: fix dir item validation when replaying xattr deletes

> 
> The bug causes failure of generic/066 and shared/002 in xfstest.
> dmesg:
> [12507.810781] BTRFS critical (device dm-0): invalid dir item name len: 10
> [12507.811185] BTRFS: error (device dm-0) in btrfs_replay_log:2475: errno=-5 IO failure (Failed to recover log tree)
> [12507.811928] BTRFS error (device dm-0): cleaner transaction attach returned -30
> [12507.821020] BTRFS error (device dm-0): open_ctree failed
> [12508.131526] BTRFS info (device dm-0): disk space caching is enabled
> [12508.132145] BTRFS info (device dm-0): has skinny extents
> [12508.136265] BTRFS critical (device dm-0): invalid dir item name len: 10
> [12508.136678] BTRFS: error (device dm-0) in btrfs_replay_log:2475: errno=-5 IO failure (Failed to recover log tree)
> [12508.137501] BTRFS error (device dm-0): cleaner transaction attach returned -30
> [12508.147982] BTRFS error (device dm-0): open_ctree failed
> 
> Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
> ---
>  fs/btrfs/tree-log.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index f20ef211a73d..3a11ae63676e 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -2153,8 +2153,7 @@ static int replay_xattr_deletes(struct btrfs_trans_handle *trans,
>  			u32 this_len = sizeof(*di) + name_len + data_len;
>  			char *name;
>  
> -			ret = verify_dir_item(fs_info, path->nodes[0],
> -					      path->slots[0], di);
> +			ret = verify_dir_item(fs_info, path->nodes[0], i, di);
>  			if (ret) {
>  				ret = -EIO;
>  				goto out;
> 

      reply	other threads:[~2017-08-02  6:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02  5:35 [PATCH] btrfs: verify_dir_item fails in replay_xattr_deletes Lu Fengqi
2017-08-02  6:10 ` Nikolay Borisov [this message]

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=51264c09-335f-d6fe-4dc8-a757642024a8@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lufq.fnst@cn.fujitsu.com \
    --cc=suy.fnst@cn.fujitsu.com \
    /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).