[PATCH 1/4] Btrfs: device path change must be logged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From the issue diagnosable point of view, log if the device path is
changed.

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
 fs/btrfs/volumes.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 4ffcdf9..a51d492 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -606,6 +606,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);
+
 		name = rcu_string_strdup(path, GFP_NOFS);
 		if (!name)
 			return -ENOMEM;
-- 
2.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux