From patchwork Tue Mar 25 16:31:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vacek X-Patchwork-Id: 14029278 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB62025BAA9 for ; Tue, 25 Mar 2025 16:32:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742920325; cv=none; b=VPadW5mKnjgir1zF0TBG2cPLNjZepoqsEWmJKFRU4YYPaUvL+0lyJNX7IX4c0Lj6BCpPlXJC7FL/89NbtShceHfWT1KwXJKmYYYZC8/z/9AH8MtKZUfmhSPZWFZ2O2Em6fLECvIkjw5Pucp37Epf0hj4bVlC7yP8taXwIN65ClY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742920325; c=relaxed/simple; bh=1lUBDOMjGRWOmxPvFs5znjh0mb0E2PnhADSXXo8+JIU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tPUUJKDv8v1vjabvzka1eKLFA1104nCHc+6w/HmBrQLzXwkd7zsOOT6vEvYSBCfjVxH3NiEZd95WvO/nXavnccMptj1S3dd2kSv6mLWA+jgLCeqgKEqJYC674S7G7nqHYa9+s+EYmTlqr39hsShI5g1Zee682T1hj3PhBe3+rgg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=O9V8YbJN; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=O9V8YbJN; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="O9V8YbJN"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="O9V8YbJN" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E608E2117A; Tue, 25 Mar 2025 16:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1742920313; h=from:from:reply-to: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=zbrZ4qWuclqXy+jQrZfUmrppCeFvyI6i+H+SgRajnyU=; b=O9V8YbJNIQsAyvCEj4tCyQ9W0TOqGwCvLKpJg6Un1jO9Ez+mPM+EXMWj1a7FE27D5Y63p5 7ByAt80C7QPNX1bhcHOS354JiSwL1cPGl3qMIk/PvpqD9AwjZGh1PTCbmoOYRkG9UoDIaZ tcUznQ3C7wNNI7/TvT6LGoQWnCQddOI= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1742920313; h=from:from:reply-to: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=zbrZ4qWuclqXy+jQrZfUmrppCeFvyI6i+H+SgRajnyU=; b=O9V8YbJNIQsAyvCEj4tCyQ9W0TOqGwCvLKpJg6Un1jO9Ez+mPM+EXMWj1a7FE27D5Y63p5 7ByAt80C7QPNX1bhcHOS354JiSwL1cPGl3qMIk/PvpqD9AwjZGh1PTCbmoOYRkG9UoDIaZ tcUznQ3C7wNNI7/TvT6LGoQWnCQddOI= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CCECD137AC; Tue, 25 Mar 2025 16:31:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YBh0MXna4meDSQAAD6G6ig (envelope-from ); Tue, 25 Mar 2025 16:31:53 +0000 From: Daniel Vacek To: Chris Mason , Josef Bacik , David Sterba Cc: Daniel Vacek , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] btrfs: cleanup EXTENT_BUFFER_READ_ERR flag Date: Tue, 25 Mar 2025 17:31:36 +0100 Message-ID: <20250325163139.878473-2-neelx@suse.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250325163139.878473-1-neelx@suse.com> References: <20250325163139.878473-1-neelx@suse.com> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: This flag was added by commit 656f30dba7ab ("Btrfs: be aware of btree inode write errors to avoid fs corruption") but it stopped being used after commit 046b562b20a5 ("btrfs: use a separate end_io handler for read_extent_buffer"). Signed-off-by: Daniel Vacek --- fs/btrfs/extent_io.c | 7 ++----- fs/btrfs/extent_io.h | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index b168dc354f20b..578195959f7cb 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3651,12 +3651,10 @@ static void end_bbio_meta_read(struct btrfs_bio *bbio) btrfs_validate_extent_buffer(eb, &bbio->parent_check) < 0) uptodate = false; - if (uptodate) { + if (uptodate) set_extent_buffer_uptodate(eb); - } else { + else clear_extent_buffer_uptodate(eb); - set_bit(EXTENT_BUFFER_READ_ERR, &eb->bflags); - } clear_extent_buffer_reading(eb); free_extent_buffer(eb); @@ -3695,7 +3693,6 @@ int read_extent_buffer_pages_nowait(struct extent_buffer *eb, int mirror_num, return 0; } - clear_bit(EXTENT_BUFFER_READ_ERR, &eb->bflags); eb->read_mirror = 0; check_buffer_tree_ref(eb); atomic_inc(&eb->refs); diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 2e261892c7bc7..fb3f5815b28e7 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -44,8 +44,6 @@ enum { EXTENT_BUFFER_TREE_REF, EXTENT_BUFFER_STALE, EXTENT_BUFFER_WRITEBACK, - /* read IO error */ - EXTENT_BUFFER_READ_ERR, EXTENT_BUFFER_UNMAPPED, EXTENT_BUFFER_IN_TREE, /* write IO error */ From patchwork Tue Mar 25 16:31:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vacek X-Patchwork-Id: 14029279 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88C2925DD0C for ; Tue, 25 Mar 2025 16:32:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742920332; cv=none; b=ZFw5XCn443JTzwSoSVLjmcNRcA/QtASGcNHZbMl3ilTnSiSs0kgKVwzGEn+RAVKirjGpWq5tcKZ64f4s20KZxRPS/fT3nffUqlc4SNbxVoLwbIkpVChbmcgKTfx1DlvcjQJF/LBcCVkTiUus2zU7kUwn/l8r7/hMKE4z+5gyNMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742920332; c=relaxed/simple; bh=t6Xn95IvU+J2bJaw2+l8nek9BBFTQCW0KHBm5p+6t5c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XsXkWYwfLfuX/lpnOtkwmXEqxGr5q84d5vWLWUQYpVMUkvb3IfkxdCQDevnE1uTC0kAa6RzDmN1pCCejk+rLGt1iLK/aDWDFia2VwnNCKSEf1eQDccvIJBdUFAUESJ2OfknVZEt71J229o+R4hJiKRtcldNadizJw52j4WqnTN0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=AYD44J3b; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=AYD44J3b; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="AYD44J3b"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="AYD44J3b" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 52F132118E; Tue, 25 Mar 2025 16:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1742920314; h=from:from:reply-to: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=keKA1QXk0B3yXlCgjkx5ZeYx5ztU4tYHOV/ICSs8kJM=; b=AYD44J3biQI0Sz1r8LMwF9uCO2TvyqUfYWwibcOeGK6iNfdoMesSILvVbtiIXqUg4aMg1M WQJ60q+oKvbpINbtZCC5iX6kARg1g6vSjplJCpKvzh2vexckMVZuRUGr6yHNZafCmgJJKk ZGFnMlG2TvG2BzADtok+EiGQnEWwXTQ= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=AYD44J3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1742920314; h=from:from:reply-to: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=keKA1QXk0B3yXlCgjkx5ZeYx5ztU4tYHOV/ICSs8kJM=; b=AYD44J3biQI0Sz1r8LMwF9uCO2TvyqUfYWwibcOeGK6iNfdoMesSILvVbtiIXqUg4aMg1M WQJ60q+oKvbpINbtZCC5iX6kARg1g6vSjplJCpKvzh2vexckMVZuRUGr6yHNZafCmgJJKk ZGFnMlG2TvG2BzADtok+EiGQnEWwXTQ= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3CDF5137AC; Tue, 25 Mar 2025 16:31:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id UFInDnra4meDSQAAD6G6ig (envelope-from ); Tue, 25 Mar 2025 16:31:54 +0000 From: Daniel Vacek To: Chris Mason , Josef Bacik , David Sterba Cc: Daniel Vacek , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] btrfs: cleanup EXTENT_BUFFER_READAHEAD flag Date: Tue, 25 Mar 2025 17:31:37 +0100 Message-ID: <20250325163139.878473-3-neelx@suse.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250325163139.878473-1-neelx@suse.com> References: <20250325163139.878473-1-neelx@suse.com> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 52F132118E X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,suse.com:dkim,suse.com:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DKIM_TRACE(0.00)[suse.com:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO This flag is no longer being used. Remove it. It was added by commit ab0fff03055d ("btrfs: add READAHEAD extent buffer flag") and used in commits: 79fb65a1f6d9 ("Btrfs: don't call readahead hook until we have read the entire eb") 78e62c02abb9 ("btrfs: Remove extent_io_ops::readpage_io_failed_hook") 371cdc0700c7 ("btrfs: introduce subpage metadata validation check") Finally all the code using it was removed by commit f26c92386028 ("btrfs: remove reada infrastructure"). Signed-off-by: Daniel Vacek --- fs/btrfs/extent_io.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index fb3f5815b28e7..d0b3526749aa2 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -39,8 +39,6 @@ enum { EXTENT_BUFFER_UPTODATE, EXTENT_BUFFER_DIRTY, EXTENT_BUFFER_CORRUPT, - /* this got triggered by readahead */ - EXTENT_BUFFER_READAHEAD, EXTENT_BUFFER_TREE_REF, EXTENT_BUFFER_STALE, EXTENT_BUFFER_WRITEBACK, From patchwork Tue Mar 25 16:31:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vacek X-Patchwork-Id: 14029280 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30E2D25A322 for ; Tue, 25 Mar 2025 16:32:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742920340; cv=none; b=UD9MIBREjqCTrdbXe5eqLc2Hlo4EKfLnfa22AOMwOG21O2nhS/GI5lS+vt8J3HGf1oMIYNb4a5oVfG0L13/Nq/ToCFmzjvAYwe3hoi5t9GVrVasUxFSFmrBWqpPMYLGtK/jbkX1j9r9Y0O4iBuBd9hFdkrIFyI6hlAeX8kmxpVs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742920340; c=relaxed/simple; bh=+a+aGSk/YWiUCPhe5u/nwtnq9eiwWu7KqUURGQUojxo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LTdj+HywLZObdO7gAcymYOlqiIhoKkpk0IE+J1jX7wJQoCf12WooV7KGT42yO1uVV3Y98XSOrtfiyVmdedaiuh94pjr4JJBBMdert+rqmYeuCFXaqafoB8zEN2NFXy/8LBS+GEnH+2X6bK2/xrIUBlLjoLkkNg2KMttScEbffmE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=tsggc41S; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=tsggc41S; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="tsggc41S"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="tsggc41S" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E04B521193; Tue, 25 Mar 2025 16:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1742920314; h=from:from:reply-to: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=cUJyeMoKB0EHg6JVVeIaUfBU01Do74x3esYio0TY5ck=; b=tsggc41Sy3Yw2tCVHOvihVY3q8S3gaOQg7JJIOh9p25G9ajIVsihlzTIts25K6iZ6y96JV QswoUwW0YRJq01J49mB/v4CfFmxZWY9CND9BV8FAhB7lWsVK5Fthp2/XW9wfVIho6M52xL ff8zGmzGP/1LujJqPpLoxqW0FogV/3g= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=tsggc41S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1742920314; h=from:from:reply-to: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=cUJyeMoKB0EHg6JVVeIaUfBU01Do74x3esYio0TY5ck=; b=tsggc41Sy3Yw2tCVHOvihVY3q8S3gaOQg7JJIOh9p25G9ajIVsihlzTIts25K6iZ6y96JV QswoUwW0YRJq01J49mB/v4CfFmxZWY9CND9BV8FAhB7lWsVK5Fthp2/XW9wfVIho6M52xL ff8zGmzGP/1LujJqPpLoxqW0FogV/3g= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C7C45137AC; Tue, 25 Mar 2025 16:31:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id eE0yMHra4meDSQAAD6G6ig (envelope-from ); Tue, 25 Mar 2025 16:31:54 +0000 From: Daniel Vacek To: Chris Mason , Josef Bacik , David Sterba Cc: Daniel Vacek , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] btrfs: cleanup EXTENT_BUFFER_CORRUPT flag Date: Tue, 25 Mar 2025 17:31:38 +0100 Message-ID: <20250325163139.878473-4-neelx@suse.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250325163139.878473-1-neelx@suse.com> References: <20250325163139.878473-1-neelx@suse.com> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: E04B521193 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.com:dkim,suse.com:mid,suse.com:email]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DKIM_TRACE(0.00)[suse.com:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: This flag is no longer being used. Remove it. It was added by commit a826d6dcb32d ("Btrfs: check items for correctness as we search") but it's no longer being used after commit f26c92386028 ("btrfs: remove reada infrastructure"). Signed-off-by: Daniel Vacek --- fs/btrfs/disk-io.c | 11 ++--------- fs/btrfs/extent-tree.c | 6 ------ fs/btrfs/extent_io.h | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1a916716cefeb..6303d4dda8725 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -224,7 +224,6 @@ int btrfs_read_extent_buffer(struct extent_buffer *eb, ASSERT(check); while (1) { - clear_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags); ret = read_extent_buffer_pages(eb, mirror_num, check); if (!ret) break; @@ -452,15 +451,9 @@ int btrfs_validate_extent_buffer(struct extent_buffer *eb, goto out; } - /* - * If this is a leaf block and it is corrupt, set the corrupt bit so - * that we don't try and read the other copies of this block, just - * return -EIO. - */ - if (found_level == 0 && btrfs_check_leaf(eb)) { - set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags); + /* If this is a leaf block and it is corrupt, just return -EIO. */ + if (found_level == 0 && btrfs_check_leaf(eb)) ret = -EIO; - } if (found_level > 0 && btrfs_check_node(eb)) ret = -EIO; diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 957230abd8271..47db37b7236d3 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3488,12 +3488,6 @@ int btrfs_free_tree_block(struct btrfs_trans_handle *trans, trace_btrfs_reserved_extent_free(fs_info, buf->start, buf->len); out: - - /* - * Deleting the buffer, clear the corrupt flag since it doesn't - * matter anymore. - */ - clear_bit(EXTENT_BUFFER_CORRUPT, &buf->bflags); return 0; } diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index d0b3526749aa2..c74e4a07d0ad1 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -38,7 +38,6 @@ struct btrfs_tree_parent_check; enum { EXTENT_BUFFER_UPTODATE, EXTENT_BUFFER_DIRTY, - EXTENT_BUFFER_CORRUPT, EXTENT_BUFFER_TREE_REF, EXTENT_BUFFER_STALE, EXTENT_BUFFER_WRITEBACK,