Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10397454rwr; Fri, 12 May 2023 07:40:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5AZ4ybcTQOXG+d9bZemTydLGHiJnqszV7r1/wkbYYqFFTlAjlo65vHFy2zkiKelScYPR1y X-Received: by 2002:a17:902:cecf:b0:1ac:96e7:e97d with SMTP id d15-20020a170902cecf00b001ac96e7e97dmr16003449plg.67.1683902431905; Fri, 12 May 2023 07:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683902431; cv=none; d=google.com; s=arc-20160816; b=WSklebbB7JFU78e99BPobvulCwJVALUDVEFT9FLDMUjqg7iOUc6X3w/+lnHNZpIlSj DttyqYvZwOGXiYY6uyRvgnUHVdGU64eneAYDQ/FRPtyUV+o63ALc0HZ+NVVi6r61Wzrr ld3GBM7foeILcx0pjDCGEU8Brces6e4NTJS+7n2jGcfFd9ghchHQ2Y4nn1j6Uo/V5am5 9Typ0Zf3nW9hiBWFeUL08NRW3ybHdhKUjEG19WATzD3HIEt//X9mmaiCNE/pe0T3pAQ+ PoYEHK7NqmDabvvcMQ+t87Fgqus1OdJ6AE8nwDdToO6WO/KgtAi7EPxGOyzqpJy5PGnQ vclA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3NI8PblGX09aXcegfRrsRbp5Rk8EB7aSb1Q3zVJjhig=; b=cA5XIhLO5vReeqYqLZx/xYwgGjosvF9KFL2w6GCnrMH1EGUUCxV0Q6EdXBEGVST0yU MdjJXJaYn9PbS1lBIcMnSUHb5sZ06WbgFgGy982Wv0gsmALGQ7rNKD27NdxZ+Vi++sk+ OVSl/fekIhpwPhhv8VGGnrZp1WtcL7zzcc5YMuHve/2rFioEXA68SwYDNVGf5Y/zTCOZ /geQHTrpbxp4i3b+I/Yup3AQGoDhxgY/kwk+kdWwZByyIy/ZfQGuMBbrzz/pFrtnTx9F kxoZ1gLfuelNkkGaN4oDD/yWyQRjTunbV8poYHAwnWTExumXv2dI7Z6TwvixQY+6QCCp eLbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a170903024f00b001a63ba2c894si9951004plh.548.2023.05.12.07.40.18; Fri, 12 May 2023 07:40:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241162AbjELOfS (ORCPT + 99 others); Fri, 12 May 2023 10:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241039AbjELOfR (ORCPT ); Fri, 12 May 2023 10:35:17 -0400 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FFA610A2C for ; Fri, 12 May 2023 07:34:34 -0700 (PDT) Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-3f3a3a482e9so36041001cf.0 for ; Fri, 12 May 2023 07:34:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683902073; x=1686494073; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3NI8PblGX09aXcegfRrsRbp5Rk8EB7aSb1Q3zVJjhig=; b=IPCd3ndZIfz4FcGk80T/rOH/TKFxH8SEXqdxHeAn8Bg4ohuWzZqHdebWQNMeCjbn3w jE/5EiDHU4DcJiCVYoNYhhpaL0vPHdvqkKFngM5+J1Ima2zCb8G5alcn3OioVoUXXu23 MftIWEjjlvPsK0X41VV5vW8r8u0++LfkVxuHVl+ucrLG76a5psJMTnMYkhv+2r0+bPnR hLQfZ2vYXTW3dMfAYrbtDSK0Q5j1eURvVa0+fu/oVOJn5CJIhpK3lWq0idQrViAG6X5T JKZOov3xz9bn60+/l33HrbIvBQjihKbQeRTdmhtL3Vt1g2JtNYGdnLig7flRCTl69h1W zpDg== X-Gm-Message-State: AC+VfDzJIhYN4tmHqM4C51iXxxUxKlA257pl8hNnmSErjB7FB3tkaOJe nK1e154Z9PsqSHeWzvWwt0Na X-Received: by 2002:ac8:5787:0:b0:3f3:91bd:a46d with SMTP id v7-20020ac85787000000b003f391bda46dmr24764787qta.8.1683902073426; Fri, 12 May 2023 07:34:33 -0700 (PDT) Received: from localhost (pool-68-160-166-30.bstnma.fios.verizon.net. [68.160.166.30]) by smtp.gmail.com with ESMTPSA id f8-20020ae9ea08000000b0074d3233487dsm5387535qkg.114.2023.05.12.07.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 07:34:32 -0700 (PDT) Date: Fri, 12 May 2023 10:34:31 -0400 From: Mike Snitzer To: Sarthak Kukreti , Jens Axboe , Brian Foster , "Darrick J. Wong" Cc: Christoph Hellwig , Theodore Ts'o , "Michael S. Tsirkin" , Jason Wang , Bart Van Assche , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@redhat.com, Andreas Dilger , Stefan Hajnoczi , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Alasdair Kergon Subject: Re: [PATCH v6 4/5] dm-thin: Add REQ_OP_PROVISION support Message-ID: References: <20230420004850.297045-1-sarthakkukreti@chromium.org> <20230506062909.74601-1-sarthakkukreti@chromium.org> <20230506062909.74601-5-sarthakkukreti@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 11 2023 at 4:03P -0400, Sarthak Kukreti wrote: > On Tue, May 9, 2023 at 9:58 AM Mike Snitzer wrote: > > > > On Sat, May 06 2023 at 2:29P -0400, > > Sarthak Kukreti wrote: > > > > > dm-thinpool uses the provision request to provision > > > blocks for a dm-thin device. dm-thinpool currently does not > > > pass through REQ_OP_PROVISION to underlying devices. > > > > > > For shared blocks, provision requests will break sharing and copy the > > > contents of the entire block. Additionally, if 'skip_block_zeroing' > > > is not set, dm-thin will opt to zero out the entire range as a part > > > of provisioning. > > > > > > Signed-off-by: Sarthak Kukreti > > > --- > > > drivers/md/dm-thin.c | 70 +++++++++++++++++++++++++++++++++++++++++--- > > > 1 file changed, 66 insertions(+), 4 deletions(-) > > > > > > diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c > > > index 2b13c949bd72..3f94f53ac956 100644 > > > --- a/drivers/md/dm-thin.c > > > +++ b/drivers/md/dm-thin.c > > > @@ -4288,6 +4347,9 @@ static int thin_ctr(struct dm_target *ti, unsigned int argc, char **argv) > > > ti->max_discard_granularity = true; > > > } > > > > > > + ti->num_provision_bios = 1; > > > + ti->provision_supported = true; > > > + > > > > We need this in thin_ctr: ti->max_provision_granularity = true; > > > > More needed in the thin target than thin-pool; otherwise provision bio > > issued to thin devices won't be split appropriately. But I do think > > its fine to set in both thin_ctr and pool_ctr. > > > > Otherwise, looks good. > > > Thanks! I'll add it to the next iteration (in addition to any other > feedback that's added to v6). OK. I'll begin basing dm-thinp's WRITE_ZEROES support ontop of this series. > Given that this series covers multiple subsystems, would there be a > preferred way of queueing this for merge? I think it'd be OK for Jens to pick this series up and I'll rebase my corresponding DM tree once he does. In addition to Jens; Brian, Darrick and/or others: any chance you could review the block core changes in this series to ensure you're cool with them? Would be nice to get Sarthak review feedback so that hopefully his v7 can be the final revision. Thanks, Mike