Commit 403c2172 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] md: Fixes to make debuging output nicer.

From: NeilBrown <neilb@cse.unsw.edu.au>

This patch thanks to Paul Clements <Paul.Clements@SteelEye.com> and only has
effect if md is compiled with #define DEBUG 1
parent 70bb57ee
...@@ -2690,7 +2690,7 @@ int md_thread(void * arg) ...@@ -2690,7 +2690,7 @@ int md_thread(void * arg)
void md_wakeup_thread(mdk_thread_t *thread) void md_wakeup_thread(mdk_thread_t *thread)
{ {
if (thread) { if (thread) {
dprintk("md: waking up MD thread %p.\n", thread); dprintk("md: waking up MD thread %s.\n", thread->tsk->comm);
set_bit(THREAD_WAKEUP, &thread->flags); set_bit(THREAD_WAKEUP, &thread->flags);
wake_up(&thread->wqueue); wake_up(&thread->wqueue);
} }
...@@ -2751,12 +2751,6 @@ void md_unregister_thread(mdk_thread_t *thread) ...@@ -2751,12 +2751,6 @@ void md_unregister_thread(mdk_thread_t *thread)
void md_error(mddev_t *mddev, mdk_rdev_t *rdev) void md_error(mddev_t *mddev, mdk_rdev_t *rdev)
{ {
dprintk("md_error dev:(%d:%d), rdev:(%d:%d), (caller: %p,%p,%p,%p).\n",
MD_MAJOR,mdidx(mddev),
MAJOR(rdev->bdev->bd_dev), MINOR(rdev->bdev->bd_dev),
__builtin_return_address(0),__builtin_return_address(1),
__builtin_return_address(2),__builtin_return_address(3));
if (!mddev) { if (!mddev) {
MD_BUG(); MD_BUG();
return; return;
...@@ -2764,6 +2758,13 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -2764,6 +2758,13 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev)
if (!rdev || rdev->faulty) if (!rdev || rdev->faulty)
return; return;
dprintk("md_error dev:(%d:%d), rdev:(%d:%d), (caller: %p,%p,%p,%p).\n",
MD_MAJOR,mdidx(mddev),
MAJOR(rdev->bdev->bd_dev), MINOR(rdev->bdev->bd_dev),
__builtin_return_address(0),__builtin_return_address(1),
__builtin_return_address(2),__builtin_return_address(3));
if (!mddev->pers->error_handler) if (!mddev->pers->error_handler)
return; return;
mddev->pers->error_handler(mddev,rdev); mddev->pers->error_handler(mddev,rdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment