public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Hellwig <hch@lst.de>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>, Qu Wenruo <wqu@suse.com>
Cc: Naohiro Aota <naohiro.aota@wdc.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 12/12] btrfs: stop using the btrfs_bio saved iter in index_rbio_pages
Date: Fri, 8 Apr 2022 15:37:49 +0800	[thread overview]
Message-ID: <8c68813e-3103-c8d4-b77c-10a424b5b387@gmx.com> (raw)
In-Reply-To: <20220408050839.239113-13-hch@lst.de>



On 2022/4/8 13:08, Christoph Hellwig wrote:
> The bios added to ->bio_list are the original bios fed into
> btrfs_map_bio, which are never advanced.  Just use the iter in the
> bio itself.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Qu Wenruo <wqu@suse.com>

In fact, the bio split at btrfs_map_bio() time will make all endio
functions to only utilize btrfs_bio::iter.
Thus bi_iter will be even less utilized.

Thanks,
Qu

> ---
>   fs/btrfs/raid56.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
> index 1ab77d658bf15..adc62a7352b82 100644
> --- a/fs/btrfs/raid56.c
> +++ b/fs/btrfs/raid56.c
> @@ -1134,9 +1134,6 @@ static void index_rbio_pages(struct btrfs_raid_bio *rbio)
>   		stripe_offset = start - rbio->bioc->raid_map[0];
>   		page_index = stripe_offset >> PAGE_SHIFT;
>
> -		if (bio_flagged(bio, BIO_CLONED))
> -			bio->bi_iter = btrfs_bio(bio)->iter;
> -
>   		bio_for_each_segment(bvec, bio, iter) {
>   			rbio->bio_pages[page_index + i] = bvec.bv_page;
>   			i++;

  reply	other threads:[~2022-04-08  7:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  5:08 cleanup btrfs bio handling, part 1 v2 Christoph Hellwig
2022-04-08  5:08 ` [PATCH 01/12] btrfs: refactor __btrfsic_submit_bio Christoph Hellwig
2022-04-08  7:22   ` Qu Wenruo
2022-04-08  5:08 ` [PATCH 02/12] btrfs: split submit_bio from btrfsic checking Christoph Hellwig
2022-04-08  5:08 ` [PATCH 03/12] btrfs: simplify btrfsic_read_block Christoph Hellwig
2022-04-08  7:23   ` Qu Wenruo
2022-04-08  5:08 ` [PATCH 04/12] btrfs: simplify repair_io_failure Christoph Hellwig
2022-04-08  5:08 ` [PATCH 05/12] btrfs: simplify scrub_recheck_block Christoph Hellwig
2022-04-08  5:08 ` [PATCH 06/12] btrfs: simplify scrub_repair_page_from_good_copy Christoph Hellwig
2022-04-08  5:08 ` [PATCH 07/12] btrfs: move the call to bio_set_dev out of submit_stripe_bio Christoph Hellwig
2022-04-08  7:27   ` Qu Wenruo
2022-04-08 13:27     ` David Sterba
2022-04-08  5:08 ` [PATCH 08/12] btrfs: pass a block_device to btrfs_bio_clone Christoph Hellwig
2022-04-08  5:08 ` [PATCH 09/12] btrfs: initialize ->bi_opf and ->bi_private in rbio_add_io_page Christoph Hellwig
2022-04-08  5:08 ` [PATCH 10/12] btrfs: don't allocate a btrfs_bio for raid56 per-stripe bios Christoph Hellwig
2022-04-08  5:08 ` [PATCH 11/12] btrfs: don't allocate a btrfs_bio for scrub bios Christoph Hellwig
2022-04-08  5:08 ` [PATCH 12/12] btrfs: stop using the btrfs_bio saved iter in index_rbio_pages Christoph Hellwig
2022-04-08  7:37   ` Qu Wenruo [this message]
2022-04-08 16:00 ` cleanup btrfs bio handling, part 1 v2 David Sterba
  -- strict thread matches above, loose matches on Subject: below --
2022-04-04  4:45 cleanup btrfs bio handling, part 1 Christoph Hellwig
2022-04-04  4:45 ` [PATCH 12/12] btrfs: stop using the btrfs_bio saved iter in index_rbio_pages Christoph Hellwig

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=8c68813e-3103-c8d4-b77c-10a424b5b387@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --cc=wqu@suse.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