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 4244DC433F5 for ; Thu, 26 May 2022 08:01:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346526AbiEZIBC (ORCPT ); Thu, 26 May 2022 04:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232951AbiEZIBB (ORCPT ); Thu, 26 May 2022 04:01:01 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0CE33342 for ; Thu, 26 May 2022 01:01:00 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id DC15668AA6; Thu, 26 May 2022 10:00:56 +0200 (CEST) Date: Thu, 26 May 2022 10:00:56 +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: <20220526080056.GA26064@lst.de> References: <531d3865-eb5b-d114-9ff2-c1b209902262@suse.com> <20220526073022.GA25511@lst.de> <20220526074536.GA25911@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 03:52:03PM +0800, Qu Wenruo wrote: > > > On 2022/5/26 15:45, Christoph Hellwig wrote: >> On Thu, May 26, 2022 at 03:37:47PM +0800, Qu Wenruo wrote: >>> Rare case doesn't mean it won't happen. >>> >>> We still need to address it anyway. >> >> address != build overly complicated code to optimize for it >> > Well, using seemly simple code, but can lead to read way more loops and way > more data to read, is neither a good way. Again, having checkered corruption is an extremely unlikely event. I'd rather deal with it by doing more reads than code complexity.