Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp161365pxb; Tue, 12 Jan 2021 23:46:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6prHBA87pIAovcEjnLt7v9vy3YHx2N38ci1eELKIBiIZ+7XUk8oKVWEYfssbJ99P9LOIB X-Received: by 2002:a05:6402:a53:: with SMTP id bt19mr781747edb.104.1610524009298; Tue, 12 Jan 2021 23:46:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610524009; cv=none; d=google.com; s=arc-20160816; b=G0iCtVKiyEXzOVJYjgJEbciDTQY2cg8HQpWHxy7gMj6vXYvCkEjz5Pti4gELlResak q6r59ozxAz5yXhjXjQvPUoju8O+5KEji5bxt+eAtasaui4H+IS8dfa9VaHO8TXGp4RMh KStqDzqDHZo1/e7MK0h7o+2Zlu+2l9RsMFNM3dgK8GgWRoxvRz3dMqKDxIXNFTImWw6o L4Luyz6utlqS8gYUwh2ed8nXb+0ubDlxUeadgK9vY+vd4JxUud/IS9HjIvsrTIiCXEzS pfYKo1G2UuG9iOM+MAEYDjYTd/Tf6dGPHTi2kFV2aWSuq1VlNCHCjwfd/pW86JrjGW1+ Lokg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=/heJO8JuiwWynfejNELMn+jLslnfJcq2KDsfSuPxcbQ=; b=NzA6sMLfsbPXfP1jTWv84m2scyuzH1Bi6HwGuBnlkI5rVrYbHqJ6rkVEGHXpk0z1wZ 4MaQqn8ZZpZTze+/29XJDTxfST4pIBXMu+DH3lTzZ3VLdm+3FMupEX3zVy+KFOwcM3hW 3PnRQruHTl4PDbr/Y5+vD4Pcf3VwSkYdX7uxbur4+ygAGwaws2Eji4ppuQDJOvL/RAC8 +cfQZskuCG2uKuPPwdXdsPfNfopCeeebGMTPMAlZi9NPAl2neXZCsJ7QylZiN8Jtk4yO yXqWRznXAfv0QzAmMO/QTk7qAXBK7hdhUPLJdKJ3H9oWX9OtjST9fkszMVSISoAnTxQ2 7nqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@scylladb-com.20150623.gappssmtp.com header.s=20150623 header.b=NlBz7GVj; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si596146edr.470.2021.01.12.23.46.24; Tue, 12 Jan 2021 23:46:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@scylladb-com.20150623.gappssmtp.com header.s=20150623 header.b=NlBz7GVj; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725873AbhAMHpI (ORCPT + 99 others); Wed, 13 Jan 2021 02:45:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbhAMHpH (ORCPT ); Wed, 13 Jan 2021 02:45:07 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8286FC061795 for ; Tue, 12 Jan 2021 23:44:27 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id r4so655842wmh.5 for ; Tue, 12 Jan 2021 23:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=/heJO8JuiwWynfejNELMn+jLslnfJcq2KDsfSuPxcbQ=; b=NlBz7GVjb4Q/1HDjQyOub+gmJxqQSKqZzMYL+oIcjfWmhVRv86zhY78pV2mUQnbeNE C6o8QTcUX5LXssfy0z+a3QnvkkVCq0goZjMG31/G+Fb/fEpbbKtaONOyXkID4KP/1EmN BoLKvrnZfEn+IZhtVloV3cYc1nzfSgC4FGCsvEu/jeFDp78J06XcY94XuRGkEqJp5fEE zEb4Cum1WFYXjtT3OAt3B1hKEXJfQ/251AUXSc+82KfcNIBAJB+Z8nlz7XcgkE2IcCcM QcY+yavRAYeO+fMqEsglH+I+w0KQtSkKNJZy5xzMjMs5IcDFkjGr7tUg4g13j9gdnC2c /HnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/heJO8JuiwWynfejNELMn+jLslnfJcq2KDsfSuPxcbQ=; b=iQVpVz/pJC1WRnxg87h3oibLHHaLPsp5gWzx9ozQYCjLk6Q/2FA9wt5mdM9UquHxCe u1y0G+lAc3ZHnmZYSrhqSGJmQjpDSncCz/ZTj+1UnVCj0i+PQ7zxm78MDbLYEXJvDNnD fnpS0ML3J1Is2nIWkCYs+pTr4GF+I+8zgyFgQ5U5ViyKMLKGFNAC8n7N5WvG6pygNJ2U aMlkzyHkuCKIGSjhVN7RFZjDwciBtSCWeB3o9SvFGjobFatWlHGtHRldXJbIS5HDIMzN LzRJQXZQMraRWt7pcIlC6gljYRp0HZL6/uly9zezOwnu1qxruy0W5ax7KsdPqnoaoOHU OJbA== X-Gm-Message-State: AOAM532BYYDzwE6sOATquXIJpnizLrbKNvca8dISiqPqtQRCG8Zgljx9 dmthUCf3rn+uDK01eG+HXVaHlg== X-Received: by 2002:a1c:3d56:: with SMTP id k83mr666672wma.25.1610523865907; Tue, 12 Jan 2021 23:44:25 -0800 (PST) Received: from tmp.scylladb.com (bzq-79-182-3-66.red.bezeqint.net. [79.182.3.66]) by smtp.googlemail.com with ESMTPSA id r20sm1902245wrg.66.2021.01.12.23.44.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jan 2021 23:44:24 -0800 (PST) Subject: Re: fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten extents? To: Andres Freund , "Darrick J. Wong" Cc: Andreas Dilger , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-block@vger.kernel.org References: <20201230062819.yinrrp6uwfegsqo3@alap3.anarazel.de> <20210104181958.GE6908@magnolia> <20210104191058.sryksqjnjjnn5raa@alap3.anarazel.de> <20210112181600.GA1228497@infradead.org> <20210112184339.GA1238746@infradead.org> <1C33DEE4-8BE9-4BF3-A589-E11532382B36@dilger.ca> <20210112211445.GC1164248@magnolia> <20210112213633.fb4tjlgvo6tznfr4@alap3.anarazel.de> From: Avi Kivity Message-ID: <6d982635-d978-e044-4cca-c140401eb0d3@scylladb.com> Date: Wed, 13 Jan 2021 09:44:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210112213633.fb4tjlgvo6tznfr4@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 1/12/21 11:36 PM, Andres Freund wrote: > Hi, > > On 2021-01-12 13:14:45 -0800, Darrick J. Wong wrote: >> ALLOCSP64 can only allocate pre-zeroed blocks as part of extending EOF, >> whereas a new FZERO flag means that we can pre-zero an arbitrary range >> of bytes in a file. I don't know if Avi or Andres' usecases demand that >> kind of flexibilty but I know I'd rather go for the more powerful >> interface. > Postgres/I don't at the moment have a need to allocate "written" zeroed > space anywhere but EOF. I can see some potential uses for more flexible > pre-zeroing in the future though, but not very near term. > Same here. I also agree that it's better not to have the kernel fall back internally on writing zeros, letting userspace do that. The assumption is that WRITE SAME will be O(1)-ish and so can bypass scheduling decisions, but if we need to write zeros, better let the application throttle the rate.