Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5355578ybe; Tue, 10 Sep 2019 02:22:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6H8rfu4OvVeDjtCZhs0Nc4Sl5dmlO4EDfUs0FlX8huyWKpu6L7kK2BsXTkFB9twIgT4Gr X-Received: by 2002:a17:906:390c:: with SMTP id f12mr23723078eje.153.1568107320999; Tue, 10 Sep 2019 02:22:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568107320; cv=none; d=google.com; s=arc-20160816; b=y1dMcGMOAGCRsSjKe5L/atfAxJlO6PD3wQGgjOHn8Cej5Wf9Kw65yMRsFPMc7xtYhn W52cMgYvileyxuZ31xxVE2WR4hBt+eY2NQAjTF4k0JwTs81U5XRooQpG5po9WbpW4/Dr 0Vt3QTSJYznycREgCC7lE5HTg1tYN9kGETy85HTAsTxZ+j8pq2Edo9nVe4+JroBRQFzC 2BsbQVwqOL7FbmVHPiMHyU4GLrHOW7b2uaKSArWwguGEg63gcR+5qDkGaSdykiwCWL/e wj/qAWf1efDFejkPQnNm+jakJFXc95Vx9wJG4163slkkhFxMkvt8agV4X1Sz0uAZfze0 2TVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=v7Xh5Z/RJ5yB7R4Sgi0bHMzcVT9SWHvJvtDGNrJIqIQ=; b=Ap3s90ylsjiyXdPnv5z6DlAWVhlnlyjJf8vyJm+iK9UD5hITcHMGgKKdTOvFwPwF5O h6cPRz4S4mJgnK+KSwY9Q+F8HZtdcjrIiWyF/CpNT0+IfpFSc/JmoQs1b867ZMFbTvHA UK0Ldidk5aGLO33wJ28WZm8pJ3Ml5KG7MC6lIeXZB7e6FkCYAgL1tJ84P7pw/NFBVlTS 7RB4zNtwyRLeH7o9hYm/oueLAUFbcOfCHkWSwVRYsKrOwPvk2wG4GHsZB9PkqJMwOPjc dmtfFaQlq5JIS9hf9kipPAtqqz9bljzpjpwT/auRrRHtyh8FQXCFVgK8/yoaDIu+QqnW YA0A== 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 i12si4505480edb.133.2019.09.10.02.21.36; Tue, 10 Sep 2019 02:22:00 -0700 (PDT) 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 S1727856AbfIISiY (ORCPT + 99 others); Mon, 9 Sep 2019 14:38:24 -0400 Received: from tartarus.angband.pl ([54.37.238.230]:41248 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbfIISiY (ORCPT ); Mon, 9 Sep 2019 14:38:24 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.92) (envelope-from ) id 1i7OYL-0003LS-UH; Mon, 09 Sep 2019 20:38:17 +0200 Date: Mon, 9 Sep 2019 20:38:17 +0200 From: Adam Borowski To: Pavel Machek Cc: Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation: sysrq: don't recommend 'S' 'U' before 'B' Message-ID: <20190909183817.GB12602@angband.pl> References: <20190903160840.56652-1-kilobyte@angband.pl> <20190909083331.GA27626@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190909083331.GA27626@amd> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 09, 2019 at 10:33:31AM +0200, Pavel Machek wrote: > On Tue 2019-09-03 18:08:40, Adam Borowski wrote: > > This advice is obsolete and slightly harmful for filesystems from this > > millenium: any modern filesystem can handle unexpected crashes without > > requiring fsck -- and on the other hand, trying to write to the disk when > > the kernel is in a bad state risks introducing corruption. > > Actually no, I don't think it is good idea. > > sync is still useful these days -- you want the current data to be > written to disk; true, you'll not have to do fsck, but you may lose > your current data. Well yeah, but that's only if you have a reason to suspect there's some data you care about. I'd say that in the usual case, saving whatever volatile state the system has tends to be not worth risking corruption. Ie, the default advice for a locked-up system should be SysRq B. Is there some other wording that you would be happier with? > > For ext2, any unsafe shutdown meant widespread breakage, but it's no longer > > a reasonable filesystem for any non-special use. > > > > Signed-off-by: Adam Borowski > > --- > > Documentation/admin-guide/sysrq.rst | 20 +++++++++----------- > > 1 file changed, 9 insertions(+), 11 deletions(-) > > > > diff --git a/Documentation/admin-guide/sysrq.rst b/Documentation/admin-guide/sysrq.rst > > index 7b9035c01a2e..72b2cfb066f4 100644 > > --- a/Documentation/admin-guide/sysrq.rst > > +++ b/Documentation/admin-guide/sysrq.rst > > @@ -171,22 +171,20 @@ It seems others find it useful as (System Attention Key) which is > > useful when you want to exit a program that will not let you switch consoles. > > (For example, X or a svgalib program.) > > > > -``reboot(b)`` is good when you're unable to shut down. But you should also > > -``sync(s)`` and ``umount(u)`` first. > > +``reboot(b)`` is good when you're unable to shut down, it is an equivalent > > +of pressing the "reset" button. > > > > ``crash(c)`` can be used to manually trigger a crashdump when the system is hung. > > Note that this just triggers a crash if there is no dump mechanism available. > > > > -``sync(s)`` is great when your system is locked up, it allows you to sync your > > -disks and will certainly lessen the chance of data loss and fscking. Note > > -that the sync hasn't taken place until you see the "OK" and "Done" appear > > -on the screen. (If the kernel is really in strife, you may not ever get the > > -OK or Done message...) > > +``sync(s)`` is handy before yanking removable medium or after using a rescue > > +shell that provides no graceful shutdown -- it will ensure your data is > > +safely written to the disk. Note that the sync hasn't taken place until you see > > +the "OK" and "Done" appear on the screen. > > > > -``umount(u)`` is basically useful in the same ways as ``sync(s)``. I generally > > -``sync(s)``, ``umount(u)``, then ``reboot(b)`` when my system locks. It's saved > > -me many a fsck. Again, the unmount (remount read-only) hasn't taken place until > > -you see the "OK" and "Done" message appear on the screen. > > +``umount(u)`` can be used to mark filesystems as properly unmounted. From the > > +running system's point of view, they will be remounted read-only. The remount > > +isn't complete until you see the "OK" and "Done" message appear on the screen. > > > > The loglevels ``0``-``9`` are useful when your console is being flooded with > > kernel messages you do not want to see. Selecting ``0`` will prevent all but Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢰⠒⠀⣿⡁ ⢿⡄⠘⠷⠚⠋⠀ I was born a dumb, ugly and work-loving kid, then I got swapped on ⠈⠳⣄⠀⠀⠀⠀ the maternity ward.