Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp835445pxb; Tue, 3 Nov 2020 13:56:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRmifGzfqI/nyzSn46BQndZASDMKybL+mkMRiB7s3NxcSkVNqe2fo4hR700Enpe0A2zLgx X-Received: by 2002:a50:9fcb:: with SMTP id c69mr18151778edf.289.1604440613962; Tue, 03 Nov 2020 13:56:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604440613; cv=none; d=google.com; s=arc-20160816; b=C+if79bEcgGpA/WOSG3IuMg1gTTNGjjQ4kWE2khyHplg8yAeOxE64xl6xHAh18UjU3 aGF6I0Ibi02HEinN1xHWcMO3Bu1REHcGM5Iwg9NXamCeSIejNlfvP/n3K0iBMrs/CcGa +HXQmsCVGdQzO4oAyQUpGO4VESlUZBhMTpEIL12VlmqbmvI3RB72W9/s5oy5S5yekCDt XEjNsmYh8SlWuWybjSS6QBU+iInonx6OPnjaK/PPRJ2Mu6gO77I8acBjuv5Cf3+meVfc AUbRYhvpqiB7RK6YVjsiVOYplhLnMEQR858+BgyZkpZeuA4YQa55F8no11inGQm5A73+ r97A== 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=mo+MOtDzNlMb/BVLiAY2CU8wukEzO4JeIOWVWrJz6ww=; b=zrmr6T6vKMGDRaL3aaVPkz9XlLlhJs7hqSMFh4kD47eOH/aTw7SEc7DSU3pM7WxX8r XDx5sgPn8kyRonI2URa1uAeM/YDjNZcX8Oo7YrnatdMzjT5/vPMzTG/CzlR4AX2yPYms AUgbcnZEV+y8n21rdcUdxMrdxLvgcd8PFII+K4wqlC6L75VjEjLaEorPWG4qh0e9yCEN vHPluMH+iOARjNKz1L+FeXsWTOCVV2hjuo5lmD0sBeZWsqviNoXevvSp9VfhDxKhU3I+ LlfDy0t9QPqikLZnSesfX75qq2WrJU5Uy8IbvxPpdTtfnDi584bVtLwzbfWV+CpGunr1 tjGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="LT/coIrh"; 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 i7si7880974edj.303.2020.11.03.13.56.31; Tue, 03 Nov 2020 13:56:53 -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="LT/coIrh"; 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 S1730522AbgKCUrS (ORCPT + 99 others); Tue, 3 Nov 2020 15:47:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:37460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730015AbgKCUrQ (ORCPT ); Tue, 3 Nov 2020 15:47:16 -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 0C88422409; Tue, 3 Nov 2020 20:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436435; bh=iqUVc2vMxgr3pgFmwM1P55J8MtW5EoW3z+p9zzf4/XA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LT/coIrh7MLnGYqJV0xvKAsQJWliMr3XYY5BMTK4ApWvFt4K+kCF7F641Qsyro8O1 yLRJUL2uw2ip3GbnnKrO9ZDlWKqLr+NIyFdzPpT3kvxREdLV0laeQITqoBWWBByf16 RLr1uXRQGN/RNXPSG+QCCke4SoiE4rj/jpi86nSg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anand Jain , David Sterba Subject: [PATCH 5.9 222/391] btrfs: improve device scanning messages Date: Tue, 3 Nov 2020 21:34:33 +0100 Message-Id: <20201103203401.926199135@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203348.153465465@linuxfoundation.org> References: <20201103203348.153465465@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 @@ -942,16 +942,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);