Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v8 00/12] btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror()
Date: Wed, 5 Apr 2023 19:11:49 +0200	[thread overview]
Message-ID: <20230405171149.GL19619@twin.jikos.cz> (raw)
In-Reply-To: <25f1df54-9abd-d4e0-7dba-9b341bc4ad6e@gmx.com>

On Tue, Apr 04, 2023 at 09:08:31AM +0800, Qu Wenruo wrote:
> 
> 
> On 2023/4/1 00:17, David Sterba wrote:
> > On Fri, Mar 31, 2023 at 09:20:03AM +0800, Qu Wenruo wrote:
> >> This series can be found in my github repo:
> >>
> >> https://github.com/adam900710/linux/tree/scrub_stripe
> > 
> > This also includes the cleanup branch so I'll use this as topic branch
> > in for-next.
> 
> Thanks for that.
> 
> Just some questions inspired by the series.
> 
> [WAY TO CLEANUP]
> Just want to ask what's the proper way to do the cleanup.
> 
> Christoph mentioned in other subsystems they accept huge cleanup as long 
> as it's only deleting code, while in my series I did the split to try 
> keep each cleanup small.

I've just finished final pass through the scrub series so I can give you
a fresh answer. The split was great and thank you for taking the time to
do it. I don't treat deleting code differently than adding code.
Deleting also affects functionality, we've seen a recent example when
deleting code broke the thread_pool mount option. The review question is
"does it still work as expected when this code is gone?". As an extreme
example imagine deleting a mutex, it will make things faster but also
wrong.

If there are other subsystems where deleting code is not taken seriously
the same way new code is then I have my doubts about the review quality.

> But the split itself sometimes introduced dead code which is only going 
> to be removed later, and most of the time, such new code makes no sense 
> other than for patch split.

The reason I ask for split is to let me maintain focus on what's being
changed, and with too many deleted lines it's easy to overlook something
or sipmly fatigue.  Which means the review would be useless.
The removal patches are over 3000 lines in total, separately a few
hundreds each and logically grouped.

Adding a few lines to avoid warnings or to making it compile is a small
cost and as you did it with the comments it's quite clear where it is
and why.

> So I'm wondering what's the proper way to do huge cleanup in btrfs.

As you did it in the scrub series is a great example to follow for next
time.

> [FUTURE SCRUB UPDATE]
> There are still something I may want to do improving scrub.
> 
> One such objective is to enhance RAID56 scrubbing.
> 
> In that case, what branch should I base my code on?
> Normally I would go misc-next, but the new scrub is only in for-next.

I'll move it to misc-next so you can start there.

      reply	other threads:[~2023-04-05 17:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31  1:20 [PATCH v8 00/12] btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror() Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 01/12] btrfs: scrub: use dedicated super block verification function to scrub one super block Qu Wenruo
2023-03-31  8:12   ` Johannes Thumshirn
2023-03-31  1:20 ` [PATCH v8 02/12] btrfs: introduce btrfs_bio::fs_info member Qu Wenruo
2023-03-31  8:13   ` Johannes Thumshirn
2023-03-31  1:20 ` [PATCH v8 03/12] btrfs: introduce a new helper to submit write bio for repair Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 04/12] btrfs: scrub: introduce the structure for new BTRFS_STRIPE_LEN based interface Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 05/12] btrfs: scrub: introduce a helper to find and fill the sector info for a scrub_stripe Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 06/12] btrfs: scrub: introduce a helper to verify one metadata Qu Wenruo
2023-04-05 15:28   ` David Sterba
2023-04-05 23:44     ` Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 07/12] btrfs: scrub: introduce a helper to verify one scrub_stripe Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 08/12] btrfs: scrub: introduce the main read repair worker for scrub_stripe Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 09/12] btrfs: scrub: introduce a writeback helper " Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 10/12] btrfs: scrub: introduce error reporting functionality " Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 11/12] btrfs: scrub: introduce the helper to queue a stripe for scrub Qu Wenruo
2023-03-31  1:20 ` [PATCH v8 12/12] btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure Qu Wenruo
2023-03-31 16:17 ` [PATCH v8 00/12] btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror() David Sterba
2023-04-04  1:08   ` Qu Wenruo
2023-04-05 17:11     ` David Sterba [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=20230405171149.GL19619@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --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