Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5887040rwr; Mon, 1 May 2023 12:24:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/H5dSsaJRRtUeTsWBK7ba1mt5v/ozpTAJO1J34XkO9PfVt4MUV3oQTBJwiL3ABhSuQSUE X-Received: by 2002:a05:6a21:620a:b0:ef:cb4c:c24c with SMTP id wm10-20020a056a21620a00b000efcb4cc24cmr15398715pzb.23.1682969047861; Mon, 01 May 2023 12:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682969047; cv=none; d=google.com; s=arc-20160816; b=kquO4NpMfODDq3PppWbhhec5nPwHBcM+aTzJmmcpv2uOqpu6+j6JIm8ZCRWj5tJT22 JE0zwcuBwvHuLwpk4kRnipn9P6sRLyth/QQ9yTZSfDZkeDVCKR7mTqZyTbapUm+Ry5A7 axWmf1YlHwFrBHRl6lPnHTPW06hvLaYkHqKjiZn6f9pf6qSfbuaALdbL/wxT+eG/mXBm h2+XrOci5VJMS75C/hfHd6NEnTt/JRk2J8eWlcuDRMOjV2jXx4jWD7ewGhFXqJE7fTyC KKOJ86PqAqyntiKrEItJgMVGkemqqQ8LgpRYEgt+zJYMCd4G3+ek29IoDYubIEZZYNPB Bs0w== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=xta1ORIjLKUC6sudz2oVdR8ZSjIECo/NNbn+t5B7/30=; b=P7IvBgEJmxrOlyu6IHCdYzbJByS89+l4Mfn1W7aaU4COB7TLBhbK3XLj1xHZ6QM8zA PXHifNu8nfDu5rmWJhyVes4TTdSaymCcrRrUvx3I1P7w1OjBksZvEfCYK+Bi5NQSabdL kN5GteL1BAFS6IQGawV9lNQ0kYn/8Qii+YlcHesHmVz8nyRgbFVJRAgM5IzbfQ1wM0td QVgDsSlZETgpfszZNMm2B64jDK+mDcgPnCodHtw0wqKr+j2o+E3m0vRuMseKLFAmcu09 X4GEZavKxdPGV1Iqku7EZsDhf2ASIu8F2qp0z+BkWYL7YSvo5Xn6bLYm/B29cBmi4e2q hwPQ== 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 b5-20020a63d805000000b0050f692470fasi28307230pgh.301.2023.05.01.12.23.52; Mon, 01 May 2023 12:24:07 -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 S232575AbjEATQm (ORCPT + 99 others); Mon, 1 May 2023 15:16:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbjEATQl (ORCPT ); Mon, 1 May 2023 15:16:41 -0400 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02703173E for ; Mon, 1 May 2023 12:15:54 -0700 (PDT) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-74e07c2ee30so120721485a.1 for ; Mon, 01 May 2023 12:15:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682968553; x=1685560553; h=in-reply-to: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=xta1ORIjLKUC6sudz2oVdR8ZSjIECo/NNbn+t5B7/30=; b=N/HMzcQ7U9IUQx3P4RZ6yYMV9OQ57W1WL+5Ay1aRtdMbJC+idF/wHNwJYnzm+2c4P/ 7C2iHQPS5Y4f5dS2pLO4G3euQyZA19qf3VYlyCKkltwNWT6paeVMVGNe8gBz7/C8J4i+ Wt3oKTjQyp6ign6dAIyOStSxavZZTSII6sAnmfL+kZxRYBVJIXeGhU5dOOnc2zjSNaPc K6ArycTuSZXoi3/hfkxfFjxZGkAVP6P0hY83odjdZy50GifF8yiehXKfzf7peq/X4hZQ jSZDAMETRea0E4h7eCZVzXB1rkgxbIw+AJTzN+SAnttKx88D7b1lW3NayIK2Ey3500fN AxDA== X-Gm-Message-State: AC+VfDzjSqd5EPydrRtkCM8Fsx+252oeV3XX1U4AgEGtirBRhbO6gP3Y 7s+wnN/BW8CfKjjfXYkivMsI X-Received: by 2002:a05:6214:27e1:b0:5e3:d150:3168 with SMTP id jt1-20020a05621427e100b005e3d1503168mr1170309qvb.18.1682968553151; Mon, 01 May 2023 12:15:53 -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 o14-20020a0ccb0e000000b0061b62c1534fsm69023qvk.23.2023.05.01.12.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:15:52 -0700 (PDT) Date: Mon, 1 May 2023 15:15:51 -0400 From: Mike Snitzer To: Sarthak Kukreti Cc: dm-devel@redhat.com, linux-block@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , Theodore Ts'o , "Michael S. Tsirkin" , "Darrick J. Wong" , Jason Wang , Bart Van Assche , Christoph Hellwig , Andreas Dilger , Daniil Lunev , Stefan Hajnoczi , Brian Foster , Alasdair Kergon , ejt@redhat.com Subject: Re: [PATCH v5 4/5] dm-thin: Add REQ_OP_PROVISION support Message-ID: References: <20230414000219.92640-1-sarthakkukreti@chromium.org> <20230420004850.297045-1-sarthakkukreti@chromium.org> <20230420004850.297045-5-sarthakkukreti@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420004850.297045-5-sarthakkukreti@chromium.org> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, 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 Wed, Apr 19 2023 at 8:48P -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 | 73 +++++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 68 insertions(+), 5 deletions(-) > > diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c > index 2b13c949bd72..58d633f5c928 100644 > --- a/drivers/md/dm-thin.c > +++ b/drivers/md/dm-thin.c > @@ -1891,7 +1893,8 @@ static void process_shared_bio(struct thin_c *tc, struct bio *bio, > > if (bio_data_dir(bio) == WRITE && bio->bi_iter.bi_size) { > break_sharing(tc, bio, block, &key, lookup_result, data_cell); > - cell_defer_no_holder(tc, virt_cell); > + if (bio_op(bio) != REQ_OP_PROVISION) > + cell_defer_no_holder(tc, virt_cell); Can you please explain why cell_defer_no_holder() is skipped for REQ_OP_PROVISION here? Thanks, Mike