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 D0572C678D4 for ; Fri, 3 Mar 2023 14:17:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231263AbjCCORx (ORCPT ); Fri, 3 Mar 2023 09:17:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbjCCORu (ORCPT ); Fri, 3 Mar 2023 09:17:50 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0245A5D447 for ; Fri, 3 Mar 2023 06:17:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bnOlzx3on2L0l7VXSRvHxuGLzFz4AD99K/HPQKfTuaA=; b=qGIkNBogQCSfhc1vxZ8cK9Upar orpKEsm1poO4/l74YNXTT7AkHkj1cIka/1xGaUghwziaobnZe1mu9qL/jVkT1s8Qjc4fSrdGaolQS NFT9+yaL2QHuWGIsSl9WWtX2LKSNR0oeQtSrYW19XRTwLg2EL/ZBazayIDdGCFsamHLgtTuaCscOU RRxRJj+8VbKsxZ0R4sXAtwKD+Drl9nebPkTou9P0yk565lR+nU5eB+9Ar1U20lFcvRXyH96dsi59V G2k69V729mR3WCDOjSqfKez3CYJBGiDu/wxoE2S9boBvR6/hk3KbbdTvtbMkZMFlEmoUGpy+q940L lcuQXvWg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pY6E9-006aRn-Dj; Fri, 03 Mar 2023 14:17:41 +0000 Date: Fri, 3 Mar 2023 06:17:41 -0800 From: "hch@infradead.org" To: Johannes Thumshirn Cc: Qu Wenruo , "hch@infradead.org" , David Sterba , "linux-btrfs@vger.kernel.org" , Josef Bacik , Christoph Hellwig , Damien Le Moal Subject: Re: [PATCH v7 04/13] btrfs: add support for inserting raid stripe extents Message-ID: References: <94293952cdc120b46edf82672af874b0877e1e83.1677750131.git.johannes.thumshirn@wdc.com> <3e2d5ede-fb00-3aa8-e55e-d088b8df9e60@gmx.com> <6eabe69c-3abe-255b-797f-7917cd6a33cd@gmx.com> <7bd4ce91-58e6-f68b-6d69-3f9deff39ff5@wdc.com> <48acd511-7f69-4c42-44ea-a39973d57c98@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Fri, Mar 03, 2023 at 11:15:00AM +0000, Johannes Thumshirn wrote: > There's two possibilities how to handle it: > 1) Have a common workfn that handles all the calls in the correct order > 2) Do the RST update in btrfs_finish_ordered_io() > > To me both are valuable options, so I don't care. Both need a bit of > preparation work before, but that's the nature of the beast. > > For 2) we need a pointer to the bioc in ordered_extent, so we need to > make sure the lifetimes are in sync. Or the other way around, have > ordered_stripe hold enough information for the RST updates and the > end_io handler insert it in the ordered_stripe (that needs to be > passed into the bioc or bbio). > > *Iff* I interpret Christoph's proposal in [1] correctly, options 1) is > easier to implement. 1 is probably easier, and should be done for other reasons. But 2 really feels like the right thing to do in addition to 1.