From mboxrd@z Thu Jan 1 00:00:00 1970 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 C2876C433EF for ; Thu, 26 May 2022 08:54:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234528AbiEZIyH (ORCPT ); Thu, 26 May 2022 04:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232907AbiEZIyG (ORCPT ); Thu, 26 May 2022 04:54:06 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA7C27FF0 for ; Thu, 26 May 2022 01:54:05 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 8510568AA6; Thu, 26 May 2022 10:54:02 +0200 (CEST) Date: Thu, 26 May 2022 10:54:02 +0200 From: Christoph Hellwig To: Qu Wenruo Cc: Christoph Hellwig , Qu Wenruo , linux-btrfs@vger.kernel.org Subject: Re: [PATCH v2 4/7] btrfs: introduce new read-repair infrastructure Message-ID: <20220526085402.GA26954@lst.de> References: <20220526073022.GA25511@lst.de> <20220526074536.GA25911@lst.de> <20220526080056.GA26064@lst.de> <0cbbc3aa-a104-3d5e-ad13-a585533c9bcb@suse.com> <20220526081757.GA26392@lst.de> <78c1fb7f-60b7-b8fd-6e3c-c207122863aa@gmx.com> <20220526082851.GA26556@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, May 26, 2022 at 04:49:15PM +0800, Qu Wenruo wrote: >>>> Because that really sucks for the case where the whole I/O fails. >>>> Which is the common failure scenario. >>> >>> But it's just a performance problem, which is not that critical. >> >> I'm officially lost now. > > Why? If you care so much about the code simplicity, sector-by-sector is > the best. > If you care so much about the performance, the latest bitmap is the > best, no matter if it's the worst checker patter or not. Because you tell me that handling the most common and important case in read repair is just a performance issue, which you keep arguing for micro-optimizing a corner case. And not, for the case of failing a large bio (which arguably can only happen for buffered I/O at the moment, but that is another thing to look into) the bitmaps will only help you for up to 64 sectors. Way better than just doing a single sector synchronous I/O but not exactly nice while still being a fair amount of code compared to just doing variable sized synchronous I/O.