From: Christoph Hellwig <hch@infradead.org>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Christoph Hellwig <hch@infradead.org>, Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org, David Sterba <dsterba@suse.com>
Subject: Re: [PATCH v7 03/13] btrfs: introduce a new helper to submit read bio for scrub
Date: Thu, 30 Mar 2023 14:50:13 -0700 [thread overview]
Message-ID: <ZCYEFZpypvVu2Cqs@infradead.org> (raw)
In-Reply-To: <152b4cb0-db59-24d5-b7ee-4ecc57480fbc@gmx.com>
On Thu, Mar 30, 2023 at 02:43:02PM +0800, Qu Wenruo wrote:
> > >
> > > The repair part would be the same as non-RAID56, as we only need to try
> > > the next mirror.
> >
> > Didn't we just agree that we do not need another magic helper?
>
> I have changed the code in github repo so the read path just goes
> btrfs_submit_bio().
>
> The patch adding bbio::fs_info and adds all the extra skips if bbio->inode
> is NULL:
> https://github.com/adam900710/linux/commit/23c5a1bf8ce98f205de574a15a0eb0518e56e80c
This seems to be a loose object in the repository. I looked at
d8c93c7078fa8d75bd3e12f8a30df072831f1c47 on the scrub_stripe branch
instead.
This looks generally good to me. A bunch of really minor nits:
In btrfs_check_read_bio the comment for the assert reads a little
strange to me, maybe
/* Read-repair requires the inode field to be set by the submitter. */
In btrfs_end_bio_work I'd rework the check to check the inode first,
and add brances around the & check and test positively, i.e.
if (bbio->inode && !(bbio->bio.bi_opf & REQ_META))
btrfs_check_read_bio()
else
bbio->end_io(bbio);
as that reads easier. It also matches what btrfs_raid56_end_io does.
In btrfs_submit_bio I'd add an empty line between the assert and
the while loop.
In alloc_new_bio I'd keep the setor initialization before the inode
and file_offset.
next prev parent reply other threads:[~2023-03-30 21:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 23:56 [PATCH v7 00/13] btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror() Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 01/13] btrfs: scrub: use dedicated super block verification function to scrub one super block Qu Wenruo
2023-03-29 0:29 ` Anand Jain
2023-03-29 9:20 ` Johannes Thumshirn
2023-03-29 9:53 ` Qu Wenruo
2023-03-29 23:25 ` Christoph Hellwig
2023-03-28 23:56 ` [PATCH v7 02/13] btrfs: introduce a new allocator for scrub specific btrfs_bio Qu Wenruo
2023-03-29 23:32 ` Christoph Hellwig
2023-03-29 23:39 ` Qu Wenruo
2023-03-29 23:47 ` Christoph Hellwig
2023-03-29 23:51 ` Qu Wenruo
2023-03-29 23:54 ` Christoph Hellwig
2023-03-28 23:56 ` [PATCH v7 03/13] btrfs: introduce a new helper to submit read bio for scrub Qu Wenruo
2023-03-29 23:33 ` Christoph Hellwig
2023-03-29 23:41 ` Qu Wenruo
2023-03-30 6:43 ` Qu Wenruo
2023-03-30 21:50 ` Christoph Hellwig [this message]
2023-03-28 23:56 ` [PATCH v7 04/13] btrfs: introduce a new helper to submit write " Qu Wenruo
2023-03-29 23:33 ` Christoph Hellwig
2023-03-30 6:47 ` Qu Wenruo
2023-03-30 22:13 ` Christoph Hellwig
2023-03-31 0:48 ` Qu Wenruo
2023-03-31 0:56 ` Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 05/13] btrfs: scrub: introduce the structure for new BTRFS_STRIPE_LEN based interface Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 06/13] btrfs: scrub: introduce a helper to find and fill the sector info for a scrub_stripe Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 07/13] btrfs: scrub: introduce a helper to verify one metadata Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 08/13] btrfs: scrub: introduce a helper to verify one scrub_stripe Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 09/13] btrfs: scrub: introduce the main read repair worker for scrub_stripe Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 10/13] btrfs: scrub: introduce a writeback helper " Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 11/13] btrfs: scrub: introduce error reporting functionality " Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 12/13] btrfs: scrub: introduce the helper to queue a stripe for scrub Qu Wenruo
2023-03-28 23:56 ` [PATCH v7 13/13] btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure 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=ZCYEFZpypvVu2Cqs@infradead.org \
--to=hch@infradead.org \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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