From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com ([141.146.126.69]:42416 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933013AbbJANra (ORCPT ); Thu, 1 Oct 2015 09:47:30 -0400 Message-ID: <560D3964.7000205@oracle.com> Date: Thu, 01 Oct 2015 21:47:16 +0800 From: Anand Jain MIME-Version: 1.0 To: dsterba@suse.cz, linux-btrfs@vger.kernel.org, clm@fb.com Subject: Re: [PATCH 16/23] Btrfs: device path change must be logged References: <1439548388-29686-1-git-send-email-anand.jain@oracle.com> <1439548388-29686-17-git-send-email-anand.jain@oracle.com> <20151001134043.GD5885@twin.jikos.cz> In-Reply-To: <20151001134043.GD5885@twin.jikos.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 10/01/2015 09:40 PM, David Sterba wrote: > On Fri, Aug 14, 2015 at 06:33:01PM +0800, Anand Jain wrote: >> >From the issue diagnosable point of view, log if the device path is >> changed. >> >> Signed-off-by: Anand Jain >> --- >> fs/btrfs/volumes.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c >> index ebf37a9..dcb10fa 100644 >> --- a/fs/btrfs/volumes.c >> +++ b/fs/btrfs/volumes.c >> @@ -595,6 +595,10 @@ static noinline int device_list_add(const char *path, > >> return -EEXIST; >> } >> >> + printk_in_rcu(KERN_INFO \ >> + "BTRFS: device fsid %pU devid %llu old path %s new path %s\n", >> + disk_super->fsid, devid, rcu_str_deref(device->name), path); > > I don't think that the message should be put into device_list_add. Its > only callsite in btrfs_scan_one_device prints some device info messages > so it would be better to extend and use the return value if possible. Right. will fix it. Thanks, Anand > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >