Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1709624pxf; Fri, 9 Apr 2021 15:42:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyicWuT+hWTid1ptBC/qLUnkONNGmuHU6feGuRLUdpWbxoJtmNbEcCtWsSYGebGOD+KDb/I X-Received: by 2002:aa7:942d:0:b029:1f2:cbc6:8491 with SMTP id y13-20020aa7942d0000b02901f2cbc68491mr14319521pfo.53.1618008123103; Fri, 09 Apr 2021 15:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618008123; cv=none; d=google.com; s=arc-20160816; b=IkvJmWawlh+6F+t+9w/pv2rYlBVOONTrrCLRXyV03O0LOoBdRS4KWnV9npcxsK4Dgt dx6pm1FuytT5DYKJJrfJ5yDgA280ic7ehyb1MqDkes7TMpltsPpW1Wwm2/LIENFG/842 yUGoIEbDR0uj8Kbq98DWloeM9O/gqKXMyMDK+7uqf1pt8KIf9GlhEpj/o1nybms0yT78 6vW1BO9kdMY3U01KFouKoloig1nxYRXb/6G9V6HksVToXDdKg2ITYwTriQaHkY3znzMr 2cfPh7IzUHN/aaV9rKmuLZPObN2+aBiVGHnAWMOpwVWe6mttWv3SB1XDht6I8jBZNaOD kPqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=XDOwfXpNupyiM5r3HOA2wbMyLuAJnplRx7cDAwsYpJk=; b=yEpGEadWzcbIy23N9tQ3dXX9RUxPA3eSHEPITfyYKkTi7nCMIdMFz5f0XyyYdXLDtq dzPdKwxA62ZuXxIzyHQPq3ztaRnGhdPPiUJ9aTD6oIsyFkKORh/5DTg99lSxTqCG/AxZ 6AnMbD9zTN4zJXZ0DPshAqL0m3he0/LaDduT679YISnr7NiHC7TWWIUI1yQmrbCN2FV6 QHm0/u8IuUfpK/+aEz6Zqo08Bxzrl9RpLm4qCACdmR4zvv53GeTMgOz7VzoZbxLrgRNW y14XDtDPgJhAwrOgUlwzsLOmn0zazmexxCI/xdJr9XYfTGAjpSW4/oxOjfdewqa9HBhq DIqA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si4261730pjq.100.2021.04.09.15.41.47; Fri, 09 Apr 2021 15:42:03 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234960AbhDIWl4 (ORCPT + 99 others); Fri, 9 Apr 2021 18:41:56 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:57089 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235046AbhDIWl4 (ORCPT ); Fri, 9 Apr 2021 18:41:56 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 139MfYaG028899 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Apr 2021 18:41:35 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id C94B815C3B12; Fri, 9 Apr 2021 18:41:34 -0400 (EDT) Date: Fri, 9 Apr 2021 18:41:34 -0400 From: "Theodore Ts'o" To: Ye Bin Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] ext4: Fix fs can't panic when abort by user Message-ID: References: <20210401081903.3421208-1-yebin10@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Apr 09, 2021 at 05:28:54PM -0400, Theodore Ts'o wrote: > I'll apply the patch with a modified commit description to warn of > this particular change in behavior. Applied with the following commit description: ext4: always panic when errors=panic is specified Before commit 014c9caa29d3 ("ext4: make ext4_abort() use __ext4_error()"), the following series of commands would trigger a panic: 1. mount /dev/sda -o ro,errors=panic test 2. mount /dev/sda -o remount,abort test After commit 014c9caa29d3, remounting a file system using the test mount option "abort" will no longer trigger a panic. This commit will restore the behaviour immediately before commit 014c9caa29d3. (However, note that the Linux kernel's behavior has not been consistent; some previous kernel versions, including 5.4 and 4.19 similarly did not panic after using the mount option "abort".) This also makes a change to long-standing behaviour; namely, the following series commands will now cause a panic, when previously it did not: 1. mount /dev/sda -o ro,errors=panic test 2. echo test > /sys/fs/ext4/sda/trigger_fs_error However, this makes ext4's behaviour much more consistent, so this is a good thing. Fixes: 014c9caa29d3 ("ext4: make ext4_abort() use __ext4_error()") Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210401081903.3421208-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o