Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp81691rdd; Mon, 8 Jan 2024 18:55:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAX5nj9gBilKfe91Gd5QhTCkxhG2EfWxWBSzbm2k/AqSgK3g6nWqU+bFjFgBfyKus54+2L X-Received: by 2002:ae9:f508:0:b0:781:7005:23b7 with SMTP id o8-20020ae9f508000000b00781700523b7mr3290407qkg.134.1704768907830; Mon, 08 Jan 2024 18:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704768907; cv=none; d=google.com; s=arc-20160816; b=MtWMO9NUr77bjkHu4LwAe6f6nsq7rTq6J657T+HqAFyLcvsWbAUTfeIBRIQn5/sqL1 by4SSAfwggqqM6gxLdXBaENBY1zchm2/vkpV5dDeCmXmnhqmSoOx7jBWxTg4S0Wq5K1c ka/suAk6EdZSOjJZq2Bv4XavChgIbZV0wNrube3UpEn7jROwzKt6VJUkpw5VTpn5VVMM WvERr+S3b1UhxWoGmunchRB+xF+sfkxqcu018efQ4Sw1wYoWHbKRlvfnoBVCczpNoyhY mHiodIyd6atQD4UUdNXs2Cvhxt46qvcROHOlHfiHWZgV1RfEW4hwIN1LAt7lvt++aSA0 vSXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=PBXPEjs8S6Xjv3on5qnL4AHB7lIpx2uSn0wufjcExMo=; fh=VdA+S4N4aAkwzEFNMW8fD1NRDVfQMSpFdu0BtT7D5Qw=; b=xU/dc8h5LuupL8ErbcH15STHCc1Zf70p1Nmxu4o7UE7BuAgn0uKOsZRYJAg3dKQZLB fjV1kyKFd7plqTn5F1RfQDQz0YWGZ5gZoBf1p5lHbgRpaE4nb07HOSgDt69AN6McWjgu zbKlSf44mj/DPwgULeGS0qc/E9ePxCDS2xMKv5a6uRERUqDbzx8+NI5gC3tVp1czb2ef uqDwpHllJ2FIH4y7XtGcGqTiV3BFN6NXIN5lH3tHR6MjluboMApfe2iMG5zwDCbkD4Xg wnKklBOBzl2vg6Gw0GqnLXCo/3I5NNG3DvOf8gN3pFWcaWCFT/Uw8Vgn+PylNlLEgjL5 ixuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=AKUmK74G; spf=pass (google.com: domain of linux-kernel+bounces-20304-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r27-20020a05620a03db00b0077d685d25b6si1103883qkm.252.2024.01.08.18.55.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 18:55:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20304-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=AKUmK74G; spf=pass (google.com: domain of linux-kernel+bounces-20304-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 942F61C23193 for ; Tue, 9 Jan 2024 02:55:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F11282575C; Tue, 9 Jan 2024 02:53:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="AKUmK74G" Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACC076106 for ; Tue, 9 Jan 2024 02:53:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from cwcc.thunk.org (pool-173-48-82-211.bstnma.fios.verizon.net [173.48.82.211]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 4092rWoH010670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 8 Jan 2024 21:53:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1704768813; bh=PBXPEjs8S6Xjv3on5qnL4AHB7lIpx2uSn0wufjcExMo=; h=From:Subject:Date:Message-ID:MIME-Version:Content-Type; b=AKUmK74GZxhlB3jH8sR8/3W88eLS6EkqBr7ee2A5h0p4AcqTZxcpr9mUXoO+kxIvj hOxdpXph6dJgZ5jTX+oGBwPe4hoEOVQqeKyts08HaV1yJwCw/Tv9+4/8BR27BcI5R6 WABJ/wQEOZ6RsmH9x0Kt56EosIiwm8UEYcOHSYjXwg6UVnm+Q3wUJxsA41y5RB9JyF SceqMh+/B59lE817imOWBK+IywhLRy7FWrzGml67C/sNaisCmOV1h2BoJ6Fe4UryLp 8tODtMG/jVMAaA+w5JFUkpsVz1U9+H1uPVf/gZ5LmwBlyIVcO0Mn2E0Ts9NNKiFrea FamuBpLYWdlDQ== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 2BA1E15C0314; Mon, 8 Jan 2024 21:53:28 -0500 (EST) From: "Theodore Ts'o" To: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, Ye Bin Cc: "Theodore Ts'o" , linux-kernel@vger.kernel.org, jack@suse.cz Subject: Re: [PATCH v2] ext4: fix inconsistent between segment fstrim and full fstrim Date: Mon, 8 Jan 2024 21:53:23 -0500 Message-ID: <170476879011.637731.15498657467622683553.b4-ty@mit.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231216010919.1995851-1-yebin10@huawei.com> References: <20231216010919.1995851-1-yebin10@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Sat, 16 Dec 2023 09:09:19 +0800, Ye Bin wrote: > Suppose we issue two FITRIM ioctls for ranges [0,15] and [16,31] with > mininum length of trimmed range set to 8 blocks. If we have say a range of > blocks 10-22 free, this range will not be trimmed because it straddles the > boundary of the two FITRIM ranges and neither part is big enough. This is a > bit surprising to some users that call FITRIM on smaller ranges of blocks > to limit impact on the system. Also XFS trims all free space extents that > overlap with the specified range so we are inconsistent among filesystems. > Let's change ext4_try_to_trim_range() to consider for trimming the whole > free space extent that straddles the end of specified range, not just the > part of it within the range. > > [...] Applied, thanks! [1/1] ext4: fix inconsistent between segment fstrim and full fstrim commit: 3d1aa1169c45aba9d589be1eb4b131f26f0a663c Best regards, -- Theodore Ts'o