Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp935299lko; Tue, 13 Jul 2021 13:19:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4ySP8dAV//nwJ5iBvzpWDDBM9+stgMcw/9Vuflf4jnzzV7mXsjucEnnwc3Sf71YJNbXMG X-Received: by 2002:a17:906:e117:: with SMTP id gj23mr7883896ejb.131.1626207543528; Tue, 13 Jul 2021 13:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626207543; cv=none; d=google.com; s=arc-20160816; b=rNgVcce3JQncYHHsiRtCL3LqivzzOITuXliV0DNzjMvcEyXE7A3p+DXwtJ83Snkzt5 nPtetMt0emYpzGxC/rSFdAxCOStx2DPXTtLcDgijTSRD9ULhQSW3k/dVK3YWtr6BEXyJ GuSq3wb5GYZd2yfSBHCFujE/F0e1RFgn9tUAj+gQKW/vfTHry5YbfzGjTbfs78mkNxL6 2wdgI44ta9NZ7jKmn5vLVfTUGZa/ugcw+we5d10f2ARbGmCPHBD8gUoWmh0tsZ2kNDBt TVwg37xdJx5+356PtvPRMlkLqR+r2snE07AQ6KvtVibOJOVKIJmWRiQKU3okzE43Im/L P+pA== 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=RQx1N+tgmMvxNai/g7sZ7YgkoOk9CBTT9tzUWSJiChY=; b=JyalQhtki0fT2fnCu/SkeO1ZnOfOKpEyTSsj6Lj+bhF35pr2haZJfotrdGpfjSmErl P0H3X5hRFaoYg5UFswuOJ6IXcmp2lVgAGIN8mnBXu3qIOQ9/X94yI40B0JOz1oMjG+3w DdjHzBtmmdVzqTJD0hMlgxAsDNMtb0DImpT8je8AT68sfQILiyx2e7blQ4qVnHcwubsJ Ofpm9EVe3HZw7mGGLGivbCOlFbYKJXJrPPsbpTGM8YS4PE+jIo2FK9+ffb1BparIGKp7 KFEpZtEI945hPA1+Ew/VavgY95d3nmOaoPZ1PbeuDn9HKhlCfU57po8/QFKEjHiWti8v pl3g== ARC-Authentication-Results: i=1; mx.google.com; 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 nd17si24107137ejc.732.2021.07.13.13.18.31; Tue, 13 Jul 2021 13:19:03 -0700 (PDT) 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; 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 S234394AbhGMUU5 (ORCPT + 99 others); Tue, 13 Jul 2021 16:20:57 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36227 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231499AbhGMUU5 (ORCPT ); Tue, 13 Jul 2021 16:20:57 -0400 Received: from callcc.thunk.org (c-24-1-67-28.hsd1.il.comcast.net [24.1.67.28]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 16DKI14s028545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:18:02 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 47CE34202F5; Tue, 13 Jul 2021 16:18:01 -0400 (EDT) Date: Tue, 13 Jul 2021 16:18:01 -0400 From: "Theodore Y. Ts'o" To: Shyam Prasad N Cc: David Howells , Steve French , linux-ext4@vger.kernel.org Subject: Re: Regarding ext4 extent allocation strategy Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Jul 13, 2021 at 06:27:37PM +0530, Shyam Prasad N wrote: > > Also, is this parameter also respected when a hole is punched in the > middle of an allocated data extent? i.e. is there still a possibility > that a punched hole does not translate to splitting the data extent, > even when extent_max_zeroout_kb is set to 0? Ext4 doesn't ever try to zero blocks as part of a punch operation. It's true a file system is allowed to do it, but I would guess most wouldn't, since the presumption is that userspace is actually trying to free up disk space, and so you would want to release the disk blocks in the punch hole case. The more interesting one is the FALLOC_FL_ZERO_RANGE_FL operation, which *should* work by transitioning the extent to be uninitialized, but there might be cases where writing a few zero blocks might be faster in some cases. That should use the same code path which resepects the max_zeroout configuration parameter for ext4. Cheers, - Ted