Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp4048695ybt; Sun, 5 Jul 2020 15:22:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI7v+cFXIsFYHOEBkVxrQLhE9QzOiWakWpFhZ01rmrRcncSMeD048sNbgKaLgU+RUscxCv X-Received: by 2002:a17:906:69d3:: with SMTP id g19mr21180374ejs.402.1593987770825; Sun, 05 Jul 2020 15:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593987770; cv=none; d=google.com; s=arc-20160816; b=Tkk+WAS4eOcYrzWlk2WwHuiY8cHcS7KwqcT1tM3nzsIFP0c4NSBxtG78CJA8AEtBwO pCMC3tXqYK48WsPS54JFNYcQcNl90Ix3ZCTZOQiG+P29e+n+Et2hMQCXFREUtg9osxS6 3MNICFXldBFiwe9q5OGCJA0Y2gPnlXfS6FlXeL8zSEizIBuz782AFHBiuteRb5nwGYO8 Wy/eLx4YZs4diHKZjSMSMSSsyHrP8Ocpu4EK2Rlzc5M8B4JJV/9FjuvP9Ic2Thv+0J/+ e+MOCKg5BJ8hfGrrHnSthekqYLQKaAflbKQKXZ/9Odi3OrFqBtYoJ1K/g69v/A+igl08 tiOA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=e/NX5vYxQ7aKi+cgflABISV+bapfSySPZCJVg0OvBuE=; b=Omly+WjIYvnX9niKbXvmKNHwNjWgIlFE81cp/PUtWDXv+RSD8l6JQoO+vDheS4na2T eHaBjVSgJp5TOJZtVyPdr70qG9kH+HNfcPkIM9Zeg2sVDW8GxcEDuZHIPgH/bb/CiOfR aGy7UxdhEI7v4RifZgV26qoPot3TuXHr1RjoPh1NWvIREzDpd1IRuOYvCzdbEP2SUqFc LHP7Z+4bsSaZSwYAZcslGH8jyzSzIPpe+14IJqYWlR9MWBylMHhOTTExI2fh8zfXH8/E xfF1Q/0Pd6xWIsjdhx5+6IFq1SE7Ru1NQvS11aUUBkw/yKHTdaGlQ12c4CV909EQlf9y EqfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hmh.eng.br header.s=fm3 header.b=QfRTNG8O; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=P4NMHawI; 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 dm9si14504131ejc.624.2020.07.05.15.22.27; Sun, 05 Jul 2020 15:22:50 -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=pass header.i=@hmh.eng.br header.s=fm3 header.b=QfRTNG8O; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=P4NMHawI; 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 S1728254AbgGEWTg (ORCPT + 99 others); Sun, 5 Jul 2020 18:19:36 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:58245 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbgGEWTf (ORCPT ); Sun, 5 Jul 2020 18:19:35 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 7DE945A5; Sun, 5 Jul 2020 18:19:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 05 Jul 2020 18:19:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hmh.eng.br; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=e/NX5vYxQ7aKi+cgflABISV+bap fSySPZCJVg0OvBuE=; b=QfRTNG8OFPg/678fvC1n9yAWw818SkKgW30DWbYyqfx msn97Ca4QhMFVO16dEHIYWlvgE4rGBT1xV/Av5wg7nI7i1TAjQHXgysUEWn+P9Ln ucazLqYS8+PaDYzOpvKSCglYB6l0W4lU3hN7XeJ6TosQSs3L2eF0TxcG50BEhOOm 3jkg757mL+tKP2G+SNyVejHPLpVVKbHyDmEo6nAKT1CsH1MQFJtNcIElGvHPNi8g 8HYG/+/FzgD+h2r6lMsZKuQ/ckEL46mILbE220S7GYFcMo+nXBLy5X8yOmlo0/3P RLewy9VnoHmiUYM9jxdbBY938xP2dj7CZUVc+6DR9cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=e/NX5v YxQ7aKi+cgflABISV+bapfSySPZCJVg0OvBuE=; b=P4NMHawIDFlLRlv+lauV3h 7dtyR530c1NOjgRDAgBVCKPnyMQc4hduirUdYlycczwatwOCtoQZfLGxzJysAh4W KP7mFd6j4Ehl0LbfmxqH6EzBImSj4/JZbxxhU8HokvGbi0svzMTqJHZ83hehjBq8 9ySwtd9MagwE5z396IqP3hPIOs5aIK6WQwKuECmGUzfDsCnjgMYiXCcEwGzzZfA0 MC2znx2TYsNw7vJBgQXhL3NBk7ShxBwMWhHGVsX4Aph0/Fv4hXIc6ifEiRqj8QsC 4vAYbhnRSDkqfHa3paaxul70M6JccDInCIbEbeJ3dpDgveSJ6nrlqenOsWOkLRiA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvgddtiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujggfsehttddttddtredvnecuhfhrohhmpefjvghnrhhi qhhuvgcuuggvucfoohhrrggvshcujfholhhstghhuhhhuceohhhmhheshhhmhhdrvghngh drsghrqeenucggtffrrghtthgvrhhnpeevudetjeegiedufeeugfeiheeljeekfeduhfej feegkeehkedvvdehheelgeevieenucfkphepudejjedrudelgedrjedrfedvnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhmhheshhhmhhdr vghnghdrsghr X-ME-Proxy: Received: from khazad-dum.debian.net (unknown [177.194.7.32]) by mail.messagingengine.com (Postfix) with ESMTPA id 48E743280063; Sun, 5 Jul 2020 18:19:33 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 3322C340016C; Sun, 5 Jul 2020 19:19:31 -0300 (-03) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum2.khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YgCQtOJdWjXr; Sun, 5 Jul 2020 19:19:29 -0300 (-03) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id C06FC3400168; Sun, 5 Jul 2020 19:19:29 -0300 (-03) Date: Sun, 5 Jul 2020 19:19:29 -0300 From: Henrique de Moraes Holschuh To: Ming Lei Cc: Damien Le Moal , Simon Arlott , "James E.J. Bottomley" , "Martin K. Petersen" , Jonathan Corbet , Linux Kernel Mailing List , "linux-scsi@vger.kernel.org" , "linux-doc@vger.kernel.org" Subject: Re: [PATCH] scsi: sd: stop SSD (non-rotational) disks before reboot Message-ID: <20200705221929.GD8285@khazad-dum.debian.net> References: <499138c8-b6d5-ef4a-2780-4f750ed337d3@0882a8b5-c6c3-11e9-b005-00805fc181fe> <20200623204234.GA16156@khazad-dum.debian.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint1: 4096R/0x0BD9E81139CB4807: C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 Jun 2020, Ming Lei wrote: > On Wed, Jun 24, 2020 at 5:01 AM Henrique de Moraes Holschuh > wrote: > > Cache flushes do not matter that much when SSDs and sudden power cuts > > are involved. Power cuts at the wrong time harm the FLASH itself, it is > > not about still-in-flight data. > > > > Keep in mind that SSDs do a _lot_ of background writing, and power cuts > > What is the __lot__ of SSD's BG writing? GC? GC, and scrubbing. > > during a FLASH write or erase can cause from weakened cells, to much > > larger damage. It is possible to harden the chip or the design against > > this, but it is *expensive*. And even if warded off by hardening and no > > FLASH damage happens, an erase/program cycle must be done on the whole > > erase block to clean up the incomplete program cycle. > > It should have been SSD's(including FW) responsibility to avoid data loss when > the SSD is doing its own BG writing, because power cut can happen any time > from SSD's viewpoint. Oh, I fully agree. And yet, we had devices from several large vendors complaining about unclean shutdowns. So, "it should have been", as usual, amounts to very little in the end. > > When you do not follow these rules, well, excellent datacenter-class > > SSDs have super-capacitor power banks that actually work. Most SSDs do > > not, although they hopefully came a long way and hopefully modern SSDs > > are not as easily to brick as they were reported to be three or four > > years ago. > > I remember that DC SSDs often don't support BG GC. And have proper supercap local power banks, etc. I'd say they're not really relevant to this thread. -- Henrique Holschuh