Skip to contentSkip to conversation

btrfs: Add btrfs: prefix to kernel log output

PATCH In review Frank Holton 2 participants 2 messages Sep 13, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: Add btrfs: prefix to kernel log output

The kernel log entries for device label %s and device fsid %pU are missing the btrfs: prefix. Add those here.

---
 fs/btrfs/volumes.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/volumes.c +2 -2
index a057735..0431147 100644
@@ -912,9 +912,9 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
 	if (disk_super->label[0]) {
 		if (disk_super->label[BTRFS_LABEL_SIZE - 1])
 			disk_super->label[BTRFS_LABEL_SIZE - 1] = '\0';
-		printk(KERN_INFO "device label %s ", disk_super->label);
+		printk(KERN_INFO "btrfs: device label %s ", disk_super->label);
 	} else {
-		printk(KERN_INFO "device fsid %pU ", disk_super->fsid);
+		printk(KERN_INFO "btrfs: device fsid %pU ", disk_super->fsid);
 	}
 
 	printk(KERN_CONT "devid %llu transid %llu %s\n", devid, transid, path);
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Frank Holton

The kernel log entries for device label %s and device fsid %pU are missing the btrfs: prefix. Add those here.

fs/btrfs/volumes.c int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, · line 915

Quoted 2 lines
fs/btrfs/volumes.c +1 -1
-		printk(KERN_INFO "device label %s ", disk_super->label);
+		printk(KERN_INFO "btrfs: device label %s ", disk_super->label);

We can't use btrfs_info directly in this context, it wants a fs_info pointer. Although btrfs_info calls to btrfs_printk that actually uses fs_info only to get the superblock, this is not available at all callsites either.