Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp599236lqh; Thu, 28 Mar 2024 10:29:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxRUVC6faZY8PmpwNze7qykobVszD0PnZUy27jQMiAHhyQ9H7jC1oeRDW9r8qdXTgiasa/RcfeHEi0vRiaObsJiosxrDNbjaeQRKH6vw== X-Google-Smtp-Source: AGHT+IF1LBiZELZ6RBRZI4n3FMRLT4ZELzioFK+r4aiNPsr1Qla4mnFUdIaJU9OBogttLksALUXJ X-Received: by 2002:a05:6a21:3987:b0:1a3:50be:b3bb with SMTP id ad7-20020a056a21398700b001a350beb3bbmr4806642pzc.53.1711646992882; Thu, 28 Mar 2024 10:29:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711646992; cv=pass; d=google.com; s=arc-20160816; b=JGXUJw8nphynLjFw+ao5Fp3754X59qFoha6hUdCajJ/5SoYHnaCTHftnLNIO4fO+gO UqL9vJ1h0wL6G5PgUjzJRFE7RQea7lby4FRo8Zh/xkSTOwC8rdj+Zwsz5q5U9uAjKD3N KVrAqRiGovQQVDkWBoFIlrc6Ck0FTWKQkFhM/oqyaPBXngp6FVcb5NedfFUOkzNVxrDT zMTjx5DEMI4A/bx9jof9md6bIbVkSd9F1ka/tIm0cznOZ5IIqxfwyLr66buNLZaNBoxv YpNhu2sz4PjcgvNgKzsq8SdYux1adI4AjoXV8GnMbTUz63YSCWmJS2NjldfIh4/ADXsf qJ7w== 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=fCEM6vBjsKoj5ztRKEN5xpFexqa95kalZoYFnFSgWO4=; fh=mFjBxWtsA9NPNe3Gkwd5L+dWph7pq0ADh54Ay2V+KKY=; b=BQ56Z3dZkPD0rs2uqDs5IwgbFnXE38A++YjSepEzy+dDCDWx1LFxQ3LttWY3US1LLH e0v7g0STXypr9NZmW5VdKO7zxPiMHTIA/tTZleWftisWHHGGYJVJbyXg4mbwKWBfKf4o 5ZSzp9n2/yrMFyx0vxHHOZsWLCQIuzPpwSUWXaJV4/Isiype7w59LOQ+PnqX7LEa0PqS PFJ7gisRAGhyOCg39AlcyxOgeCP1qRNvdpvXw6t9fuaT+V0fhrpdrPC7zTxhfiloXlcc eW1Qd8sG+buqPT+NeZ/4mKjiaOZW3kWtyeL5LCq0MfjkU+Jae6o3xemjDhhW24QYMjHs Vr2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=T0x3smgN; 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-1766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q4-20020a634304000000b005cd8486d5ccsi1790894pga.65.2024.03.28.10.29.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 10:29:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=T0x3smgN; 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-1766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1766-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8F67029AAE6 for ; Thu, 28 Mar 2024 17:29:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CAE97FBB5; Thu, 28 Mar 2024 17:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="T0x3smgN" X-Original-To: linux-ext4@vger.kernel.org Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (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 6782D42A86 for ; Thu, 28 Mar 2024 17:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711646987; cv=none; b=cj3YWrwz8v6Cp97hCp8wPKTbRyr7MdlJA3sfG6wAmBcq7AYWFtW8rn0xqgIvdAPB+S+bcn3z7PuYQe2IrmaoobcjRltasAbXFPPBeo4pVtY7A7HQRqMQz7hbSrxxXnuIGBsBaAlJpphv6EoN7YHps4GsnH1Hdjhb3ufuAAXFMkw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711646987; c=relaxed/simple; bh=bJeyLyTUanKc6gmWlaDBgJMEoRLjWZQ10a7FSTj9o3E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AMJXo1V+ubHAzxFFzWoUE6XvBX/acqGGdMc0q+MKqtXkYAsEZC8yL0EFswSkGMnNjWLxiwZf+IXCK+oblW6jmxnxbLXEp5WAxB7ldOqIHRiMhdEAlPstGR69AzEJl4HfU/AbC8AHrbFzsxvUi3XQK6oyG7RSoEcp3Wsvu6EWLaA= 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=T0x3smgN; arc=none smtp.client-ip=95.215.58.188 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=1711646983; 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=fCEM6vBjsKoj5ztRKEN5xpFexqa95kalZoYFnFSgWO4=; b=T0x3smgNMwDwwDNmPhqlDSd2coKgbf7rsZf+EWIIKqmQdEjFWMrENBt0dQ0WjfC1fLYNb+ ADvGHoH6K9VrLBD5IgeK5bGJfcFkzHARomXnS068RhLZeJs9BtP51wDb/rSrrG+YD/2DF4 0zeACNLBeG+yCBkuOFBtdiRvQyzGU4c= From: "Luis Henriques (SUSE)" To: Theodore Ts'o , Andreas Dilger Cc: linux-ext4@vger.kernel.org, "Luis Henriques (SUSE)" Subject: [PATCH e2fsprogs 0/4] quota-related e2fsck fixes and tests Date: Thu, 28 Mar 2024 17:29:36 +0000 Message-ID: <20240328172940.1609-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! I'm 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. The first patch is actually re-send, which Andreas Dilger had already kindly reviewed and suggested to add a test for it. One (important!) thing I forgot to mention and to include in that initial email was that there _is_ already a test case for it: it's in the fstests suite, ext4/014. That's how I found the issue initially. Thus, my test case for e2fsck is nothing but a filesystem generated with a simplified version of that test. As for the second issue, it was also found by an fstest, ext4/019, and the test I'm sending is also based on it. 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 | 33 +++++++++++++------ 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 | 40 ++++++++++++++++++++++++ tests/f_quota_shrinkdir/expect.2 | 7 +++++ tests/f_quota_shrinkdir/image.gz | Bin 0 -> 11453 bytes tests/f_quota_shrinkdir/name | 1 + 10 files changed, 118 insertions(+), 16 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