Received: by 2002:ab2:604e:0:b0:1f4:60f3:cb4a with SMTP id a14csp10491lqm; Fri, 5 Apr 2024 07:24:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZbVkh6bBNGvZqu28y+DCtlBFA1K+r7GvU0eCKPFFZYvN8BAQ6aZ1jXt0JQrI5s7zGu7X6o262Hu1+pbuQ33JhHRX6nCmHJuo9jnrg9Q== X-Google-Smtp-Source: AGHT+IEvDz3vMyuKZ79iDL4+OIXofz2mTv31CbzVm2uer5iIX1nzHigi76lojpWxYf5rh0n9x8jr X-Received: by 2002:a05:6870:f286:b0:22c:ca8c:d133 with SMTP id u6-20020a056870f28600b0022cca8cd133mr1800389oap.23.1712327066462; Fri, 05 Apr 2024 07:24:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712327066; cv=pass; d=google.com; s=arc-20160816; b=wqmigO5tgBwNqTMoBhTMvbDcLaKx+G/XB3iSZPqgyDFa75IMiKWZRSggz/dBgBLRHC qzjeUOAwoWhoTVUk14fXsy+7/cvuvLBiOo4maa7AGR73FNAlzaAhl2eyggPnqQQg1GNh FEkRetdyiUgae6n5uS250EXV7Hi67mWlbvocyymCCL0Qt7q7ht1L3gaKNpGReyyha27y ZThOyRS6GgmJYheJWzEvrzvnY3w9/wfqAxdxVz74QfNTZUY2TfEbh0HGTaVpoSRIRM6D pK6F1AHqD6DLtOXBpMmAKeEle5ONnjgXrqRG05hdrCFNPTK6EhlBCTooEYwWGQis4s1F 9n9g== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4d5yxLDZOYtkaoRdt4QlJaQrk8CcY5+L3UcAiDJim3k=; fh=mFjBxWtsA9NPNe3Gkwd5L+dWph7pq0ADh54Ay2V+KKY=; b=tPN4GESUJ6CGEPCYlk9Zpy4sVRfZc7nJaEW1OjHvjBZH6z7SIfnkJdfrENywD/yBjJ o/1OuK+yJ+aizodfrBTNwmF6WciuhGYRpbx2IpYfb2cyjz+Hf/hHc1geKyg1lY9ltbdo 6JW5z5hSM9DQBUPn5g8/qoKpZTHrWZ2gUrfRkF7wokauUp+VxDnBLV9ja9thZzqBLGng QpezmiBFQvIP3APMq0yIHPcsUJ/eJPGiJJ9N9R4/QzU2uUl5h5q27bzzxsNDF1v8jZKN 2TU5LEkt+zqzaR1O/pSk/UBTZ7ab/bHcXXmrch6no5F8BElvBxdrbhPs0P1qqx6Fpw2E cgXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XdiI7Noc; 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-1903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1903-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 bq32-20020a05620a46a000b00789cc5f44acsi2157501qkb.373.2024.04.05.07.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 07:24:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1903-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=XdiI7Noc; 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-1903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1903-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 1B1DF1C22846 for ; Fri, 5 Apr 2024 14:24:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F62216EBEE; Fri, 5 Apr 2024 14:24:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="XdiI7Noc" X-Original-To: linux-ext4@vger.kernel.org Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (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 124EA16EBEF for ; Fri, 5 Apr 2024 14:24:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327054; cv=none; b=YRfluLUHJOLGLjEch2fUwq+WVmSmYtSOz9JeXrSSB04ttaNjBynMsKq7/wUYaD4SkyR90c8yRMC3VS71MHKlhKeL++2+S6s+fhqiR1bBkyN6hKlWj2VgZ5RujEmhipM3VYViecY9coEGf+a6MqIDblAoO3r9MSb0bIWeQC+UIpA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327054; c=relaxed/simple; bh=pNAKtrIVYsR9WuMDS7UeRJdP/IFpGkoXl9Ggzowl4Rk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jUJHZoc54pu/X2FnCElzwtTT+T8GEsPp72yfZb6v74cRQbQCtTQ+Jum70TlOxNEu1k4iJXp1wTMDeWIjEN7vOCeJAWdJ+Lde7DZT3sI3N8JMvU+9EtRSrbz9++jVb5W2FYitz24/OOQubjJjLEXJR4u8/2vZiq0Fq/mHUC/ROxE= 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=XdiI7Noc; arc=none smtp.client-ip=95.215.58.172 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=1712327050; 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: in-reply-to:in-reply-to:references:references; bh=4d5yxLDZOYtkaoRdt4QlJaQrk8CcY5+L3UcAiDJim3k=; b=XdiI7Noc4j2oZTxh/cjzedgwKX6Aj4fZEuse4v63Cj8eeU9XPK6xZ4stxX5s4J492C369O GaMcWKHOe7c/40SVQm4Bw/d/92iB5M5lCR0pda8JmKT0hnsa1OUM3mayy7P9dVo9BjAS0Y +OAX+2AAxZK0O0a8bAujTEgQLG8ZTMA= From: "Luis Henriques (SUSE)" To: Theodore Ts'o , Andreas Dilger Cc: linux-ext4@vger.kernel.org, "Luis Henriques (SUSE)" Subject: [PATCH v3 4/4] tests: new test to check quota after a bad inode deallocation Date: Fri, 5 Apr 2024 15:24:05 +0100 Message-ID: <20240405142405.12312-5-luis.henriques@linux.dev> In-Reply-To: <20240405142405.12312-1-luis.henriques@linux.dev> References: <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 This new test validates e2fsck by verifying that quota is updated after a bad inode is deallocated. It mimics fstest ext4/019 by including a filesystem image where a symbolic link was created to an existing file, using a long symlink name. This symbolic link was then wiped with: # debugfs -w -R 'zap -f /testlink 0' f_testnew/image Signed-off-by: Luis Henriques (SUSE) --- 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 + 4 files changed, 26 insertions(+) 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 diff --git a/tests/f_quota_deallocate_inode/expect.1 b/tests/f_quota_deallocate_inode/expect.1 new file mode 100644 index 000000000000..2b2f128dbb57 --- /dev/null +++ b/tests/f_quota_deallocate_inode/expect.1 @@ -0,0 +1,18 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Symlink /testlink (inode #14) is invalid. +Clear? yes + +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 4) != expected (16384, 5) +Update quota info for quota type 0? yes + +[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 4) != expected (16384, 5) +Update quota info for quota type 1? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 13/256 files (15.4% non-contiguous), 1157/8192 blocks +Exit status is 1 diff --git a/tests/f_quota_deallocate_inode/expect.2 b/tests/f_quota_deallocate_inode/expect.2 new file mode 100644 index 000000000000..802317949959 --- /dev/null +++ b/tests/f_quota_deallocate_inode/expect.2 @@ -0,0 +1,7 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +test_filesys: 13/256 files (15.4% non-contiguous), 1157/8192 blocks +Exit status is 0 diff --git a/tests/f_quota_deallocate_inode/image.gz b/tests/f_quota_deallocate_inode/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..798a72c3a0da0323fc55c5e034f778e967394c81 GIT binary patch literal 11594 zcmeI%eNYqUx&UyiRgMQsPLKCM5rNy&@i@JTaO(gyn54Bwu%aS@KoXLGC`cj%3rjQ* zg2hU`eAU`Q6+=`M67t1|OCTYMNYyF=B1u;HiWUXBD+!3pM|63*0<;ne|Yru^5mtbmzrFo={>8rrML%Ee8uX`}&l>)HyIhiM`?l!8 zzr9U)`^DDT9B%VE?Pm3~_)+VS*Q)$^^N!t~t4cW<+s=aa??*fw9p6o9CU1POevfa^ zM=hi06`QJavj^&Upu34uyNu=H+g|lU0?oQys&q7E7rKEE_>OXx~;@y{7=~fQSTZsSrM3< zr^-4+iJ<<)qRj$Fbz#@SmO-Uge!)WXVnW7~l2PHofL2?0u_awq z-iv{}iKqp0UJ@>vHz-|g7pH}vO!Iem$GMm;5a%`p;P=Kt@;kO{Js zYvyd;lx-AW9N|?0X*pKI!X#GMH^9Lx59Wf8XY?&ls-Z2nf*P+Y3}vzia_Up}E+HcX z-_2Ezh}RQVRP1V*pQk(zT3jrnPD>`z?_hZS6Gu;u-|O99KbjF1Ks)R5K{bMnyc{3b zh^SZkcwQT~5|bcmlZ_;RNZIFzZRr7V2kNhn%Sp{5&4{(2{eTF6dGd4D?y4ZpOtClb z(W3_^Ln^kX*JG@}M5~=}Z~d)}OY5;^X5n=^Ar5~Fp(Hq5n`)lxV_kkO8e+p=D zmn`S(^NV&Rj0!>%0^+g)W;auc2&cr$)~qU*UuFN&KH0Rbp#3B8h+k|c^hfZ3B6qAp zmtcj;M^BTLF4ji#dzNuR@WTaV*0Y2!3r+-BJ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