Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3048479ybt; Mon, 29 Jun 2020 13:55:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEl5gBLOlao5Y5EphWGyXGNvLBunjeDWG34KTUMl5zzh90uF3R2n4QWRxOjc4tg+aaFM7T X-Received: by 2002:a17:906:7f0f:: with SMTP id d15mr15118064ejr.159.1593464105333; Mon, 29 Jun 2020 13:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593464105; cv=none; d=google.com; s=arc-20160816; b=F8e2AJVey+02bHTyy52vovXGFhIdTmyLgBd4k70O3za3IZjuQ4OT9ntkmDOexugxki NogDN5xaHacoH0vAjVPGEbIPYmOYRInx1V2tNvCoePeNBin2N0vf6vfVnNjspjqVfFOL 58bQt+n/fo+2IQOG7BGguDGHkZlnWrt7HJywUGHDLp44p6Nz1EvC51/2UOhQ8KdtpBLb 1HLZgMnpi4iyGy9eL7H/YAixwqhBhNYW9+l1RYQmAYmh+7I0sMa9xWggR69RKwpgqNtA u74aDumvBMqdWKxaZfGbZgHlOMDKRR6d2oBjFlH3xBy5kn8PB3qfW0i3Q2f5zboTRdyL hM2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=uAiRDghuOCMpDAFAHvQM5BdGNUMLZuFGW1APRakoSus=; b=HKUlXY5Z42eyT0+noOBl4Jf4xFVM6GhILs91+CG6Mnlb7nuyZwbjb+dQwRmL1s+1Z0 6FzK5RIVcdGKMmMtmpuvzX3j9REBofLYB1S/EWq7mA1uoDPqfk6yxKXjpIEvqpHLU2yg YTB64U8OPrEIJz9COYKBN/LCsxlpVhjrcGi32AqJK+jTzmN2/OrIWPiQRogjHnObDxi0 H3bLQ41/TK2cnv5/NhJ5ILr37BwwUi/n7fIEX3UADfti5OZX5v0LWOdIMXEZHLGkAKNT cClykdCPevSUA8F1BBj2UZ10XVt2hEt1NwCWtRiXw4I6J+EmMdpjdWxnoLS4AQykYdAB W05A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=ara8FOJJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 dn12si545688ejc.287.2020.06.29.13.54.42; Mon, 29 Jun 2020 13:55:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=ara8FOJJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388345AbgF2Uvq (ORCPT + 99 others); Mon, 29 Jun 2020 16:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731378AbgF2TN1 (ORCPT ); Mon, 29 Jun 2020 15:13:27 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8697C014A47; Mon, 29 Jun 2020 01:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uAiRDghuOCMpDAFAHvQM5BdGNUMLZuFGW1APRakoSus=; b=ara8FOJJmyGTsZZYwrSNPjWLqN qQal0ttJBdaZfhpLC0Z/0FVu0TGsBscGI7gHKZlxfygbnCKljVmd6EliGkUjiCeua5Lqlw+SqUGri YDF/uUjkMqsGFUIUIlu6dP/HMLfagIiCfP7CnCNO/HR3E0DtZg3r6JVkQbErGPJrBmWjpHJNnZqFi dvaPuTG2pAlmYGYVTzI+Iei0zvDBYbJVhGbqE40iWteYnODY0StwXQAzxsjKFuSER8akZL6L3IWxR XnPxi6siVqTpD8pKccFNJr5E7a4Iutb0TtgFybcU7WiUAYpmFodShSUWbg4RziXqhwwdibXeVKeVq /ShvQPnw==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jporL-0007T7-3F; Mon, 29 Jun 2020 08:09:47 +0000 Date: Mon, 29 Jun 2020 09:09:47 +0100 From: Christoph Hellwig To: Simon Arlott Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Jonathan Corbet , Linux Kernel Mailing List , linux-scsi@vger.kernel.org, linux-doc@vger.kernel.org, Bart Van Assche , Christoph Hellwig , Damien Le Moal , Pavel Machek , Henrique de Moraes Holschuh Subject: Re: [PATCH (v2)] scsi: sd: add parameter to stop disks before reboot Message-ID: <20200629080947.GA28551@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 28, 2020 at 07:32:51PM +0100, Simon Arlott wrote: > I need to use "reboot=p" on my desktop because one of the PCIe devices > does not appear after a warm boot. This results in a very cold boot > because the BIOS turns the PSU off and on. > > The scsi sd shutdown process does not send a stop command to disks > before the reboot happens (stop commands are only sent for a shutdown). > > The result is that all of my SSDs experience a sudden power loss on > every reboot, which is undesirable behaviour because it could cause data > to be corrupted. These events are recorded in the SMART attributes. > > Add a "stop_before_reboot" module parameter that can be used to control > the shutdown behaviour of disks before a reboot. The default will be > the existing behaviour (disks are not stopped). > > sd_mod.stop_before_reboot= > 0 = disabled (default) > 1 = enabled > > The behaviour on shutdown is unchanged: all disks are unconditionally > stopped. What happened to the suggestion to treat reboot=p like a poweroff instead? That seems to be fundamentally the right thing to do.