Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1607613rdb; Sun, 8 Oct 2023 16:38:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFppwd2Xtf5ZBo/xaQjRcD6+ccO24g90QDYnrFJxbsWvRwnkxNYf7ySf4hxyEn4rKWlqYwT X-Received: by 2002:a05:6a00:39a6:b0:690:fa09:61d3 with SMTP id fi38-20020a056a0039a600b00690fa0961d3mr17805205pfb.15.1696808284820; Sun, 08 Oct 2023 16:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696808284; cv=none; d=google.com; s=arc-20160816; b=Gsr5/UGv6MeODUD+3MeTZRWUhxDnGJ2tcOrUiL7o1vLGDrzwNDDJGWXZbR4esecWKE ygxXU5ieHJjb19pf11Wl2oQqRw7KUDVg7VwVh5UQ8Tlhf+qhuxzqBD5J2zTFfycXpKJq t/GOXguzrQwO+Z9b9RMvbNaQWpzLcEdlHSwkCr9EcrsGyh8bi0H+V+xVaJBx2a6cX3EI 5y3If7vnGz0fAhjN6RB/GE74E5ZEmjVcy3Emqi/XDflG2dJ7+miFjb1pHqVuNBF4CGrL Ey6YcBjyQoyDl/K+96u6ZUJmQWtOAsULbebBuxcOMDNSkjtmk/yY06ZrXZKNw7g3o3C3 dZSw== 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:dkim-signature; bh=ugb0tKKwENhwxws0wCM1fp+8N3X07t18Hh39dqaZxsY=; fh=yewGppZRzX9YpyYWG0x58MuDKnCcUPfkXLwJGOKeE90=; b=Q4lN36xj3stzOTvKNFlHVcwfl16CtF/hdpLaL0BRmkX/mXJSngb7ChM7gM57caPSFE tmbyCnxsqbaN3e5CriSFqKCoohKbAfMJljtu/pFF8XzZYH3NK8klh/mZA9h1XPjnBsp9 pKt7F8Rx0s2g9oaPTzCqH9rw+4Kl1xP/Zyu9FchypULrbB8/VNO5t3iwi8P2aKKPwcJG ++vD47HXeXdW1zPymvz0wo+fhAylxbelGRhw5Hs16MXlvhCTa961Gn/cXhx6zpoll6p6 qydqmsQPdHDCN385UsQ0znEBSYXEotCDGsI0bORyvY9Ps1oOLeel5iIEzRx3kDbOxaqW +6eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=i6rflzQb; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id be8-20020a056a001f0800b0068fccf2541asi6182130pfb.203.2023.10.08.16.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 16:38:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=i6rflzQb; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7ABCF804C1AD; Sun, 8 Oct 2023 16:37:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344975AbjJHXh5 (ORCPT + 99 others); Sun, 8 Oct 2023 19:37:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344965AbjJHXh5 (ORCPT ); Sun, 8 Oct 2023 19:37:57 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 151EBA6 for ; Sun, 8 Oct 2023 16:37:56 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-690d8fb3b7eso3581063b3a.1 for ; Sun, 08 Oct 2023 16:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1696808275; x=1697413075; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ugb0tKKwENhwxws0wCM1fp+8N3X07t18Hh39dqaZxsY=; b=i6rflzQbi/038L6+lC+4cUcrEeXOp3kLrxxxQkkpm+XKiRmMlh2gDv9qAtq3W5cKVM 0gWKbrrvMWiF2SRAClOcPd7sguDFRsqXBjEOI0SvOIYoAHdw6l15PTm9ElrFIifufYgU pbpS4v/zl1umpRnvfcXwCKln4XJfk+BbgmXzFpkdQdLXRcaW4Skkk56hgWlxy1m2yxHA aaSDWjBE92yKdOmQKLJPpef6qPZ+8cgXQxDnryUGP6QfrRhQk6a+TGaujSQ8AeMYGxnO utKIJZUKKNMV2AoUnX+YlfrMozbwMUHJOWSqHW9KFguBwMR2aKLQjtO8Wef1t1iNd2ol zGjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696808275; x=1697413075; 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=ugb0tKKwENhwxws0wCM1fp+8N3X07t18Hh39dqaZxsY=; b=U76DWZuFgPnb61n3CgKc9k4Dmy1cpxipoqSF/iZicWUUcrm7R1gFZ7Zdphn22iLx5b naz4SK9DawNEw9Bwta290HBzDXWzKd8k+tcgbE4RMWpzrAmmRSgsWP8G9CUBo9ybxUJa anYJhCwnx9ImZBjGORTnKMKFoLbgPZmjKIGmgQk66HHeRCb2M7wXC6pWbNUNu5ZCB3Yh kvhXvd8eEl37/XKS6UXC1oXJb98jJIoieFrVU2Mp1Bb2rT/XMba9tqY4BDMHaEp+28Mw nXMbAwywijWOGK18IiaLvliN3tW6TCLsoyQKofuvJ9ROBZWw4lEhz3V2+tRCrvcSVIBc D0GQ== X-Gm-Message-State: AOJu0YzPoTvaewJtoJbN1vV+pngcMWKUcKqKAZnpKmOky1hY62JWlPn8 Misv3txA9nJju0NNsKY+km1W/w== X-Received: by 2002:a05:6a00:1912:b0:690:d2b0:1b37 with SMTP id y18-20020a056a00191200b00690d2b01b37mr18093157pfi.10.1696808275521; Sun, 08 Oct 2023 16:37:55 -0700 (PDT) Received: from dread.disaster.area (pa49-180-20-59.pa.nsw.optusnet.com.au. [49.180.20.59]) by smtp.gmail.com with ESMTPSA id c26-20020a62e81a000000b00693498a847fsm5047054pfi.137.2023.10.08.16.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 16:37:55 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1qpdLM-00BI5X-0f; Mon, 09 Oct 2023 10:37:52 +1100 Date: Mon, 9 Oct 2023 10:37:52 +1100 From: Dave Chinner 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 , Alasdair Kergon , Mike Snitzer , Christoph Hellwig , Brian Foster , Theodore Ts'o , Andreas Dilger , Bart Van Assche , "Darrick J. Wong" Subject: Re: [PATCH v8 3/5] loop: Add support for provision requests Message-ID: References: <20231007012817.3052558-1-sarthakkukreti@chromium.org> <20231007012817.3052558-4-sarthakkukreti@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231007012817.3052558-4-sarthakkukreti@chromium.org> X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 08 Oct 2023 16:37:59 -0700 (PDT) X-Spam-Level: ** On Fri, Oct 06, 2023 at 06:28:15PM -0700, Sarthak Kukreti wrote: > Add support for provision requests to loopback devices. > Loop devices will configure provision support based on > whether the underlying block device/file can support > the provision request and upon receiving a provision bio, > will map it to the backing device/storage. For loop devices > over files, a REQ_OP_PROVISION request will translate to > an fallocate mode 0 call on the backing file. > > Signed-off-by: Sarthak Kukreti > Signed-off-by: Mike Snitzer Hmmmm. This doesn't actually implement the required semantics of REQ_PROVISION. Yes, it passes the command to the filesystem fallocate() implementation, but fallocate() at the filesystem level does not have the same semantics as REQ_PROVISION. i.e. at the filesystem level, fallocate() only guarantees the next write to the provisioned range will succeed without ENOSPC, it does not guarantee *every* write to the range will succeed without ENOSPC. If someone clones the loop file while it is in use (i.e. snapshots it via cp --reflink) then all guarantees that the next write to a provisioned LBA range will succeed without ENOSPC are voided. So while this will work for basic testing that the filesystem is issuing REQ_PROVISION based IO correctly, it can't actually be used for hosting production filesystems that need full REQ_PROVISION guarantees when the loop device backing file is independently shapshotted via FICLONE.... At minimuim, this set of implementation constraints needs tobe documented somewhere... -Dave. -- Dave Chinner david@fromorbit.com