Received: by 10.223.185.116 with SMTP id b49csp1022524wrg; Wed, 21 Feb 2018 10:43:31 -0800 (PST) X-Google-Smtp-Source: AH8x227gZ2soHFKSa7hOChuVFjlR/DXCyxMH2kdBua5dBCY8I1SjGmT0PVv0dqO7QjFUDJrz2gS1 X-Received: by 2002:a17:902:66e6:: with SMTP id e93-v6mr3934817plk.173.1519238611730; Wed, 21 Feb 2018 10:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238611; cv=none; d=google.com; s=arc-20160816; b=dKDBQfAkY+HD3nxILvSAmEoWJkn9O/tYFY3/gxN7Gh50+RzP/2fHM9+dCPgvuWbYf5 HxmNcv2fux1b3bXeEuOeoCVNLBCGD+wyXgsVSwxGMItT9aTWH3ISHuNhVtbhluCN/tbB J5T+CQFDaoPzdlioWIDzWPxFVtH6BlpNujQ3RAaPn9hQr+Imm/8Z8TBX8M+falgjD+t/ mUP8XE+FMhZAJlzEoearcrwqPgtJ30tOYSWKThGBsOd4O0THoqIsq+x+hd9OSeHKZlFn AsK8T9fNGJoLoeheF8yaS4ZkZim0BuVx0IiuLffeCMK85XNolJUtXDEAnjZWIRvpjWM+ 4xTA== 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=P+7Xs2ChQ7oHVpCqhnQcAEq9nouksJ/0W2l1ck2Gbos=; b=rgBz0kY2S+ACqOaAJzH8zx/3HIiDTBoBmveJ77wi8pVy6FrIdvwf0ZwUj1Io1oDd7z vy+LyN4591jfyIZ/J/UzSvhbg6aN8BygezThlkx4uuh/bNjcRcC6bQqlq2+Dk7vERETz ttvxF7rea7avn9TgJcKf7y/4tVmFLB9eZTTj6oUKwUltSP29gTVZSrWUCVxk3Y3prWsX tlVk7IThR1bQ5Twx+AEBHUdhoUpjzw6C5J3eXyc8d43s7EAf9q4eESD7RMtgoL+MlnGx cF+5kXUwnjpPOa+6BFYi2eqQ9iohCi9bKxmUDAhT9kJzEoYEpe/OA15p+X/GAqYtksmp uMSw== 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 c3-v6si1470406plo.708.2018.02.21.10.43.17; Wed, 21 Feb 2018 10:43:31 -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 S936722AbeBUN2p (ORCPT + 99 others); Wed, 21 Feb 2018 08:28:45 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44148 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936260AbeBUNK4 (ORCPT ); Wed, 21 Feb 2018 08:10:56 -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 6DEE21231; Wed, 21 Feb 2018 13:10:28 +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.15 108/163] ext4: save error to disk in __ext4_grp_locked_error() Date: Wed, 21 Feb 2018 13:48:57 +0100 Message-Id: <20180221124536.197167973@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@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.15-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