From patchwork Fri Dec 15 02:32:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhouyi Zhou X-Patchwork-Id: 848847 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="thrcr6cu"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yyZGC2xyHz9sMN for ; Fri, 15 Dec 2017 13:32:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754844AbdLOCce (ORCPT ); Thu, 14 Dec 2017 21:32:34 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:42803 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754594AbdLOCcd (ORCPT ); Thu, 14 Dec 2017 21:32:33 -0500 Received: by mail-pg0-f65.google.com with SMTP id e14so4791180pgr.9; Thu, 14 Dec 2017 18:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3VVP4VpEUyKLQ/7ip023OI9JuOopIye3CcWSi62n4Z8=; b=thrcr6cukAcwH32cbqnQ3SxwEVOVug2T6i7sczQcDj34e/6NdsfleOh82z5apugXxn HGApsY64LvqV5Vx1ot5uvhu5Z+QCWvduCt2KZfa2SiRTHYzN6Uvy1vqL7niixE4X0m0h vdVXXZHhYBqQWqXYH1cbtx+oXCgT02bmrpp7PWu1aE0Mqtw9F7t20oTiZgfWawgo8Fjp Xcnb2PKSsb+x9dVc996zEHJwzSXpzfXCtsv9fJzlJEwGqLvlA2x9HooLPZb6d6yRfKkT cF1A6mLehVP8UK3cayN2z0acEHtcVTozMqKCo0ATuR9kKBO2bPrhTOA2KYZiLuerGNLW CNaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3VVP4VpEUyKLQ/7ip023OI9JuOopIye3CcWSi62n4Z8=; b=eS89k7H5sirlAItgoJlfWTdZ6Y6bsNhYGPLv/MPy5r+jjQbFgfArxMGT1Amfa8HBuW zTr1WBSZLHEYJ/QqfYI4bLANP0okrESVe5h+/F18oUX1c5dIJzgFvfAGxaK1LfT+em5V b3l9R1uMCGq9FN8V3xaq9PZ0MpUVYE3nDuTG/5Srblm5t9nBw//xPfO07WonkUmPoYJW eOhGkp2hwCAOIa+6Hv8h1IbBVH1uIaQqwHxjwx16eSB8bLGQnS+zALhmrfgM32OhNwRY 8b++33uilTqLbflwj6qo7fyhYOhFue5hez7fLInDwBlEiqLT3XphOHVGS3HqNNihd6V1 D0Zw== X-Gm-Message-State: AKGB3mJDlQKQO1iZ8vuSuXUgsvhuN5CQUg+BnpoBEqla4qcAKOGcnbPj JxV2aMmH6Mp91zeBVpHgKf3wGQ== X-Google-Smtp-Source: ACJfBov2x72kkPAn9+11Dyan2pUq1z7zB71XRkF42h8g1u4BCJj9vWxs+dsMY90Zh0BS3QaD+TZyqA== X-Received: by 10.159.231.5 with SMTP id w5mr11612707plq.314.1513305152719; Thu, 14 Dec 2017 18:32:32 -0800 (PST) Received: from localhost.localdomain ([118.193.167.117]) by smtp.gmail.com with ESMTPSA id l80sm10019377pfk.67.2017.12.14.18.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Dec 2017 18:32:31 -0800 (PST) From: zhouzhouyi@gmail.com To: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Zhouyi Zhou Subject: [PATCH] FS: EXT4: syn error in __ext4_grp_locked_error Date: Fri, 15 Dec 2017 02:32:16 +0000 Message-Id: <1513305136-27652-1-git-send-email-zhouzhouyi@gmail.com> X-Mailer: git-send-email 1.7.1 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Zhouyi Zhou In 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 sync the error information to disk. After this patch, I think there is no obvious EXT4 error handle branche which leads to "Remounting filesystem read-only" will leave the disk partition miss the subsequence fsck. Compiled in x86_64 Linux Signed-off-by: Zhouyi Zhou --- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 7c46693..7159438 100644 --- 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