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 1F872C433FE for ; Mon, 25 Apr 2022 09:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232518AbiDYJWZ (ORCPT ); Mon, 25 Apr 2022 05:22:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbiDYJWQ (ORCPT ); Mon, 25 Apr 2022 05:22:16 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5AA322BE7 for ; Mon, 25 Apr 2022 02:18:41 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 0878968D17; Mon, 25 Apr 2022 11:18:39 +0200 (CEST) Date: Mon, 25 Apr 2022 11:18:36 +0200 From: Christoph Hellwig To: Qu Wenruo Cc: Christoph Hellwig , Josef Bacik , David Sterba , Qu Wenruo , Naohiro Aota , linux-btrfs@vger.kernel.org Subject: Re: [PATCH 10/10] btrfs: do not allocate a btrfs_bio for low-level bios Message-ID: <20220425091836.GB16446@lst.de> References: <20220425075418.2192130-1-hch@lst.de> <20220425075418.2192130-11-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 Mon, Apr 25, 2022 at 05:01:11PM +0800, Qu Wenruo wrote: >> struct btrfs_io_stripe { >> struct btrfs_device *dev; >> - u64 physical; >> + union { >> + u64 physical; /* block mapping */ >> + struct btrfs_io_context *bioc; /* for the endio handler */ >> + }; >> u64 length; /* only used for discard mappings */ > > Isn't @length a better candidate? > > Since it's only used for discard. I have anoter patch to be sumitted that removes length entirely by not using btrfs_io_stripe for discards.