Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp194864lqe; Thu, 4 Apr 2024 04:10:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6fmdgD08BPtBnDE3Xgp6NNAAmHSaL7fNlTyK9ehD3s+4aZ6RbTjecbvkV8BTJydKnI4HRRI2BqenOwUfVCQMkJQwmFBweqfGOjPq63Q== X-Google-Smtp-Source: AGHT+IEvYuiXVfYr2EUkZ7fMtGN8cOc3otNk4/qiynbJw/BtVqUggcT1SNAuNtj8i5+ZEWxoTBAx X-Received: by 2002:a05:6358:5318:b0:181:65b4:f99c with SMTP id n24-20020a056358531800b0018165b4f99cmr2111221rwf.19.1712229052663; Thu, 04 Apr 2024 04:10:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712229052; cv=pass; d=google.com; s=arc-20160816; b=RqrY2bKNyzCQE2qnU+Ecwhh3nDK7xh4nmLzRzDjMqmLA9pqFxlK7Z9LW3K/C6k8KXL BFJ33jKk82V9drPTmp5tjUK64Vb2BqZugFtQy09nLw9pxMGLxrT9yoFi5Du29RkL+qgX p2aSXoDmDoIQ0Bs/xTdDgESPSv+T42zkpqeXAYQ/Lq7E0cSRDmKmsOoGT2aCmIJlLHEw +G7GPi1sconDNT2tkyuQ77EONqwOZghxip+rTFFqK3P3dxG+iv1zP1ixGqa6Aj4mQ280 SQgMMtRQh/T4QmEjVc/AwzO5ZoyspaLWjiI2XwnGVZ5tHuqvos+fpnpZ1/eGuUM/sV5p uQ4Q== 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=2fKSBK9hqR9y6H7m4T/N9tWpot5JVaN8og88kNoWAHk=; fh=mFjBxWtsA9NPNe3Gkwd5L+dWph7pq0ADh54Ay2V+KKY=; b=NNrc/73hFlxPh//Q88NnkuJu/bwPbGrESsbPstjOkSTMnmo89SyztXMdUrKyajAgWy Ut3jYSJ6N/iRChp344z2HfCp4z5f5VtEl53N18LmWw7sc8mA6BVl4GViFmmUsdWZyWEu +LCnYG8PyDn1VSc7WUKDue8nKiLyrGQywqAjtgS+G0uQflSQkx3+AxZDDoyaD6yAJmVE DV4ssqlH2vbS1Lk2Xo+xCGL5TCs5gMTQaP+sHPdRoB3UfX0cxk/lems+RfTd20CRoyqb 1y8jUKUeL5RPIPBKyxN5bZGBl9RQywgFPQLYACruFM2KHV7GrTVgI78SzCw1nV2nVokp DWXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CZYlFAxg; 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-1853-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1853-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 l16-20020a656810000000b005dc7f609bb8si5970104pgt.644.2024.04.04.04.10.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:10:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1853-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=CZYlFAxg; 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-1853-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1853-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 E3BB12854D0 for ; Thu, 4 Apr 2024 11:10:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DD2682864; Thu, 4 Apr 2024 11:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CZYlFAxg" 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 9862580BF7 for ; Thu, 4 Apr 2024 11:10:39 +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=1712229042; cv=none; b=mAK1kJiWR7GJ8DkH1rpXGJeHTK1guWsB0dH5gjolqIDYTcF8GC54o8UeUHEdeK7le5+VVoYiXtTD/EfQN3ZGFJnzVUz9zIbGh9OmqmBZUAF2FgVmvL7e91d/j+hUy+GINJ22Dx0A1uA21m7LyOR6rbgxRUtgnPPRDXmUz/76TDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712229042; c=relaxed/simple; bh=4k8DGJDY7P/Gx02R9MwxXa6TDY6CRaUE8B6PgO7bByA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=shZBm2shzVHJ12aE08ZNnmvsBf0MbMDpfxVELp67P2R1lsl52fBxRvZ59v/l3bWeW5O7XKHcYMWXkI36Pso5rWasN6MJ2jiEzv6skbUDi8zlZtJIJLYmwRO8MTc8hm9g2U4bzwk4B2mmeaeQQEUV4YuRDF4RKopRUmkg6hkv2bo= 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=CZYlFAxg; 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=1712229037; 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=2fKSBK9hqR9y6H7m4T/N9tWpot5JVaN8og88kNoWAHk=; b=CZYlFAxgNBEtTqIvMM24dqRP+dQj7X2DTs2guLyleJDfc+K/t3kNw3LjLcohTzU2aZ0yXJ 9N4mN4Naf3BKrJc9QRZd/RrwHj0NKicGfPpvNstnULlYnuT1PQTKbRSF/YtHlpi8KiytWK wLU4xBiCX7Yirk4tppzSCJo2gYIycw4= From: "Luis Henriques (SUSE)" To: Theodore Ts'o , Andreas Dilger Cc: linux-ext4@vger.kernel.org, "Luis Henriques (SUSE)" Subject: [PATCH e2fsprogs v2 0/4] quota-related e2fsck fixes and tests Date: Thu, 4 Apr 2024 12:10:28 +0100 Message-ID: <20240404111032.10427-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 (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 | 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 | 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, 96 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