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 8D3F7C19F2B for ; Tue, 2 Aug 2022 06:53:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232071AbiHBGxa (ORCPT ); Tue, 2 Aug 2022 02:53:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231521AbiHBGx3 (ORCPT ); Tue, 2 Aug 2022 02:53:29 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454595FFC for ; Mon, 1 Aug 2022 23:53:25 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 61DEA3465D for ; Tue, 2 Aug 2022 06:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1659423203; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ATyHcvsn2cZzii0+eSr7qjUEsOZgVGkXDMd7Q7/F1DM=; b=ZPDpRA5hYlMRXqEwVtYKk1T5NUTyAPQmWvSR1JgsOW6icObXZrSmMRZBmtx0EuUTf4b3vg FsIpELazzNLVOcjodo3DN/4Sf9SM+jp3rpIhnIoW4l2OL1hznMCeW50zOnjWsSt9gHVMc2 NkCDOBLMXnkWpVdy6c6Hn74giPIQnX4= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A10131345B for ; Tue, 2 Aug 2022 06:53:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eTrAGeLJ6GKVHwAAMHmgww (envelope-from ) for ; Tue, 02 Aug 2022 06:53:22 +0000 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH 0/2] btrfs: scrub: small enhancement related to super block errors Date: Tue, 2 Aug 2022 14:53:01 +0800 Message-Id: X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Recently during a new test case to verify btrfs can handle a fully corrupted disk (but with a good primary super block), I found that scrub doesn't really try to repair super blocks. And scrub doesn't report super block errors in dmesg either. So this small patchset is to fix the problems by: - Add explicit error messages for super block errors - Try to fix super block errors by committing a transaction Qu Wenruo (2): btrfs: scrub: properly report super block errors in dmesg btrfs: scrub: try to fix super block errors fs/btrfs/scrub.c | 71 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 21 deletions(-) -- 2.37.0