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 CF9D4C77B75 for ; Fri, 12 May 2023 14:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241252AbjELOfX (ORCPT ); Fri, 12 May 2023 10:35:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241039AbjELOfU (ORCPT ); Fri, 12 May 2023 10:35:20 -0400 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E2AE1733 for ; Fri, 12 May 2023 07:34:34 -0700 (PDT) Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-3f38b7ca98aso57244611cf.1 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=GzHr/GokcxQd+6VYLNA40KXHOnoUvYwGP/qJLJiiDoNRQEZJJcfilGsOhWDt1yPn74 aynLJMFIW5amQpF6jonjTW77g0OYA71eohuCV/7pr96CyZlt5tGK6hEqR13m9xxeQDgY ptzukvWATRxkT6/h0syrtowiFglTsJXEFbqM9pgj4oezbtk/+uVCSyCv6oCSXFZAoFv6 hFneIGmjpdU7eyEyVwZX72007aVcdt5Jr3cmz59R7v9B+V30Sw/qtZXGZJcKXudM+tji w56SkzZPQqQFJP0NJ2ijLlEqnSF6Bj+G6TFD2TUOXMEzXolMefwKXI2BXr3jrQN1V0gC wwPQ== X-Gm-Message-State: AC+VfDwRJlapAb6OzIFesvQzrpPfYM9+aJvedp6/qGsrNOgg3GHrwosA AZQLSd9FNLN30RonWgTHanI0 X-Google-Smtp-Source: ACHHUZ4M++aZz9x/idwKRxoZtFqzxE+KBfxysydbhwDNajJOH3TAbWPaBDcqWbbuEGec9dZSQIGwHA== 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: Precedence: bulk List-ID: X-Mailing-List: linux-block@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