Received: by 2002:ab2:604e:0:b0:1f4:60f3:cb4a with SMTP id a14csp10401lqm; Fri, 5 Apr 2024 07:24:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiECmAd1IXp+6lpDscrL/mPfLFUHzFqzoY9G2I8TUhg8E/Lc5nIUfllczYvmVUh2v987nn7JiuUd9+OLKHoqWJOMBL5iRYKE+kbftiVA== X-Google-Smtp-Source: AGHT+IG83pTDem0oh5o0jGpSQwB5N2E7m8VUPkrt2uhg/ic751bL1KxXNkLTrUD9dRnsA//cuSHC X-Received: by 2002:a05:620a:385e:b0:78a:55d3:e270 with SMTP id po30-20020a05620a385e00b0078a55d3e270mr1454184qkn.24.1712327057609; Fri, 05 Apr 2024 07:24:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712327057; cv=pass; d=google.com; s=arc-20160816; b=stY9C0X9LiHlfvJr4iqHy0mG7qfSx6mh/fIv1CWpI/bZVxsNIYBbpJ7pXwITqSqLtD xlTyyePfvjwumCX98HI0B7I6pmJ2/2t95cYS1iC/VckHJ7NTbINGvIMDPP6QUtXovN+O B9vwYGqn8WFqBHdDQ+CDpBZyPjb/LylN9y1y215msZR09wgKq+sow0eBMkHvrLfEkNjd u903dk4ylWFGK47Nk3rcbxlbRWWjexCvPj0ntjSyA99RY0Fwf4tqg+3t11P4mAvw5gQ8 ewF0iws2oDbtEOBlyJbVxKC3yTOyq0rIZ3XzdUPHXuNsbHSlrycQ6G5MeBWXxXJRBs8V yzGw== ARC-Message-Signature: i=2; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=7ZOhTJGJDPoNxUxhoO+bOJZmD1tGctAf1VAwvjRojXU=; fh=mFjBxWtsA9NPNe3Gkwd5L+dWph7pq0ADh54Ay2V+KKY=; b=T+Ys16qEkEFFwdXEFuCqMRJ9d/CtVfhY4AMTLv6JqRSn3kbd8mJGSgugDQ5T31cHer 8JrOr7TscWlyp1QWEMgym1vU8X51Fih8buJv9dFMFuHGttEAa98gXquu/Uo5OZODw0Kx L2YxFBEJIVOLfl6epMWgZmfGN+pxqYa6woxD/zJoicciKS0UgmvqsM3GkPJpyubH0tQz kSj+ix6tNpE4XSZRcMzcU9Dv0R//Fe8dj6MNN+DJU5MEmaNhEsMTg5VNf791Pn31kp/X BiyBlcBCp0JyF063UwTnA3n/Bi+YcXHQtoVr97/XDM7HNm1vc3DQ2joluc8YpV+Zq2mw 3OqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=OWn1TK++; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-ext4+bounces-1899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i4-20020a37c204000000b0078a3f30bf78si1853289qkm.6.2024.04.05.07.24.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 07:24:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1899-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=@linux.dev header.s=key1 header.b=OWn1TK++; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-ext4+bounces-1899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 D1B1C1C229B9 for ; Fri, 5 Apr 2024 14:24:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1326116EBF9; Fri, 5 Apr 2024 14:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="OWn1TK++" X-Original-To: linux-ext4@vger.kernel.org Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (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 F1BFE16EBE4 for ; Fri, 5 Apr 2024 14:24:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327052; cv=none; b=EptVsfwox16KrqhEDrpN0cB3lRla3BQkCGXigYvkAOyLuZjoLXhgLm8ihJuBSOUKUyDvrW3CmlOcA7kTvWb5yT6sjCCVU18g/YbKJY+MCpaxm85uCsTwMAs8+aiTqhxoe9PhYqXv/rirG08Ak3RGyMIn/uLYoz1DbTg946FQEvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327052; c=relaxed/simple; bh=bSxDohV6I9Ag7iM0mRoQhr/kHjXdQz6A8jb69OmR5gQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=f1lzI9G5IZDBrFUqML7BVjLtMld8TG6xSKh35Wi5L74J+cs1QRej95rss623lNOW80gvZn9YMn+8DN+W6WiVaFw+u47n0RMlz/qu7RgHsb3AW99V8R26iIEZTxk7bp/U08P0dyzP/3VnqV+Bb5YfJz7OaYOcP3xKJkwOsmOQTBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=OWn1TK++; arc=none smtp.client-ip=95.215.58.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1712327049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7ZOhTJGJDPoNxUxhoO+bOJZmD1tGctAf1VAwvjRojXU=; b=OWn1TK++ik3GxPVtWyD+K0HB1BWspDb4937u6+AcB9F7edkPIdADTbK2gHpmotHn74JpYL I/XnkSODqggONlo9n998tGMfN6bAPq4eJiA3q9cLQKiB6LmgGALYkffGDNSLeABlh9lA2X c7VSrjWhotGqHuwjKej6dD1Vy+FPSXA= From: "Luis Henriques (SUSE)" To: Theodore Ts'o , Andreas Dilger Cc: linux-ext4@vger.kernel.org, "Luis Henriques (SUSE)" Subject: [PATCH e2fsprogs v3 0/4] quota-related e2fsck fixes and tests Date: Fri, 5 Apr 2024 15:24:01 +0100 Message-ID: <20240405142405.12312-1-luis.henriques@linux.dev> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Hi! Changes since v2: Added deallocate_inode() documentation, as suggested by Andreas Dilger (and using text he provided). And, for reference, here's the cover-letter from v2: I'm (re)sending two fixes to e2fsck that are related with quota handling. The fixes are the first two patches, the other two are test cases for these fixes. As I mentioned in v1, the issues were found using fstests ext4/014 and ext4/019. And the only thing in this series that changed from v1 was the first test ("tests: new test to check quota after directory optimization"), which is now using a much simplified version of the testcase. Note that, since the first two patches didn't change, they have already a Reviewed-by: Andreas Dilger which I'm not including in the patches themselves. Should I? Or is that better left for the maintainer (eventually) applying them? Cheers, -- Luis Luis Henriques (SUSE) (4): e2fsck: update quota accounting after directory optimization e2fsck: update quota when deallocating a bad inode tests: new test to check quota after directory optimization tests: new test to check quota after a bad inode deallocation e2fsck/pass2.c | 43 ++++++++++++++++++------ e2fsck/rehash.c | 27 +++++++++++---- tests/f_quota_deallocate_inode/expect.1 | 18 ++++++++++ tests/f_quota_deallocate_inode/expect.2 | 7 ++++ tests/f_quota_deallocate_inode/image.gz | Bin 0 -> 11594 bytes tests/f_quota_deallocate_inode/name | 1 + tests/f_quota_shrinkdir/expect.1 | 18 ++++++++++ tests/f_quota_shrinkdir/expect.2 | 7 ++++ tests/f_quota_shrinkdir/image.gz | Bin 0 -> 10761 bytes tests/f_quota_shrinkdir/name | 1 + 10 files changed, 105 insertions(+), 17 deletions(-) create mode 100644 tests/f_quota_deallocate_inode/expect.1 create mode 100644 tests/f_quota_deallocate_inode/expect.2 create mode 100644 tests/f_quota_deallocate_inode/image.gz create mode 100644 tests/f_quota_deallocate_inode/name create mode 100644 tests/f_quota_shrinkdir/expect.1 create mode 100644 tests/f_quota_shrinkdir/expect.2 create mode 100644 tests/f_quota_shrinkdir/image.gz create mode 100644 tests/f_quota_shrinkdir/name