Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C2CBC77B61 for ; Tue, 28 Mar 2023 09:39:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232156AbjC1Jjq (ORCPT ); Tue, 28 Mar 2023 05:39:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjC1Jjp (ORCPT ); Tue, 28 Mar 2023 05:39:45 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6D3261A2 for ; Tue, 28 Mar 2023 02:39:35 -0700 (PDT) Received: from [0.0.0.0] ([149.28.201.231]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1My32F-1qfEY50l0Z-00zWzl; Tue, 28 Mar 2023 11:34:07 +0200 Message-ID: <2dfc49ef-e041-3efd-1c55-3685df22acb6@gmx.com> Date: Tue, 28 Mar 2023 17:34:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Christoph Hellwig , Qu Wenruo Cc: linux-btrfs@vger.kernel.org References: From: Qu Wenruo Subject: Re: [PATCH v2 00/12] btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror() In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:q86JIrmUMzWpHZP1nJFUv2qrLYpt8F4LianZfNkFJBbwy4cUXu4 JxKafn6cNr/IrFiI0ArHOcFAmgZMqFn2iXJF+mDVsRtxLgS2zSIGcQj08ag+lQnJKtHB9IA pB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v5uWXr6QE3Svn0ZFbkJJTbuuU856cMAQrQ6NPLlGT3zS fop/LDhIyAKHS63+XkUKuBGALGI= Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 2023/3/15 15:52, Christoph Hellwig wrote: > On Tue, Mar 14, 2023 at 03:34:55PM +0800, Qu Wenruo wrote: >> - More cleanup on RAID56 path >> Now RAID56 still uses some old facility, resulting things like >> scrub_sector and scrub_bio can not be fully cleaned up. > > I think converting the raid path is something that should be done > before merging the series, instead of leaving the parallel > infrastructure in. BTW, finally I have a local branch with the remaining path converted to the new infrastructure. The real problem is not converting the raid path. The patch doing the convert is pretty small, mostly thanks to the new scrub_stripe infrastructure, we can get rid of the complex scrub_parity and scrub_recover related code. fs/btrfs/scrub.c | 168 ++++++++++++++++++++++++++++++++++++++++++++--- fs/btrfs/scrub.h | 4 ++ 2 files changed, 162 insertions(+), 10 deletions(-) The problem is how I cleanup the existing scrub infrastructure (scrub_sector, scrub_block, scrub_recover, scrub_parity structures and involved calls). Currently I just do a single patch to cleanup, the result is super aweful: fs/btrfs/scrub.c | 2513 +--------------------------------------------- fs/btrfs/scrub.h | 4 - 2 files changed, 5 insertions(+), 2512 deletions(-) To be honest, I'm more concerned on how to split the cleanup patch. Thanks, Qu