* [PATCH] btrfs: Remove extra KERN_INFO in the middle of a line
@ 2009-01-14 0:07 Roland Dreier
2009-01-14 0:13 ` Roland Dreier
2009-01-14 7:57 ` Pekka Enberg
0 siblings, 2 replies; 4+ messages in thread
From: Roland Dreier @ 2009-01-14 0:07 UTC (permalink / raw)
To: Chris Mason, linux-kernel
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.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
---
fs/btrfs/volumes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index b187b53..2280d19 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: Remove extra KERN_INFO in the middle of a line
2009-01-14 0:07 [PATCH] btrfs: Remove extra KERN_INFO in the middle of a line Roland Dreier
@ 2009-01-14 0:13 ` Roland Dreier
2009-01-14 7:57 ` Pekka Enberg
1 sibling, 0 replies; 4+ messages in thread
From: Roland Dreier @ 2009-01-14 0:13 UTC (permalink / raw)
To: Chris Mason; +Cc: linux-kernel
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...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: Remove extra KERN_INFO in the middle of a line
2009-01-14 0:07 [PATCH] btrfs: Remove extra KERN_INFO in the middle of a line Roland Dreier
2009-01-14 0:13 ` Roland Dreier
@ 2009-01-14 7:57 ` Pekka Enberg
2009-01-14 18:34 ` Roland Dreier
1 sibling, 1 reply; 4+ messages in thread
From: Pekka Enberg @ 2009-01-14 7:57 UTC (permalink / raw)
To: Roland Dreier; +Cc: Chris Mason, linux-kernel
Hi Roland,
On Wed, Jan 14, 2009 at 2:07 AM, Roland Dreier <rdreier@cisco.com> wrote:
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index b187b53..2280d19 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -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.
> (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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: Remove extra KERN_INFO in the middle of a line
2009-01-14 7:57 ` Pekka Enberg
@ 2009-01-14 18:34 ` Roland Dreier
0 siblings, 0 replies; 4+ messages in thread
From: Roland Dreier @ 2009-01-14 18:34 UTC (permalink / raw)
To: Chris Mason, Pekka Enberg; +Cc: linux-kernel
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.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
---
> We have KERN_CONT for this.
OK, updated patch below...
fs/btrfs/volumes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index b187b53..bc7e113 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-14 18:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 0:07 [PATCH] btrfs: Remove extra KERN_INFO in the middle of a line Roland Dreier
2009-01-14 0:13 ` Roland Dreier
2009-01-14 7:57 ` Pekka Enberg
2009-01-14 18:34 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox