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 7380DC433EF for ; Mon, 6 Jun 2022 06:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230158AbiFFGbL (ORCPT ); Mon, 6 Jun 2022 02:31:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230058AbiFFGa4 (ORCPT ); Mon, 6 Jun 2022 02:30:56 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61BF6BFE3 for ; Sun, 5 Jun 2022 23:30:54 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 3062868AA6; Mon, 6 Jun 2022 08:30:50 +0200 (CEST) Date: Mon, 6 Jun 2022 08:30:50 +0200 From: Christoph Hellwig To: Qu Wenruo Cc: Christoph Hellwig , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Subject: Re: [PATCH 3/3] btrfs: pass the btrfs_bio_ctrl to submit_one_bio Message-ID: <20220606063050.GA2308@lst.de> References: <20220603071103.43440-1-hch@lst.de> <20220603071103.43440-4-hch@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 Sun, Jun 05, 2022 at 06:31:18AM +0800, Qu Wenruo wrote: > In fact the only call sites really caring num_mirror is the metadata > read path (as it doesn't rely on the read-repair code, since metadata > has inline csum and it has a different validation condition). > > It may be a good idea to make a union for btrfs_bio, to contain all the > needed info for metadata verification (btrfs_key, transid, level), so > that we can get rid of the num_mirror parameter for submit_extent_page() > completely. My idea was to pass that in structure in bio->bi_private. But that is just thought for now, I've not tried to actually implement it yet.