Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp34003pxb; Tue, 24 Aug 2021 19:13:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRzIqb0hPNEP9XDXY4mCFcDErIcNDyFj9TzN0Jpd+lSb11R6ZAQqO/VR0dabh+y+O4nHqK X-Received: by 2002:a05:6e02:12a2:: with SMTP id f2mr28532333ilr.222.1629857611498; Tue, 24 Aug 2021 19:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629857611; cv=none; d=google.com; s=arc-20160816; b=dx5A8wijOdUzDgCRm/oar0gZ19PEH5XvM0R9Rmu7LfjYOK1mtk7lOSwrfUTpSBI/ie /O95ggTSm2A8gvxmZ8BLo0zmOdDcpd1LFIsYcBtA4CKA8exDADgjAwSVtn+VN6VHyGlu Tm1FXM5fI/9DMyo0AJA99hJK103vPMkDpGWQTO8Eovi6aXltN6p38QvoPaclHi+Pfgj9 2HvWWUg+yuST3Np2GNc98J/AnozHo2XhzTqbXhSBTPZumsFNgpXP0zOMhvyN6MEK/RFs ZymbPoF+wI2MIPG08kVOyu1EzuAYPPxcvq8++3vHYGHXF2OqiL7hDkp2ieHREnGumRcn d0Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:date:message-id:subject:from:cc:to; bh=yLiv5Pz+3Urh2yUeydhh3Zx82KI7imXyCU4zrrNQits=; b=lNhGZdJ8Vjj1xJw3vv0vznaoefxZEEGXHvIpJAkDCr1E+ZNENPa/1qTFeUxQakxhYh kHqg/M5yt/6vpNao4X7cCIeSeRTtjn/Xnbvo2uFvsEmY9p+cJiTQlr3y/q2OXSH3b9Ll jbeufSlIZXDaOA+UOqcklgpnLnSJlDWhgPdz0XaJNYz5+9wRMt/B21Igzn6nnVVb6J1p XzFYhQMswkCAMILX6LBAyFQZ3jCrj0EJY2LRGZ0nIPHNgGJRatXphfRXusIIu8AnXVW3 K8ztI54+pI5wa7XXkx5xJ2MArZfAxQo5+uyl5A9O8YSQHK0/Wngyg/r1JHGWbQFLWbZO kmcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si19677666jap.64.2021.08.24.19.13.12; Tue, 24 Aug 2021 19:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235605AbhHYCNv (ORCPT + 99 others); Tue, 24 Aug 2021 22:13:51 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:8924 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbhHYCNu (ORCPT ); Tue, 24 Aug 2021 22:13:50 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GvTtH272vz8v3X; Wed, 25 Aug 2021 10:08:55 +0800 (CST) Received: from dggema766-chm.china.huawei.com (10.1.198.208) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 25 Aug 2021 10:13:03 +0800 Received: from [10.174.177.210] (10.174.177.210) by dggema766-chm.china.huawei.com (10.1.198.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 25 Aug 2021 10:13:03 +0800 To: Jan Kara CC: "Theodore Y . Ts'o" , Ext4 Developers List , From: yangerkun Subject: [QUESTION] question for commit 2d01ddc86606 ("ext4: save error info to sb through journal if available") Message-ID: <05ff3a17-6559-9317-a382-f0a02fa59926@huawei.com> Date: Wed, 25 Aug 2021 10:13:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.210] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggema766-chm.china.huawei.com (10.1.198.208) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi Jan, There is a question about 2d01ddc86606 ("ext4: save error info to sb through journal if available"). This commit describe that we can have checksum failure with follow case: 1. ext4_handle_error will call ext4_commit_super which write directly to the superblock 2. At the same time, jounalled update of the superblock is ongoing However, after commit 05c2c00f3769 ("ext4: protect superblock modifications with a buffer lock"), all the update for superblock and the csum will be protected with buffer lock. It seems we won't get a csum error after that commit and the journal logic in flush_stashed_error_work seems useless. Maybe there is something missing... Can you help to explain more for that... Thanks, Kun.