From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80CFFC7EE23 for ; Thu, 8 Jun 2023 14:56:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236178AbjFHO4H (ORCPT ); Thu, 8 Jun 2023 10:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235886AbjFHO4H (ORCPT ); Thu, 8 Jun 2023 10:56:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DE66273A for ; Thu, 8 Jun 2023 07:56:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8481760F3A for ; Thu, 8 Jun 2023 14:56:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D75B7C433EF; Thu, 8 Jun 2023 14:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686236161; bh=QCdEzl7oMl1eVC4a2Wvlm86FD9Civ1jaNYijNbU0c9w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YYPKVGO9J5dhUJljonTd3vXaCM/zq3OqFjI1EaIt+jQOpbizBIPTtVRjf6DrTgIag GWsZlxrLzQCJVrK8X1tdr9AJFy/hTwqVxixhqDIYqmQRBjpUqKx9QcXx7W6DCTdito Et3LWpk7mTqQqTx6fn3IxEZB+YMPbHtXcr7tW7KDUh6grGIPKfKXtsxMdFiqAJNYGX 9Zq+WtFAFGM3OkjJeLl0ZmeVVvnneI4F1VybPOSfkE5dDa0dnelinBWDVrhB+bopwU yW3M15usi0ffK1ree4HKLaKlXsYxF0w9/e8ZZw+is9Z5koz5n9yTvu4KbC+f+4CqeR P2roC+jxDamDA== Date: Thu, 8 Jun 2023 07:56:01 -0700 From: "Darrick J. Wong" To: Shiyang Ruan Cc: linux-xfs@vger.kernel.org, cem@kernel.org Subject: Re: [PATCHSET v25.0 0/7] xfs_scrub: fixes to the repair code Message-ID: <20230608145601.GW1325469@frogsfrogsfrogs> References: <20230526000020.GJ11620@frogsfrogsfrogs> <168506071314.3742205.8114181660121831202.stgit@frogsfrogsfrogs> <4af2621e-bd59-f1be-8e07-7800a68c59fa@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4af2621e-bd59-f1be-8e07-7800a68c59fa@fujitsu.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Thu, Jun 08, 2023 at 09:22:02PM +0800, Shiyang Ruan wrote: > Hi Darrick, > > I'm running test on this patchset (patched kernel and xfsprogs, latest > xfstests:v2023.05.28). Now I found xfs/730 failed with message "online > scrub didn't fail". The detail is: > > FSTYP -- xfs (debug) > PLATFORM -- Linux/x86_64 f36 6.4.0-rc3-pmem+ #309 SMP PREEMPT_DYNAMIC > Wed Jun 7 15:44:15 CST 2023 > MKFS_OPTIONS -- -f /dev/pmem1 > MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/pmem1 > /mnt/scratch > > xfs/730 - output mismatch (see > /root/xts/results//default/xfs/730.out.bad) > mv: failed to preserve ownership for > '/root/xts/results//default/xfs/730.out.bad': Operation not permitted > --- tests/xfs/730.out 2023-03-16 09:42:15.256141472 +0800 > +++ /root/xts/results//default/xfs/730.out.bad 2023-06-08 Whoah, someone besides me actually runs the repair fuzzers?? Yay! > 20:43:27.436083265 +0800 > @@ -1,4 +1,14 @@ > QA output created by 730 > Format and populate > Fuzz fscounters > +icount = zeroes: online scrub didn't fail. > +icount = ones: online scrub didn't fail. > +icount = firstbit: online scrub didn't fail. > +icount = middlebit: online scrub didn't fail. > ... > (Run 'diff -u /root/xts/tests/xfs/730.out > /root/xts/results//default/xfs/730.out.bad' to see the entire diff) > > > This test case is to fuzz metadata and make sure xfs_scrub can repair the > fs. After a little investigation, I think the fuzz actually done to the > metadata area but the xfs_scrub seems didn't notice that. I haven't found > the root cause of the problem yet. Do you have the same message which > causes fail on this case? Yeah, we recently disabled some code in fscounters.c to fix some other correctness problems in the inodegc code. My goal was to get this series: https://lore.kernel.org/linux-xfs/168506061483.3732954.5178462816967376906.stgit@frogsfrogsfrogs/ merged for 6.5 and then the whole thing would work *completely* correctly, but it might be too late now. --D > > -- > Thanks, > Ruan. > > 在 2023/5/26 8:38, Darrick J. Wong 写道: > > Hi all, > > > > Now that we've landed the new kernel code, it's time to reorganize the > > xfs_scrub code that handles repairs. Clean up various naming warts and > > misleading error messages. Move the repair code to scrub/repair.c as > > the first step. Then, fix various issues in the repair code before we > > start reorganizing things. > > > > If you're going to start using this mess, you probably ought to just > > pull from my git trees, which are linked below. > > > > This is an extraordinary way to destroy everything. Enjoy! > > Comments and questions are, as always, welcome. > > > > --D > > > > xfsprogs git tree: > > https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=scrub-repair-fixes > > --- > > scrub/phase1.c | 2 > > scrub/phase2.c | 3 - > > scrub/phase3.c | 2 > > scrub/phase4.c | 22 ++++- > > scrub/phase5.c | 2 > > scrub/phase6.c | 13 +++ > > scrub/phase7.c | 2 > > scrub/repair.c | 177 ++++++++++++++++++++++++++++++++++++++++++- > > scrub/repair.h | 16 +++- > > scrub/scrub.c | 204 +------------------------------------------------ > > scrub/scrub.h | 16 ---- > > scrub/scrub_private.h | 55 +++++++++++++ > > scrub/xfs_scrub.c | 2 > > 13 files changed, 283 insertions(+), 233 deletions(-) > > create mode 100644 scrub/scrub_private.h > >