Received: by 10.223.185.116 with SMTP id b49csp971741wrg; Wed, 21 Feb 2018 09:53:45 -0800 (PST) X-Google-Smtp-Source: AH8x227aNHhJaPW1iCjrRXiWEnfGDdq7mhQwFesIqXbiAqffDGIMCaXKyV20qJrWpGLHUDNWrBvm X-Received: by 10.98.166.85 with SMTP id t82mr4017395pfe.237.1519235625562; Wed, 21 Feb 2018 09:53:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519235625; cv=none; d=google.com; s=arc-20160816; b=Md6vx9wPhovc5kOk9sKTDESUpDx8CywYaXVksjSpr0DsOu2QLjG8XOkQ9DrYaMETRq WiWRIc2A7Iul2zAZXUba23BPYS3BbtS6xDl7JrjChFQMQ53p26Yz1ByJ7dx+ZoL6lwAz g6JLH9vzvst/7M5c1Fe+PgUqMxrRxsJzzXfFS96gWStVM3KbMk57UuybpDcxIpoBLiv9 6eQ/acLa0YM0dVaImwYKrkU7oiGfTElAc5aoScIjhnpPNsXrgaaoEFmz4rVrn47gDlaR YSyCv991RMK7cK90rKVdq+AXmy39TtV7bNotbtcMy4bNyUYldrLcOd6xGez+ywd/ihaX AZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=66/yDDJmFU04YoiDsPVnv8WNv/3PXvqJwS7XRc1uQZI=; b=aF8A4NZfS7cNTdiGqm5aRJHXflp7UwfUolisWx9WO+yjJVuF/kUclW9sETnfgiWwbR M/EOeZFNM9E1x8VPMpZv3KBLNMZ7Oschsd3t1Y2IO0svyaeUT7Sg2E6Ok8/jRsOwoCRw D3j3dOKc6zh+f0rGh7hmieTqxckC9WowOqy4nPQXP0HaRm0ZdQMBD067UtD13zGvl2gt KK8TGFi1kWbTK+U9SkVYqgabNDoPl3C5CthVUZiV1IW7e2zWYSI5QkcUFtxjFjiLqgzZ yULqJyzC2VCxPr+3vevhbFvmDO+i4BsHLEMAv9Uymlkzp7MDPD2QZXmDSil4ZfuPEbU8 iYqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1-v6si1850043plt.549.2018.02.21.09.53.31; Wed, 21 Feb 2018 09:53:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934307AbeBUMzg (ORCPT + 99 others); Wed, 21 Feb 2018 07:55:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:34446 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934283AbeBUMzc (ORCPT ); Wed, 21 Feb 2018 07:55:32 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EBE701130; Wed, 21 Feb 2018 12:55:31 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhouyi Zhou , Theodore Tso Subject: [PATCH 4.9 08/77] ext4: save error to disk in __ext4_grp_locked_error() Date: Wed, 21 Feb 2018 13:48:17 +0100 Message-Id: <20180221124432.521698126@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124432.172390020@linuxfoundation.org> References: <20180221124432.172390020@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhouyi Zhou commit 06f29cc81f0350261f59643a505010531130eea0 upstream. In the function __ext4_grp_locked_error(), __save_error_info() 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. This patch writes the error information to disk. After this patch, I think there is no obvious EXT4 error handle branches which leads to "Remounting filesystem read-only" will leave the disk partition miss the subsequence fsck. Signed-off-by: Zhouyi Zhou Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -720,6 +720,7 @@ __acquires(bitlock) } ext4_unlock_group(sb, grp); + ext4_commit_super(sb, 1); ext4_handle_error(sb); /* * We only get here in the ERRORS_RO case; relocking the group