Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2623750rwd; Fri, 2 Jun 2023 12:03:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZkWc7FK1X/ON1jj6/muTgwovzSH29vBaVjBMEWiMYQmTZ5Dmk9yehnYFxgf31+XCU6xVl X-Received: by 2002:a17:902:9344:b0:1b0:3a03:50d0 with SMTP id g4-20020a170902934400b001b03a0350d0mr832111plp.26.1685732614111; Fri, 02 Jun 2023 12:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685732614; cv=none; d=google.com; s=arc-20160816; b=HfCXAlrY9jU+U5Na8TidUExv/ogJ62YSe8jNthi3rmDjTe8BzrkLrkIVB+9l+vpi+d HjMf+sdzV7m7sZU7Q+9t0JpJjNXFWMped+pwl10iHcNwSMxo01JcA2qIqJdm4Kh+rqxX h7EozadgQReUweiq6/5jeBevxfhgDGV5CruU53YJYEbjq1IDiXFHreAKzzd0TyUQ9+Ir NzaZ6JDGohYcbtW81Ujj09iygI+fFbSmJ+Ci/qxtUdB5gHSAZ3zAhtMs5qI171tGrl5r unHtxZ3EYi+dEXuCjyopwrI2IO1OrqSGDmnR1Fkhx1a0che2WwNBDtQ1D4WA+HtR+mBe v47A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VS2PPB5+6vCBsSxepSbGKCuyaQT9nPsi9usTi72Jayc=; b=NhqWyYpka3hJntw++C+pJYVruq4Y4kwqXe1RTPhWKYQYZLDdd61HbFpQMWNQCp68Uk wkp+v87kcgrXQpIkbbvR+/QScSDPEbrxTka5Zfo2xxHDBvwBwOVK7dRwr4DiUtnvp4Sv Wryvi48466Cat89cvSvDi6fTIrwBddGWlTAKPzVrkhjL+kkxXDfwd5h7eDyc1Pq8SgSY Nsm8ZpgdRU0m5Gr3oUyawG2iFOWHEi9n1QdX2JA2/YIun29xYeeU8X47IhemQcnMPgX9 IgNxs0dMMmaFM2mAxZw8h8JreayfH5H3FOgIl8Ft+Qih+XtT0w63aMx8v8Bfc+zF/iVB Ysuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Dh5hdhHU; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a1709027c8300b001a68f933777si1243959pll.245.2023.06.02.12.03.11; Fri, 02 Jun 2023 12:03:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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; dkim=pass header.i=@chromium.org header.s=google header.b=Dh5hdhHU; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237064AbjFBSon (ORCPT + 99 others); Fri, 2 Jun 2023 14:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236589AbjFBSon (ORCPT ); Fri, 2 Jun 2023 14:44:43 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC6661B3 for ; Fri, 2 Jun 2023 11:44:39 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-51492ae66a4so3368377a12.1 for ; Fri, 02 Jun 2023 11:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685731478; x=1688323478; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VS2PPB5+6vCBsSxepSbGKCuyaQT9nPsi9usTi72Jayc=; b=Dh5hdhHUskk0dJUgRg/dHNjcoQaoFcCqqW49L8C4cxOuUHd7A5klJumDFALbc77kfN TOe0SZh9Dxxkx8+yCDim6XmVdsfaY+BAN/Pm0iZaRA5iIdCJ7AcEHtdbfhfKBnMbqXKg IrjS0jeZ4gkJK0nbaCc7bGKUFbSb6IaEGqIDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685731478; x=1688323478; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VS2PPB5+6vCBsSxepSbGKCuyaQT9nPsi9usTi72Jayc=; b=AXnQI/nDHEgMeLSQksg6Oz3TgGTHqE8pfCsrRZa4+uwFpKtxNqRTjEHe22GBXir6NF ctE9uTexo2Gw+6uMG2GekRd3mkKkXy5Ax9Im5zuBjffMVMw/+/UtVF57blLIC/k2z+VL ru2EjE/+P8yvD5gLmDearuo/IxFgaoGFC1SY7/V0SU521ESKr4o1f4KgLkN+Mx1vJdtt gsRErLEtdJ/8/PsMKbGg5abR3gj6yvVpwKx1W/oFxK8AcNNnV8Ul2i/uuKlHirYqPtt/ v/8HFA27HNAlsV3BDxlyIaNggp6qh3Rt/afM7tj5FR3bD5XkIZ1nLa2AMiJJzllvBb32 2WMw== X-Gm-Message-State: AC+VfDz58DRqu7Kh7gzl7vs4GGCGhul+xcfYHXnVdo/CEMQYjok98gfg PrjwKdjfa6JRvqC0qNauXFgG1jACYgwrIUXD2VFkzw== X-Received: by 2002:a17:906:eec8:b0:970:c9f:2db6 with SMTP id wu8-20020a170906eec800b009700c9f2db6mr11444588ejb.63.1685731478182; Fri, 02 Jun 2023 11:44:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sarthak Kukreti Date: Fri, 2 Jun 2023 11:44:27 -0700 Message-ID: Subject: Re: [PATCH v7 0/5] Introduce provisioning primitives To: Mike Snitzer Cc: Joe Thornber , Jens Axboe , Christoph Hellwig , "Theodore Ts'o" , dm-devel@redhat.com, "Michael S. Tsirkin" , "Darrick J. Wong" , Brian Foster , Bart Van Assche , Dave Chinner , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Joe Thornber , Andreas Dilger , Stefan Hajnoczi , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Jason Wang , Alasdair Kergon Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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-ext4@vger.kernel.org On Tue, May 30, 2023 at 8:28=E2=80=AFAM Mike Snitzer w= rote: > > On Tue, May 30 2023 at 10:55P -0400, > Joe Thornber wrote: > > > On Tue, May 30, 2023 at 3:02=E2=80=AFPM Mike Snitzer wrote: > > > > > > > > Also Joe, for you proposed dm-thinp design where you distinquish > > > between "provision" and "reserve": Would it make sense for REQ_META > > > (e.g. all XFS metadata) with REQ_PROVISION to be treated as an > > > LBA-specific hard request? Whereas REQ_PROVISION on its own provides > > > more freedom to just reserve the length of blocks? (e.g. for XFS > > > delalloc where LBA range is unknown, but dm-thinp can be asked to > > > reserve space to accomodate it). > > > > > > > My proposal only involves 'reserve'. Provisioning will be done as part= of > > the usual io path. > > OK, I think we'd do well to pin down the top-level block interfaces in > question. Because this patchset's block interface patch (2/5) header > says: > > "This patch also adds the capability to call fallocate() in mode 0 > on block devices, which will send REQ_OP_PROVISION to the block > device for the specified range," > > So it wires up blkdev_fallocate() to call blkdev_issue_provision(). A > user of XFS could then use fallocate() for user data -- which would > cause thinp's reserve to _not_ be used for critical metadata. > > The only way to distinquish the caller (between on-behalf of user data > vs XFS metadata) would be REQ_META? > > So should dm-thinp have a REQ_META-based distinction? Or just treat > all REQ_OP_PROVISION the same? > I'm in favor of a REQ_META-based distinction. Does that imply that REQ_META also needs to be passed through the block/filesystem stack (eg. REQ_OP_PROVION + REQ_META on a loop device translates to a fallocate() to the underlying file)? I think that might have applications beyond just provisioning: currently, for stacked filesystems (eg filesystems residing in a file on top of another filesystem), even if the upper filesystem issues read/write requests with REQ_META | REQ_PRIO, these flags are lost in translation at the loop device layer. A flag like the above would allow the prioritization of stacked filesystem metadata requests. Bringing the discussion back to this series for a bit, I'm still waiting on feedback from the Block maintainers before sending out v8 (which at the moment, only have a s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL/g). I believe from the conversation most of the above is follow up work, but please let me know if you'd prefer I add some of this to the current series! Best Sarthak > Mike