mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: socketpair@gmail.com, David Sterba <dsterba@suse.com>,
	Chris Mason <mason@kernel.org>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] btrfs: tag tree block repair writes with REQ_META
Date: Sat, 7 Nov 2026 07:01:23 +1030	[thread overview]
Message-ID: <a09d7471-111e-42fd-8ae8-42afce6df000@suse.com> (raw)
In-Reply-To: <20261106-btrfs-sb-read-req-meta-v2-1-71c1afaf5c67@gmail.com>



在 2026/11/7 04:03, Mark Korenberg via B4 Relay 写道:
> From: Mark Korenberg <socketpair@gmail.com>
> 
> When a tree block read finds a bad copy, btrfs_repair_eb_io_failure()
> rewrites it from a good one through btrfs_repair_bbio_failure().  That
> rewrite is a plain REQ_OP_WRITE | REQ_SYNC, while the read that found
> the bad copy and all other tree block writes carry REQ_META.
> 
> Tag it with REQ_META when the bbio belongs to the btree inode.
> 
> Signed-off-by: Mark Korenberg <socketpair@gmail.com>

This part looks fine to me.

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

Thanks,
Qu

> ---
>   fs/btrfs/bio.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
> index 2e12a6d7e16f..efbce4d549ff 100644
> --- a/fs/btrfs/bio.c
> +++ b/fs/btrfs/bio.c
> @@ -951,7 +951,8 @@ int btrfs_repair_bbio_failure(struct btrfs_bio *bbio, const struct bvec_iter *or
>   	}
>   
>   	repair_bio = bio_alloc(smap.dev->bdev, max(1, length >> PAGE_SHIFT),
> -			       REQ_OP_WRITE | REQ_SYNC, GFP_NOFS);
> +			       REQ_OP_WRITE | REQ_SYNC |
> +			       (is_data_inode(inode) ? 0 : REQ_META), GFP_NOFS);
>   	repair_bio->bi_iter.bi_sector = smap.physical >> SECTOR_SHIFT;
>   	while (cur < length) {
>   		struct page *page = bio_iter_page(&bbio->bio, iter);
> 


  reply	other threads:[~2026-11-06 20:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 17:33 [PATCH v2 0/2] btrfs: tag tree block repair and RAID5/6 metadata I/O " Mark Korenberg via B4 Relay
2026-11-06 17:33 ` [PATCH v2 1/2] btrfs: tag tree block repair writes " Mark Korenberg via B4 Relay
2026-11-06 20:31   ` Qu Wenruo [this message]
2026-11-06 17:33 ` [PATCH v2 2/2] btrfs: raid56: pass REQ_META to per-device bios Mark Korenberg via B4 Relay
2026-11-06 20:26   ` Qu Wenruo

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=a09d7471-111e-42fd-8ae8-42afce6df000@suse.com \
    --to=wqu@suse.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@kernel.org \
    --cc=socketpair@gmail.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

all inboxes | Powered by JetHome®