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 <anand.j...@oracle.com>
> ---
>  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to