Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2099898lqz; Tue, 2 Apr 2024 07:17:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTbhAqNjgRk3+6lS5e3LnTiMAD89MOXvzScb/snyzGlTXvcmy+u818IE4jI+LQF365o9uEdZ/t150HXa58qy4GNJgYNdAqXKiZhS8spQ== X-Google-Smtp-Source: AGHT+IGpc0iiqN6hXx0ty/zovIOa4RK+e6XyUumSYxDsYskqTAk9tZ3yullcf7ga5SDY/iYyqoqU X-Received: by 2002:a17:90b:1995:b0:2a2:510f:fa4b with SMTP id mv21-20020a17090b199500b002a2510ffa4bmr2480397pjb.10.1712067443912; Tue, 02 Apr 2024 07:17:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712067443; cv=pass; d=google.com; s=arc-20160816; b=w7Snocwz6jvF+VyjmU8gXfMn/iThIydg6pxfnsjB7IkCpnbZlyMSJ/w9MKXFwjV7Hp JVnt4OzO+ozwfcyD9CCh2FNplL3UqOKyRdh+KRgA/p6jU2ZM3z49Oe7tk9TCAM15KHQM +W0/HypO9t0SvkwCPcK3scMIHeURX58RC4aEG/+9pHIvXuxVLab3/HoudQ9KOa1YN+Mx l3TVOJwhw7M5LhRRc4JwDe0VFHTFnfuUUwLw6q1skxdbjGI19Akpxirr5M/5xFIf23dk svuzOFhAX5do3ft9G1zpjTM1Z5LbHRsJ13CT5pflHkMnFoy2OG07o7MDfDIm5OBT4tyc R3dg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=EDKfFI/MK59Eu0ZaaJodaZdy/viIMVvvTLPpgbuTNEQ=; fh=pXzpBr7xk1fy5fWPmkGKWV3Z6LayOr9wkgX+uBsFj78=; b=mdxx5Y/m85euU/PPDpHwbif/TVB3LiZjFMlH6niGxlj2Jl6b1RdYjnbmzWM4XQQrUW uHFB/A8OX7K11n9Kt2+9KmYB5QVgeUW9pBRhqNJVukWLi0inZZC0BbjuIZi7GBZO/5oV qGmfFpeupT2ZI5415LdgngNkcHFdMTQYPFEP7BqZQ+XWqtFBszwdD9ieREwzc71z92vS dhWPklmgf1oPaLUjX7rnHXwoS4ClmltZ1ietSki/E0p6Kdl4beiwza1nJpIWKS75xHOM dSdRT/ETuyA3H9kKONYcNiCIkOGuS9ZiRpPF1yOiaJEh2IXLF57VihSgb11pu95FrHIq kO5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ENyzKiD1; 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-1824-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1824-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 kk18-20020a17090b4a1200b002a266a0f18asi920963pjb.58.2024.04.02.07.17.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 07:17:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1824-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=ENyzKiD1; 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-1824-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1824-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 28D5A28326B for ; Tue, 2 Apr 2024 14:17:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 141C48615C; Tue, 2 Apr 2024 14:17:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ENyzKiD1" X-Original-To: linux-ext4@vger.kernel.org Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 380EF80BEE for ; Tue, 2 Apr 2024 14:17:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712067439; cv=none; b=N3U/d8rdEsdbO9vTzJK8y0xgfVuiKScmvRwqNy2M0/G7C8jvscMp1Bm+h3By1NXdK5TknC5A/lhwrhddpdb3U42Do1Oz5fR4F0hdEDX3tUUU8u1A7OCOurUEreBGpfEKitR/n7L36yXQnlqeX6rPLFKXum1Ih70yxXkZyJTrtC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712067439; c=relaxed/simple; bh=qdU1LPMTceUbpTDIyrS+WI7iP0WL7bUg/Qbw9gO2TAY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Qzobva9CMz6SIJOy5BuLl45cw7sUs8cyxJeQtCoGlucVJqwa0iHYBbt9kaYm4qMx1Dp/jPEOafbF8HwHD6N6Q2JQdrVRKBeH2AYvkhE3yjn9txYbslPRbOvxnHrRscDIWdrPKhcac6q5N/4reMm2tt2boguHal0vFXgDKK1FvLA= 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=ENyzKiD1; arc=none smtp.client-ip=95.215.58.174 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=1712067434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EDKfFI/MK59Eu0ZaaJodaZdy/viIMVvvTLPpgbuTNEQ=; b=ENyzKiD1nYXvLZiEOspnzvQ9JhGrWP5bfuVM2oKEpGg4pNvMIaaocTXhw4rnnKBxGF7lSg yPb4+i3877lztLgK3rr0fQmi9zN2VdjcqrQp/SbS0dfpe/JS/Z5jWpXWYOQe2J5f+k0ULj 2yYssK48KQlIJ6t1LGH6ISmAAYQjhso= From: Luis Henriques To: Andreas Dilger Cc: Theodore Ts'o , linux-ext4@vger.kernel.org Subject: Re: [PATCH 3/4] tests: new test to check quota after directory optimization In-Reply-To: (Andreas Dilger's message of "Mon, 1 Apr 2024 15:01:33 -0600") References: <20240328172940.1609-1-luis.henriques@linux.dev> <20240328172940.1609-4-luis.henriques@linux.dev> Date: Tue, 02 Apr 2024 15:17:10 +0100 Message-ID: <87il0zhms9.fsf@brahms.olymp> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Andreas Dilger writes: > On Mar 28, 2024, at 11:29 AM, Luis Henriques (SUSE) wrote: >> >> This new test validates e2fsck by verifying that quota data is updated >> after a directory optimization is performed. It mimics fstest ext4/014 >> by including a filesystem image where a file is created inside a new >> directory on the filesystem root and then root block 0 is wiped: >> >> # debugfs -w -R 'zap -f / 0' f_testnew/image > > I appreciate the test case, and I hate to be difficult, but IMHO this > test case is not ideal. It is *still* reporting quota inconsistency > at the end, so it is difficult to see whether the patch is actually > improving anything or not? Maybe I misunderstood how the tests really work. Here's what I understood: e2fsck is run twice. During the first run the filesystem is recovered. And that's the output of expect.1 -- it reports the quota inconsistency because quota data needs to be fixed. And it is fixed in that first run, where e2fsck returns '1' ("File system errors corrected"). The second time e2fsck is run (expect.2) it will do nothing, and '0' is returned because the filesystem hasn't been modified. Without the first patch in this series the second time e2fsck is executed it will still fail and report inconsistencies because the first time the fix wasn't correct. (And after this second time the filesystem should actually be corrected, a third run of e2fsck should return '0'.) > This is because the image is testing a number of different things at > once (repairing the root inode, superblock, etc). IMHO, it would be > better to have this test be specific to the directory shrink issue > (e.g. a large directory is created, many files are deleted from it, > then optimized), and ideally have a non-root user, group, and project > involved so that it is verifying that all of the quotas are updated. Right, that makes sense. However, I'm failing to narrow the test to that specific case. I've tried to create a bunch of files in a directory and used the debugfs 'kill_file' to remove files from that directory. However, in that case e2fsck isn't reporting quota inconsistencies as I would expect. Which may hint at yet more quota-related bugs. But I'm still looking. Cheers, -- Luis