Thread (37 messages) 37 messages, 2 authors, 2015-10-06
STALE3923d

[PATCH 16/23] Btrfs: device path change must be logged

From: Anand Jain <hidden>
Date: 2015-08-14 10:33:47
Subsystem: btrfs file system, filesystems (vfs and infrastructure), the rest · Maintainers: Chris Mason, David Sterba, Alexander Viro, Christian Brauner, Linus Torvalds

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

Signed-off-by: Anand Jain <redacted>
---
 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);
+
 		name = rcu_string_strdup(path, GFP_NOFS);
 		if (!name)
 			return -ENOMEM;
-- 
2.4.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help