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 413B4C74A5B for ; Thu, 30 Mar 2023 06:43:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229678AbjC3GnU (ORCPT ); Thu, 30 Mar 2023 02:43:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbjC3GnS (ORCPT ); Thu, 30 Mar 2023 02:43:18 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D4540D9 for ; Wed, 29 Mar 2023 23:43:15 -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 1M7b2T-1pn07j0bV7-007zR6; Thu, 30 Mar 2023 08:43:06 +0200 Message-ID: <152b4cb0-db59-24d5-b7ee-4ecc57480fbc@gmx.com> Date: Thu, 30 Mar 2023 14:43:02 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v7 03/13] btrfs: introduce a new helper to submit read bio for scrub Content-Language: en-US To: Christoph Hellwig , Qu Wenruo Cc: linux-btrfs@vger.kernel.org, David Sterba References: <79a6604bc9ccb2a6e1355f9d897b45943c6bcca9.1680047473.git.wqu@suse.com> From: Qu Wenruo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:j+7XsolGksUHfqEP7ud7ilvs0OQNcJiW44dWgRP75fBKyxc3hhZ phvFczvd4k3WPGnTGAoGf6glEyMVSG/7Rz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hM+hM4jssHq0E7Agr+rnlB2o6lfryGvU0uNNAnVtzerhfWVL5UvCRbpDZCB 9jA0pmDmQlTWebPnmFCkimOvIzc= Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 2023/3/30 07:33, Christoph Hellwig wrote: > On Wed, Mar 29, 2023 at 07:56:10AM +0800, Qu Wenruo wrote: >> The new helper, btrfs_submit_scrub_read(), would be mostly a subset of >> btrfs_submit_bio(), with the following limitations: >> >> - Only supports read >> - @mirror_num must be > 0 >> - No read-time repair nor checksum verification >> - The @bbio must not cross stripe boundary >> >> This would provide the basis for unified read repair for scrub, as we no >> longer needs to handle RAID56 recovery all by scrub, and RAID56 data >> stripes scrub can share the same code of read and repair. >> >> 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 Mind to give it a preview? Thanks, Qu