linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 3/5][v2] btrfs: handle ENOENT in btrfs_uuid_tree_iterate
Date: Mon, 9 Dec 2019 11:52:42 +0100	[thread overview]
Message-ID: <77246eeb-30d7-1779-0a4c-b8c055922b3d@suse.de> (raw)
In-Reply-To: <20191206163900.168465-1-josef@toxicpanda.com>

On 06/12/2019 17:39, Josef Bacik wrote:
> If we get an -ENOENT back from btrfs_uuid_iter_rem when iterating the
> uuid tree we'll just continue and do btrfs_next_item().  However we've
> done a btrfs_release_path() at this point and no longer have a valid
> path.  So increment the key and go back and do a normal search.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> v1->v2:
> - increase key.offset instead of key.objectid so we don't skip over a bunch of
>   keys.
> 
>  fs/btrfs/uuid-tree.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/btrfs/uuid-tree.c b/fs/btrfs/uuid-tree.c
> index 91caab63bdf5..76b84f2397b1 100644
> --- a/fs/btrfs/uuid-tree.c
> +++ b/fs/btrfs/uuid-tree.c
> @@ -324,6 +324,8 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info,
>  				}
>  				if (ret < 0 && ret != -ENOENT)
>  					goto out;
> +				key.offset++;
> +				goto again_search_slot;
>  			}
>  			item_size -= sizeof(subid_le);
>  			offset += sizeof(subid_le);
> 

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@suse.de                                +49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  parent reply	other threads:[~2019-12-09 10:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 14:37 [PATCH 0/5] Various fixes Josef Bacik
2019-12-06 14:37 ` [PATCH 1/5] btrfs: drop log root for dropped roots Josef Bacik
2019-12-06 15:02   ` Filipe Manana
2019-12-06 15:03   ` Nikolay Borisov
2019-12-09 17:39     ` David Sterba
2019-12-10 20:05     ` Josef Bacik
2019-12-10 21:19       ` Nikolay Borisov
2019-12-10 21:28         ` Josef Bacik
2019-12-13 15:17           ` David Sterba
2019-12-06 14:37 ` [PATCH 2/5] btrfs: don't BUG_ON in create_subvol Josef Bacik
2019-12-06 15:03   ` Filipe Manana
2019-12-09 10:49   ` Johannes Thumshirn
2019-12-06 14:37 ` [PATCH 3/5] btrfs: handle ENOENT in btrfs_uuid_tree_iterate Josef Bacik
2019-12-06 15:13   ` Filipe Manana
2019-12-06 15:17     ` Josef Bacik
2019-12-06 16:39   ` [PATCH 3/5][v2] " Josef Bacik
2019-12-06 16:46     ` Filipe Manana
2019-12-09 10:52     ` Johannes Thumshirn [this message]
2019-12-06 14:37 ` [PATCH 4/5] btrfs: skip log replay on orphaned roots Josef Bacik
2019-12-06 15:23   ` Filipe Manana
2019-12-06 14:37 ` [PATCH 5/5] btrfs: do not leak reloc root if we fail to read the fs root Josef Bacik
2019-12-06 15:24   ` Filipe Manana
2019-12-09 10:58   ` Johannes Thumshirn
2019-12-09 18:16 ` [PATCH 0/5] Various fixes 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=77246eeb-30d7-1779-0a4c-b8c055922b3d@suse.de \
    --to=jthumshirn@suse.de \
    --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).