Received: by 10.223.185.116 with SMTP id b49csp734368wrg; Wed, 21 Feb 2018 06:08:13 -0800 (PST) X-Google-Smtp-Source: AH8x2277mPzXFJgOiQfVitH2vNC+LQyKTaZ9x7WEX8w/yK+glGN74pHmpHemy3B28TRCN2ShyInv X-Received: by 2002:a17:902:9a49:: with SMTP id x9-v6mr3315046plv.84.1519222093170; Wed, 21 Feb 2018 06:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519222093; cv=none; d=google.com; s=arc-20160816; b=qoUnKmt65+OaUFEJy40oENBMCQSASG1LQiS7halnoYm+E5EKTeL0wh2Lhu0KYox4HP va/qrA86wl+eHANT7byEtywyDaGayT3Bs+cumGdgNxZPjiGFvajD1OlY4zs6+uGaGRyb J2ylhkCVg0NM19g+MB6yTuGt/uoKGnNiPKBp7DWY+cC9pWlGdhX75FOAIzMHdRMntk6Z 2myaLT7AYpZpfas+AEec+c+DZ7L4uSuCn4vodY6cq7aOnHQHhJ8lAItGjZdrlg2ihCPA 8NXAVpQ4NRi4qzM2aoJp35R/eil5+m0vBhc7HNbSJXxXdEkTQZkoEGcB3p+BJa0G0cdJ /sPg== 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=ehdTZ9tMCzT29CfFvg6WTUfaLoaThhRTBn3tlzfiowg=; b=r6X9BYwQzFuxWKwL2+qw3CqvAJS4KrhfBlxg+BwFAK12tKBT0aMd9wPPCcmr2CN8WD 2Zi2sWf/h+8FnLpryduUIj2KtY27GVyRxl7jotD/sb9djj9I7yqqzdX+P8/ywqqkgG+e tQiRnyr7zx61Op46zPoKwRrxYCL/09fQxfE9DxnV2xC67ftoqbFYnyysp9UBuqYejSro 0Zoo4voAvS93WKBQQYHVIepUbb3jXymlVeXm30Gn2jes8ZD1xiHkzD3h5oPwaxkOMF8J Kmpb9kUWjM+DSmNUxSD9aiTCdlxns6SHr1n2u+J5mGMKly7QUBlN34xlnSzB5ysw3bwi Hgvw== 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 a10si3419129pgq.154.2018.02.21.06.07.34; Wed, 21 Feb 2018 06:08:13 -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 S937284AbeBUOBU (ORCPT + 99 others); Wed, 21 Feb 2018 09:01:20 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39546 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935725AbeBUNDY (ORCPT ); Wed, 21 Feb 2018 08:03:24 -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 073F210B2; Wed, 21 Feb 2018 13:03:23 +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.14 107/167] ext4: save error to disk in __ext4_grp_locked_error() Date: Wed, 21 Feb 2018 13:48:38 +0100 Message-Id: <20180221124530.228653898@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124524.639039577@linuxfoundation.org> References: <20180221124524.639039577@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.14-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 @@ -742,6 +742,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