From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9DE0E3AB5AC for ; Thu, 21 May 2026 08:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779352649; cv=none; b=ZyehpIrKd8YCNeGVzMtXeTiXAIHzH49RgkQGr+3xwdLIl5JTvUgFEJE5wj0AWudX79hJ+sI+Nsgnlce0EMspR0GwX4W6/oLDopOx92+Y4gb1Tq60tUeqz2zNwI8Iz1Zb+08dJfwc6ylNGAj/656mwdGY50rsPhZphO0C96A1yQU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779352649; c=relaxed/simple; bh=5HB5ASxZoWCJ0+66KEl3j1NqPFXe6+zO6aBVu8FhzZ4=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=bgeqXmKZ25JaRepWOlkQ8tdSAuDOWqYcxgTvs/WcC3YknvITtnk5W3pUgkjNTdeSW1QN5Yp19BskdAePbRIb6OrqNp0e1jJOIYHqoGjQXK1nPASbczMU9IX3ZD49zhM+jxNInGclfhkqyIcYzx76b5ch4Ae0iwjRdOQw92qnuug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jjIit9ns; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jjIit9ns" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DDCD1F01561; Thu, 21 May 2026 08:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779352646; bh=jeGQAOpwRLcc6vKzwNWEYiTrpfsLN7h1HzF/mzgI66w=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=jjIit9nscSq+bfVMurspSl8fFCavRbj6G1REyMfjvJ71C+leNc/bLtUAB0jvka9x+ jQ2KwjPGVgaQeOLfu9lMKbe8wb3CAmy5MEJM6hckoNZeCwnkXyfSpuo2tWbFLNjieb c/j/Pq/5E0Dmpb+l8qljCKKHOgG7A0h+R6pm69uac+270pOTEhqC74K46cW74259P1 QBiHiWlvItR1Y4kZWJVIJtldlDz1C8+t6q9OTK1c79oqGMLPmRlhA9kbrVesePBUrv RBmMpUgMD7r1XMHCSuYyWgZO/Z47BGhyQTPJsgf7czag/y7hwC7xzkae+h/jplKXgt JQSUJT5vepfgA== Message-ID: <389b09ff-ecac-44ed-8303-837408ddee17@kernel.org> Date: Thu, 21 May 2026 16:37:22 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, djwong@kernel.org, qiwenjie@xiaomi.com Subject: Re: [PATCH] f2fs: avoid false shutdown fserror reports To: Wenjie Qi , jaegeuk@kernel.org References: <20260521015126.1663277-1-qiwenjie@xiaomi.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20260521015126.1663277-1-qiwenjie@xiaomi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/21/26 09:51, Wenjie Qi wrote: > F2FS records image errors and checkpoint-stop reasons through the same > s_error_work worker. The ordinary f2fs_handle_error() path only updates > s_errors, but the worker still calls fserror_report_shutdown() > unconditionally after committing the superblock. > > As a result, a metadata corruption report can be followed by a synthetic > FAN_FS_ERROR event with ESHUTDOWN and an invalid superblock file handle, > even though no stop reason was recorded. > > Track whether save_stop_reason() actually changed the stop_reason array > and only report the shutdown fserror for that case. Pure s_errors updates > still commit the superblock, but no longer generate a false shutdown event. > Cc: stable@kernel.org > Fixes: 50faed607d32 ("f2fs: support to report fserror") > Signed-off-by: Wenjie Qi Reviewed-by: Chao Yu Thanks,