Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp194902lqe; Thu, 4 Apr 2024 04:10:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9Z/26TEH3iv+TQR4m9spgfFZem/Ao/isM6Q1CIcKafjdeQtZh+kl76P4Ix7lY+kzpdx8w09X3KTiI7YWgSEZyNFu78CnmI8qLUKvz4A== X-Google-Smtp-Source: AGHT+IGaOhkTwbGRPmL9gOPhDXqaeV4/4jLGy2Py4jIQehwsjvYTJV8Xeid5zpgKLCcq3iT80ufl X-Received: by 2002:a05:6359:a3a8:b0:17e:f422:5e48 with SMTP id ky40-20020a056359a3a800b0017ef4225e48mr2019456rwc.13.1712229058626; Thu, 04 Apr 2024 04:10:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712229058; cv=pass; d=google.com; s=arc-20160816; b=mRKSF0pzS9x5wi72qpD7FgdT0DqluxKfzjlURKnsIsb43DdOrdC+Z+eI95oK10ri8K u0BsZt00KRYxBo6NV5Qf67MATc+wxGcJim78I3saXxhsWPZbI7TiGc8M8guRpnrbqsCi eXjWTYkt+oEbAHn+9vSCfjx9y7EzSfCAGhmJ/Gq2NHieuGSutCht4Cuf+Rp/2LcBM1Gs wWiRQ8O7ybW3s4WQ7c/XYJAr8+Gwc9mkWC3+HJOhObmnuPBjAmM9ni2D4asOk+GnLRKN B29W8pErcf79+UtFV0PMuXI2HSKQTY0AssI5IE5VcX+/yBCWLvwWPwZn943QZd/bkaMc YUNQ== 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=uu4jMZtAqF2jfhYct7x3/bM+bfcCRqhTVsT6Ei2gC34=; fh=mFjBxWtsA9NPNe3Gkwd5L+dWph7pq0ADh54Ay2V+KKY=; b=HBzHXrZZdofBUMyc9R1qcudJY1sTrnGVCA1b2sY9PIcz68QHwopocCtUaiyEv6I4g2 YJwDKNuJhQ04294Q1B0VmY0fXZTAjEBlYd+LaHHruWkx+W1hTroayeXoVv+k6gWdimkF B+CtDXsh1vfRzsfecH3GozVmpvtc936BemPO47qjSCu7WK89QHy3/boeIiok9Fp79Y5p zpRw6kdl6oFk39S8Kab0CRgdnxBm15x1MUxYz3vAgv1e0RHN+DLiL81iHGGX7Nh9hc0M a3hNq1VQ8z3Y40Ps1Psc3GRXmv5asKEB99jguBnc1WABd7mGbKSLFagQOMu7I5cfAv2V sZHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DvglpV1K; 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-1855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1855-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d3-20020a656203000000b005dbcf14be2bsi14900157pgv.800.2024.04.04.04.10.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DvglpV1K; 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-1855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1855-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 41B4628554E for ; Thu, 4 Apr 2024 11:10:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CD5282C8E; Thu, 4 Apr 2024 11:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DvglpV1K" X-Original-To: linux-ext4@vger.kernel.org Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (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 49FDA811FF for ; Thu, 4 Apr 2024 11:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712229042; cv=none; b=ntJbEcNEObVjgGz7dNPV+O0J+EnKDpEo/PbO99ZTzUU5FgpliCcIAl2j4qV7GTC4azOfvy9+6RKLp/nQb1P+MfRUq+fTJPsTL3YMNliSgndJrTr+U1jO2Fen8rp2NJPhhxg0DyGSIEgTei6hB7Sk1iWTNGvlqaznH97VUjK/DhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712229042; c=relaxed/simple; bh=wKemBMY8CuyogRcNlPvt0OFO7viiLuThmcGKiyyXoxE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l1vrgoGdco6Xza5ENukOXg48sepkuOF/qjjQnf5j7wBcBzO5Y0fBewjkuSVkoTlVo4K8Vex70uHkBPFu9Q+P6bv7oQCQTXdKQecelT5NhaoY14kvgr1dYGG6ekbpRq7JwioASNRK2LUo9kNqUTmv1+pohfo9gI4q46Fq72GqRbA= 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=DvglpV1K; arc=none smtp.client-ip=95.215.58.187 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=1712229038; 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=uu4jMZtAqF2jfhYct7x3/bM+bfcCRqhTVsT6Ei2gC34=; b=DvglpV1KnITUoyZ9zgK0zQx9kcoUu60mjPDoxqaShkf+CptMsa/TrnXh/OMNL5OvPb4VXT c3WNaMPxkGW9hV1UsyKlqnxAPEekwO9d1thcdo+MfOup53t26/Fw0lyIKa8fwbXZqtn/sC 9uSkZ7KAgjeiPfFD8U19lkANAg3/txs= From: "Luis Henriques (SUSE)" To: Theodore Ts'o , Andreas Dilger Cc: linux-ext4@vger.kernel.org, "Luis Henriques (SUSE)" Subject: [PATCH v2 3/4] tests: new test to check quota after directory optimization Date: Thu, 4 Apr 2024 12:10:31 +0100 Message-ID: <20240404111032.10427-4-luis.henriques@linux.dev> In-Reply-To: <20240404111032.10427-1-luis.henriques@linux.dev> References: <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 This new test validates e2fsck by verifying that quota data is updated after a directory optimization is performed. This issue was initially found by fstest ext4/014, and this test was based on it. It includes a filesystem image where the lost+found directory is unlinked after a new link to it is created: # debugfs -w -R "ln lost+found foo" f_testnew/image # debugfs -w -R "unlink lost+found" f_testnew/image Signed-off-by: Luis Henriques (SUSE) --- 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 + 4 files changed, 26 insertions(+) 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 diff --git a/tests/f_quota_shrinkdir/expect.1 b/tests/f_quota_shrinkdir/expect.1 new file mode 100644 index 000000000000..e4fc48ea6f90 --- /dev/null +++ b/tests/f_quota_shrinkdir/expect.1 @@ -0,0 +1,18 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +/lost+found not found. Create? yes + +Pass 3A: Optimizing directories +Pass 4: Checking reference counts +Pass 5: Checking group summary information +[QUOTA WARNING] Usage inconsistent for ID 0:actual (3072, 3) != expected (13312, 2) +Update quota info for quota type 0? yes + +[QUOTA WARNING] Usage inconsistent for ID 0:actual (3072, 3) != expected (13312, 2) +Update quota info for quota type 1? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 12/256 files (16.7% non-contiguous), 1145/8192 blocks +Exit status is 1 diff --git a/tests/f_quota_shrinkdir/expect.2 b/tests/f_quota_shrinkdir/expect.2 new file mode 100644 index 000000000000..fcb2cb81441e --- /dev/null +++ b/tests/f_quota_shrinkdir/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: 12/256 files (16.7% non-contiguous), 1145/8192 blocks +Exit status is 0 diff --git a/tests/f_quota_shrinkdir/image.gz b/tests/f_quota_shrinkdir/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..1fee3ca9c9b4cb61974be54b063c8f9e1ba49da1 GIT binary patch literal 10761 zcmeI!Yg7|g9sqEB)W`8bx1RdO)ZK2~wg+(623l%hEf%aaN`M4N2*Cm(86mYeJfb01 zT3v00cI|?jHXu?VugNHJz)nbjBDhu&lzG_D5M3(P84)QRz#$>qp4|_gvpwDYxM!XF z;huZ${c``m|Gocvc^}N1m;c`4oik_U=IzMI4!GC<#3y;#wQZvXIU#QM+qr*va(3?Q z&GR>X5`XhOQp`5Gxx32L^V zZ}sT>M;tx6zxui#I=`kZ$lO^OEqqhg!Z|s6wQal0+LsK5`My4}=UD&wzFUd;{N)?{ zUbdo~9jp(Up7e%#lozrFt1Z3m_(c=NN9xK?6qV6L$-Oi4!*5I;$|KN8|4_z|`dZ}? zKQ(GAS{?2|8lYG1tN`@3j=V8XO?3KZ65)xvh7WOh;Wg6E)v! zU+wj74uzN*lVr(`>XEl6Kan|lC(i{$Hf{~C^Isbc3_LVVfif@8=l#8Q!s`)C&*fe3 zzEak{&G*eRwy#=LcFC?+e?yNeKOBeuxzANTIBHry9bMr+P|o!JxMNcp{ZUo>=!WW= zfbtgqvQ+}MllBqq?GqjI3xG7xjmn*n#HX`0dKw z!``PN{4;);;g?sZzo^yiU$5MCZBNC;g@+C;9ln$$s4iW9w|8-7QNN}Z>bifnZ>iQ* zIQ8H`uO##0%9o2*oVYhKiliRZ=G8kFveT&pYb!@yH!VT?TKrf&EFwRT0%a{ zzkBn2VD_A{=apaSO!d}WrAwE;{vD_{V|{dY$_D%jKdxJ9!|(B9yHg7m#a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inkdir/name b/tests/f_quota_shrinkdir/name new file mode 100644 index 000000000000..8772ae5c814b --- /dev/null +++ b/tests/f_quota_shrinkdir/name @@ -0,0 +1 @@ +update quota on directory optimization