Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753554AbdLNQsK (ORCPT ); Thu, 14 Dec 2017 11:48:10 -0500 Received: from imap.thunk.org ([74.207.234.97]:45528 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbdLNQsI (ORCPT ); Thu, 14 Dec 2017 11:48:08 -0500 Date: Thu, 14 Dec 2017 11:48:05 -0500 From: "Theodore Ts'o" To: Zhouyi Zhou Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, inux-fsdevel@vger.kernel.org Subject: Re: FS: EXT4: should we sync error info in __ext4_grp_locked_error? Message-ID: <20171214164805.lbbsr7nyakhvujes@thunk.org> Mail-Followup-To: Theodore Ts'o , Zhouyi Zhou , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, inux-fsdevel@vger.kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 715 Lines: 19 On Thu, Dec 14, 2017 at 03:13:15PM +0800, Zhouyi Zhou wrote: > Hi, > In function __ext4_grp_locked_error, __save_error_info(sb, function, line) > is called to save error info in super block block, but does not sync > that information > to disk to info the subsequence fsck after reboot. The reason, I guess > maybe it is > in locked state. > My question is why not make a call ext4_commit_super(sb, 1) after > ext4_unlock_group(sb, grp) and ext4_handle_error(sb), so that subsequence fsck > after reboot is sure to be well informed. Adding ext4_commit_super(sb, 1) between the calls to ext4_unlock_group() and ext4_handle_error() is a good idea; it's not a naive suggestion at all. Cheers, - Ted