btrfs: Remove extra KERN_INFO in the middle of a line
PATCH 1/1 btrfs: Remove extra KERN_INFO in the middle of a line
The "devid <xxx> transid <xxx>" printk in btrfs_scan_one_device() actually follows another printk that doesn't end in a newline (since the intention is for the two printks to make one line of output), so the KERN_INFO just ends up messing up the output:
device label exp <6>devid 1 transid 9 /dev/sda5
Fix this by deleting the extra KERN_INFO.
--- fs/btrfs/volumes.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/btrfs/volumes.c +1 -1
@@ -577,7 +577,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, *(unsigned long long *)disk_super->fsid, *(unsigned long long *)(disk_super->fsid + 8)); } -printk (KERN_INFO "devid %llu transid %llu %s\n" , +printk ("devid %llu transid %llu %s\n" , (unsigned long long )devid, (unsigned long long )transid, path); ret =device_list_add (path, disk_super, devid, fs_devices_ret);
By the way, looking at nearby code:
else {
/* FIXME, make a readl uuid parser */
printk(KERN_INFO "device fsid %llx-%llx ",
*(unsigned long long *)disk_super->fsid,
*(unsigned long long *)(disk_super->fsid + 8));
}aside from the readl typo here, it occurs to me that this is not endian-safe, because AFAIK nothing ever swaps disk_super->fsid ... so this would produce possibly confusing output if someone ever moved storage with a btrfs filesystem on it from one endianness to another...
Hi Roland,
fs/btrfs/volumes.c int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, · line 580
Quoted 10 lines · Roland Dreier
fs/btrfs/volumes.c +1
-1@@ -577,7 +577,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, *(unsigned long long *)disk_super->fsid, *(unsigned long long *)(disk_super->fsid + 8)); } - printk(KERN_INFO "devid %llu transid %llu %s\n", + printk("devid %llu transid %llu %s\n",
We have KERN_CONT for this.
Quoted 9 lines
fs/btrfs/volumes.c +0
-1(unsigned long long)devid, (unsigned long long)transid, path); ret =device_list_add (path, disk_super, devid, fs_devices_ret); --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
The "devid <xxx> transid <xxx>" printk in btrfs_scan_one_device() actually follows another printk that doesn't end in a newline (since the intention is for the two printks to make one line of output), so the KERN_INFO just ends up messing up the output:
device label exp <6>devid 1 transid 9 /dev/sda5
Fix this by changing the extra KERN_INFO to KERN_CONT.
---
Quoted 1 line
We have
KERN_CONTfor this.
OK, updated patch below...
fs/btrfs/volumes.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/btrfs/volumes.c +1 -1
@@ -577,7 +577,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, *(unsigned long long *)disk_super->fsid, *(unsigned long long *)(disk_super->fsid + 8)); } -printk (KERN_INFO "devid %llu transid %llu %s\n" , +printk (KERN_CONT "devid %llu transid %llu %s\n" , (unsigned long long )devid, (unsigned long long )transid, path); ret =device_list_add (path, disk_super, devid, fs_devices_ret);