Received: by 10.192.245.15 with SMTP id i15csp1193172imn; Sun, 11 Mar 2018 07:38:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELu/HhRwLjkLdoqYqmfPQuFl06QBia9pOYBuVON2TIfvAL1Hpe8zCuzKUYZUKsVXZuKE3SUF X-Received: by 2002:a17:902:2de4:: with SMTP id p91-v6mr4931795plb.405.1520779135502; Sun, 11 Mar 2018 07:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520779135; cv=none; d=google.com; s=arc-20160816; b=isSX7lIWr1vlScPxY/rZpyeL+o/Iuft176ZGyapK4pGQkvmUVYH7ybii7GfdIMh4ZV QYqSBxLyH7Ceh0QMAHLLm8DXrHboqR6rPp0IgoJoOeaOVr3UGeSZg7jpkvsXoXjOqBqE GF3NCPIMOCL1F9xp6PGWtxNkpSE0HrMwx/ZbnX4xgXPu0EL3hf3WU547BB/FoLzmkaYQ 6k+kYO/U/xdlmwi+O1LBQbTCyalyRrCHiQQ/roSK5wjWbDEVkGZ9PSCYGqBIsVaDnzgc Q8i3eJCNafXS3Huw5wTR7FHaDfm9PKWzWHuk1m9Q5p70/XPQrF39lLF0xzOsQ7dlq93I ogIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=bmcdNNweDq3ju7aHFfFwiwFJnklDxVi62XdjPBO2hWQ=; b=GGj6oKlvp0NthYBiz+5h6ea1TvsAhp+/wobyOToO5xw1MpKqvIL8ruPbSmN1WSl7yN BTJnNfR4P73vAFtC1ecxAfyksGwt/FEvBJkT5MrkVstwhmqV5NFGkUn2IaAsM6nFg5b6 d4q/2nrw2MoxHSUuqd1TUS1HwOGjS6rs3vjm6NtHcymcalNccHV2Ua3xFPwpEJBTPqhm mEDmHG9wreCHaSlv/k3UcjB1+ysdwyQ+qO+VJla35CKsBi8KNKAhcBZqMOcoDbNGYR4U ZRbg0ZyFz9xRYQm9enFa/Zaf7LYlHcG6svLx+nwZWdUG1V4PBK7cgSGf3ep5SUhIZg4y WVaA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13-v6si991604plz.564.2018.03.11.07.38.39; Sun, 11 Mar 2018 07:38:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932268AbeCKOhq (ORCPT + 99 others); Sun, 11 Mar 2018 10:37:46 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36427 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932152AbeCKOhp (ORCPT ); Sun, 11 Mar 2018 10:37:45 -0400 Received: by mail-wm0-f49.google.com with SMTP id 188so11525113wme.1 for ; Sun, 11 Mar 2018 07:37:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=bmcdNNweDq3ju7aHFfFwiwFJnklDxVi62XdjPBO2hWQ=; b=AOCcXJYzDPSChLHLNycP3/2oHV+AW9CDh9oC7UNAtveFouoSA787o650KWQnPPCz9Z BKrExCGTPV4ZPrAQCkfr7RXcSWCKOwMIEnSa1mB7VPnSS+IeVC48AlCFjGnOYpwzxilL j4V1FSErgxAmzvhtZEotFh+m8XOAlZWOgHtTgTj/svgwJx20gBlPNnzcj0HQ/tUNIxhv H/aYdQaCJG+f6H0jHEKIHwiw7+uP3FEOi7h7XCf5Xl7E654jd7CtWJNGwmVJMHrp0dfa O/E4dS6oJ+0FtgOLx7n6Q4WolaYz9P/q9L7bKxSr/87uN5vBAAKDnDCFegMdcaMt70HY MHEw== X-Gm-Message-State: AElRT7FDCTllfDoafYixhAI0UQUl4dB2xsarMfraY7EcRpYOfvwnvYA+ j2V+EKTQktRbZOX3P0tNruklUQ== X-Received: by 10.80.149.3 with SMTP id u3mr7118295eda.212.1520779064041; Sun, 11 Mar 2018 07:37:44 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id c63sm3392173edd.62.2018.03.11.07.37.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Mar 2018 07:37:43 -0700 (PDT) Subject: Re: [Possible REGRESSION, 4.16-rc4] Error updating SMART data during runtime and could not connect to lvmetad at some boot attempts To: Martin Steigerwald , Linux Kernel Mailing List Cc: Thorsten Leemhuis , Tejun Heo References: <27165802.vQ9JbjrmvU@merkaba> From: Hans de Goede Message-ID: Date: Sun, 11 Mar 2018 15:37:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <27165802.vQ9JbjrmvU@merkaba> Content-Type: multipart/mixed; boundary="------------A03418BFF6026D45F7B2BB5B" Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------A03418BFF6026D45F7B2BB5B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi Martin, On 11-03-18 09:20, Martin Steigerwald wrote: > Hello. > > Since 4.16-rc4 (upgraded from 4.15.2 which worked) I have an issue > with SMART checks occassionally failing like this: > > smartd[28017]: Device: /dev/sdb [SAT], is in SLEEP mode, suspending checks > udisksd[24408]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/INTEL_SSDSA2CW300G3_[…]: Error updating SMART > data: Error sending ATA command CHECK POWER MODE: Unexpected sense data returned:#0120000: 0e 09 0c 00 00 00 ff 00 00 00 00 00 00 00 50 00 ..............P.#0120010: > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................#012 (g-io-error-quark, 0) > merkaba udisksd[24408]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/Crucial_CT480M500SSD3_[…]: Error updating SMART dat > a: Error sending ATA command CHECK POWER MODE: Unexpected sense data returned:#0120000: 01 00 1d 00 00 00 0e 09 0c 00 00 00 ff 00 00 00 ................#0120010: 00 0 > 0 00 00 50 00 00 00 00 00 00 00 00 00 00 00 ....P...........#012 (g-io-error-quark, 0) > > (Intel SSD is connected via SATA, Crucial via mSATA in a ThinkPad T520) > > However when I then check manually with smartctl -a | -x | -H the device > reports SMART data just fine. > > As smartd correctly detects that device is in sleep mode, this may be an > userspace issue in udisksd. > > Also at some boot attempts the boot hangs with a message like "could not > connect to lvmetad, scanning manually for devices". I use BTRFS RAID 1 > on to LVs (each on one of the SSDs). A configuration that requires a manual > adaption to InitRAMFS in order to boot (basically vgchange -ay before > btrfs device scan). > > I wonder whether that has to do with the new SATA LPM policy stuff, but as > I had issues with > > 3 => Medium power with Device Initiated PM enabled > > (machine did not boot, which could also have been caused by me accidentally > removing all TCP/IP network support in the kernel with that setting) > > I set it back to > > CONFIG_SATA_MOBILE_LPM_POLICY=0 > > (firmware settings) Right, so at that settings the LPM policy changes are effectively disabled and cannot explain your SMART issues. Still I would like to zoom in on this part of your bug report, because for Fedora 28 we are planning to ship with CONFIG_SATA_MOBILE_LPM_POLICY=3 and AFAIK Ubuntu has similar plans. I suspect that the issue you were seeing with CONFIG_SATA_MOBILE_LPM_POLICY=3 were with the Crucial disk ? I've attached a patch for you to test, which disabled LPM for your model Crucial SSD (but keeps it on for the Intel disk) if you can confirm that with that patch you can run with CONFIG_SATA_MOBILE_LPM_POLICY=3 without issues that would be great. Regards, Hans --------------A03418BFF6026D45F7B2BB5B Content-Type: text/x-patch; name="0001-libata-Apply-NOLPM-quirk-to-Crucial-M500-480GB-SSDs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-libata-Apply-NOLPM-quirk-to-Crucial-M500-480GB-SSDs.pat"; filename*1="ch" From 551654d311d91c3cecde233eda86686f5d786fc2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 11 Mar 2018 15:32:00 +0100 Subject: [PATCH] libata: Apply NOLPM quirk to Crucial M500 480GB SSDs There have been reports of the Crucial M500 480GB model not working with LPM set to min_power / med_power_with_dipm level. It has no been tested with medium_power, but that typically has no measurable power-savings. This commit adds a NOLPM quirk to avoid LPM causing issues with these SSDs. Cc: stable@vger.kernel.org Reported-by: Martin Steigerwald Signed-off-by: Hans de Goede --- drivers/ata/libata-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index d8be0fe548f7..197e2c7f560e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4535,6 +4535,11 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ATA_HORKAGE_ZERO_AFTER_TRIM | ATA_HORKAGE_NOLPM, }, + /* The 480GB version of the M500 has both queued TRIM and LPM issues */ + { "Crucial_CT480M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | + ATA_HORKAGE_ZERO_AFTER_TRIM | + ATA_HORKAGE_NOLPM, }, + /* devices that don't properly handle queued TRIM commands */ { "Micron_M500_*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, -- 2.14.3 --------------A03418BFF6026D45F7B2BB5B--