mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Andrew <nick@nick-andrew.net>
To: mingo@elte.hu, trivial@kernel.org, neilb@suse.de
Cc: <linux-kernel@vger.kernel.org>, akpm@linux-foundation.org
Subject: [PATCH 1/2] RAID: Remove leading TAB on printk messages
Date: Fri, 11 Apr 2008 18:06:37 +1000	[thread overview]
Message-ID: <20080411080637.12362.47954.stgit@marcab.local.tull.net> (raw)

RAID: Remove leading TAB on printk messages

MD drivers use one printk() call to print 2 log messages and the second
line may be prefixed by a TAB character.  It may also output a trailing
space before newline.  klogd (I think) turns the TAB character into the
2 characters '^I' when logging to a file. This looks ugly.

Instead of a leading TAB to indicate continuation, prefix both output
lines with 'raid:' or similar. Also remove any trailing space in the
vicinity of the affected code and consistently end the sentences with
a period.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
---

 drivers/md/multipath.c |    3 ++-
 drivers/md/raid1.c     |    4 ++--
 drivers/md/raid10.c    |    4 ++--
 drivers/md/raid5.c     |    4 ++--
 4 files changed, 8 insertions(+), 7 deletions(-)


diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 3f299d8..42ee1a2 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -244,7 +244,8 @@ static void multipath_error (mddev_t *mddev, mdk_rdev_t *rdev)
 			conf->working_disks--;
 			mddev->degraded++;
 			printk(KERN_ALERT "multipath: IO failure on %s,"
-				" disabling IO path. \n	Operation continuing"
+				" disabling IO path.\n"
+				"multipath: Operation continuing"
 				" on %d IO paths.\n",
 				bdevname (rdev->bdev,b),
 				conf->working_disks);
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index ff61b30..9fd473a 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1008,8 +1008,8 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
 	} else
 		set_bit(Faulty, &rdev->flags);
 	set_bit(MD_CHANGE_DEVS, &mddev->flags);
-	printk(KERN_ALERT "raid1: Disk failure on %s, disabling device. \n"
-		"	Operation continuing on %d devices\n",
+	printk(KERN_ALERT "raid1: Disk failure on %s, disabling device.\n"
+		"raid1: Operation continuing on %d devices.\n",
 		bdevname(rdev->bdev,b), conf->raid_disks - mddev->degraded);
 }
 
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 32389d2..1e96aa3 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1001,8 +1001,8 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
 	}
 	set_bit(Faulty, &rdev->flags);
 	set_bit(MD_CHANGE_DEVS, &mddev->flags);
-	printk(KERN_ALERT "raid10: Disk failure on %s, disabling device. \n"
-		"	Operation continuing on %d devices\n",
+	printk(KERN_ALERT "raid10: Disk failure on %s, disabling device.\n"
+		"raid10: Operation continuing on %d devices.\n",
 		bdevname(rdev->bdev,b), conf->raid_disks - mddev->degraded);
 }
 
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index c574cf5..88c2b60 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1260,8 +1260,8 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
 		}
 		set_bit(Faulty, &rdev->flags);
 		printk (KERN_ALERT
-			"raid5: Disk failure on %s, disabling device."
-			" Operation continuing on %d devices\n",
+			"raid5: Disk failure on %s, disabling device.\n"
+			"raid5: Operation continuing on %d devices.\n",
 			bdevname(rdev->bdev,b), conf->raid_disks - mddev->degraded);
 	}
 }


             reply	other threads:[~2008-04-11  8:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11  8:06 Nick Andrew [this message]
2008-04-11  8:07 ` [PATCH 2/2] RAID: remove trailing space from printk line Nick Andrew
2008-04-12 16:24 ` [PATCH 1/2] RAID: Remove leading TAB on printk messages Nick Andrew

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080411080637.12362.47954.stgit@marcab.local.tull.net \
    --to=nick@nick-andrew.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=neilb@suse.de \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®