From patchwork Thu Nov 16 17:30:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13458125 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 966C4364DC for ; Thu, 16 Nov 2023 17:30:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gkJAwVbN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AE8EC433C7; Thu, 16 Nov 2023 17:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700155808; bh=8fgMiaOwvvo0LjagEIQNbD5Cef9tfwK2MmuSYtBow2s=; h=Subject:From:To:Cc:Date:From; b=gkJAwVbNanDjDTRuC6R6JdUO+kJIitlx0jEGGoCgHMsrh7zMKHfh8korTckLMWEfQ u959BRVVZPdMDvAnwF9I1X/s3dYYYSgE4SFhBgUpheel3PiMpkcKqc01DV7x/CKulN Rym9QMxO8HDHmT8erDS6Cf58zB1kF7OJ2OlQSKcf30OyRSVBO60HO4m0AY3N0R45Av AqmKKwrfIugcaplmOzn3j8kjRTXnynNe8nked7ZAdSu3ySx5vXtWMtyhdP25oQ4iAQ nuy+kSKNA08abB2w8JVFuDDhJef1KD4NZAY0WK1O22JRK77gFF4T0FHN3Mo95cS/JR ZJilWN8Nu2umw== Subject: [PATCHSET v5 0/2] fstests: reload entire iunlink lists From: "Darrick J. Wong" To: zlang@redhat.com, djwong@kernel.org Cc: Christoph Hellwig , fstests@vger.kernel.org, david@fromorbit.com, guan@eryu.me, linux-xfs@vger.kernel.org Date: Thu, 16 Nov 2023 09:30:07 -0800 Message-ID: <170015580749.3367597.13675483508180016662.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi all, This is the second part of correcting XFS to reload the incore unlinked inode list from the ondisk contents. Whereas part one tackled failures from regular filesystem calls, this part takes on the problem of needing to reload the entire incore unlinked inode list on account of somebody loading an inode that's in the /middle/ of an unlinked list. This happens during quotacheck, bulkstat, or even opening a file by handle. In this case we don't know the length of the list that we're reloading, so we don't want to create a new unbounded memory load while holding resources locked. Instead, we'll target UNTRUSTED iget calls to reload the entire bucket. Note that this changes the definition of the incore unlinked inode list slightly -- i_prev_unlinked == 0 now means "not on the incore list". v2: rebase to for-next, resend without changes v3: add necessary prerequisites v4: fix accidental commit to wrong patch v5: add more review tags If you're going to start using this code, I strongly recommend pulling from my git trees, which are linked below. This has been running on the djcloud for months with no problems. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=fix-iunlink-list fstests git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=fix-iunlink-list --- common/fuzzy | 4 - common/rc | 36 ++++++++- tests/xfs/1872 | 111 +++++++++++++++++++++++++++ tests/xfs/1872.out | 5 + tests/xfs/1873 | 215 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1873.out | 6 + tests/xfs/329 | 4 - tests/xfs/434 | 2 tests/xfs/435 | 2 tests/xfs/436 | 2 tests/xfs/444 | 2 tests/xfs/516 | 2 12 files changed, 381 insertions(+), 10 deletions(-) create mode 100755 tests/xfs/1872 create mode 100644 tests/xfs/1872.out create mode 100755 tests/xfs/1873 create mode 100644 tests/xfs/1873.out