Received: by 2002:a05:6622:f08:0:0:0:0 with SMTP id l8csp4481191ivc; Tue, 3 Nov 2020 13:09:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRlynLSwl16exQJ9zkTEJwllFgCqIH6Ez4BckLfW75WyWaylpugIsTTz+zjO/YSZrSHJ4A X-Received: by 2002:a17:906:8c6:: with SMTP id o6mr3647035eje.230.1604437797609; Tue, 03 Nov 2020 13:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604437797; cv=none; d=google.com; s=arc-20160816; b=oSVv/+luCJ8mGIcdyNQ8uWjIkNUi0+Q8HDa4UINLvvggklu1jwj9J+EQI4/THmsYlJ gk5KyKaXZ79cFYmnKMcpi+69TLVITh5rF+2d9obAyJUcHHShI513+C9ISgXKMJlWwmFL /gBQlHEFCGEpFW3+vPGCmYtJ0U5HqlfykL4jkDcMwdvXGSfZ0cL7a1nIiVHjI5mB10Rs sr0X0dI4AzBJp8oDu8mzRAcjbkdFEAHV1QVvfOaiFMMZRfgkKolIU2fSaNGq2jqn+IN7 x6Sn7P3PKojlfKQJkhxbZSuNRDEEfYzq/mDGDVbcKTR3zWzsQ1Iqse//9UYrUXzvRGan XYIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AyWlIxQBFkf4j25hPqAYAoMWZRdqn7UWbAvhCCdKmdo=; b=guX/PZue14fTLJbLz/8LkY6Uijk8hRbysRYOXiI0N8dpRxIQa4l2NmhflsbQfDeQeR 24x+hdHZpHvM2MsIs+25w90dnT62xcad7A0ZPPUgOOZpX3hMuClil86csrBrrHOVyDa2 xYGXuyL4TxBnpFJ/boNTv360+s+XbCYxicVdFRUtDkmi6QJ/thuOLm648XRZB7gLzC1L hY+xbUVVH1xn/6RBI3X/Ty2JqDAR6HeXLFE1tKdG7KTe8merzqnzWvyQQHgEcpknUbB+ ePyZn8ZVeDDOMhvyqso9C6nN3ETLSReRnOA8leFkLdc1UQAr1FsT13ewpLyRMgRYoz5C +MEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tOEV8Huu; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 13si4252509edv.433.2020.11.03.13.09.34; Tue, 03 Nov 2020 13:09:57 -0800 (PST) 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=@kernel.org header.s=default header.b=tOEV8Huu; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388265AbgKCVHK (ORCPT + 99 others); Tue, 3 Nov 2020 16:07:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:46254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732417AbgKCVHF (ORCPT ); Tue, 3 Nov 2020 16:07:05 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A126221534; Tue, 3 Nov 2020 21:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437625; bh=kyCpSVc97EC06FcgoaPrVRaAKI8hPYqgDQzDvi+h9Xg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tOEV8HuuZ0JAcskKGBFjvH0Vbje+FCUImUW2zKkj7lvNXL8KayS+/9bUlU3UdNdrN U7v3iLrA2MkLr7fF9VmZo1zdDKOJbP4u52VDM2DLyC6+duEUmXNDajylY140qn8iXd cqpsqxF8rQYeymOyRPeOHFx0Pn7mtOmfKiyIMsrY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anand Jain , David Sterba Subject: [PATCH 4.19 129/191] btrfs: improve device scanning messages Date: Tue, 3 Nov 2020 21:37:01 +0100 Message-Id: <20201103203245.210787415@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203232.656475008@linuxfoundation.org> References: <20201103203232.656475008@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anand Jain commit 79dae17d8d44b2d15779e332180080af45df5352 upstream. Systems booting without the initramfs seems to scan an unusual kind of device path (/dev/root). And at a later time, the device is updated to the correct path. We generally print the process name and PID of the process scanning the device but we don't capture the same information if the device path is rescanned with a different pathname. The current message is too long, so drop the unnecessary UUID and add process name and PID. While at this also update the duplicate device warning to include the process name and PID so the messages are consistent CC: stable@vger.kernel.org # 4.19+ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=89721 Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/volumes.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -857,16 +857,18 @@ static noinline struct btrfs_device *dev bdput(path_bdev); mutex_unlock(&fs_devices->device_list_mutex); btrfs_warn_in_rcu(device->fs_info, - "duplicate device fsid:devid for %pU:%llu old:%s new:%s", - disk_super->fsid, devid, - rcu_str_deref(device->name), path); + "duplicate device %s devid %llu generation %llu scanned by %s (%d)", + path, devid, found_transid, + current->comm, + task_pid_nr(current)); return ERR_PTR(-EEXIST); } bdput(path_bdev); btrfs_info_in_rcu(device->fs_info, - "device fsid %pU devid %llu moved old:%s new:%s", - disk_super->fsid, devid, - rcu_str_deref(device->name), path); + "devid %llu device path %s changed to %s scanned by %s (%d)", + devid, rcu_str_deref(device->name), + path, current->comm, + task_pid_nr(current)); } name = rcu_string_strdup(path, GFP_NOFS);