]> granicus.if.org Git - zfs/commitdiff
vdev_disk_error() prints ASCII SOH to debug log
authorLOLi <loli10K@users.noreply.github.com>
Fri, 21 Sep 2018 16:42:42 +0000 (18:42 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 21 Sep 2018 16:42:42 +0000 (09:42 -0700)
Currently vdev_disk_error() prepends its messages sent to the internal
ZFS debug log with KERN_WARNING, which is currently defined as follows:

   #define KERN_SOH      "\001"
   #define KERN_WARNING  KERN_SOH "4"

Since "\001" (ASCII Start Of Header) is not printable this results in
weird characters displayed when inspecting the debug log. This commit
simply removes this superfluous prefix passed to zfs_dbgmsg().

Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7936

module/zfs/vdev_disk.c

index 78741af7f89897d319bbec585ecbce8c113a2b37..a4109543dfc3aeb359d2505a53b7543939aa4ddb 100644 (file)
@@ -139,10 +139,9 @@ bdev_max_capacity(struct block_device *bdev, uint64_t wholedisk)
 static void
 vdev_disk_error(zio_t *zio)
 {
-       zfs_dbgmsg(KERN_WARNING "zio error=%d type=%d offset=%llu size=%llu "
-           "flags=%x\n", zio->io_error, zio->io_type,
-           (u_longlong_t)zio->io_offset, (u_longlong_t)zio->io_size,
-           zio->io_flags);
+       zfs_dbgmsg("zio error=%d type=%d offset=%llu size=%llu flags=%x\n",
+           zio->io_error, zio->io_type, (u_longlong_t)zio->io_offset,
+           (u_longlong_t)zio->io_size, zio->io_flags);
 }
 
 /*