summaryrefslogtreecommitdiff
path: root/drivers/md/dm-log.c
diff options
context:
space:
mode:
authorJonathan E Brassow <jbrassow@redhat.com>2007-05-09 13:32:58 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 23:30:47 +0400
commit315dcc226f066c1d3cef79283dcde807fe0e32d1 (patch)
treef3abf75905aec13819292564ef4c2711c8bf4b8d /drivers/md/dm-log.c
parent01d03a660e73fb524957c09825a3eb7c2ae7c205 (diff)
downloadlinux-315dcc226f066c1d3cef79283dcde807fe0e32d1.tar.xz
dm log: report fault status
This patch reports the status of the log device so that userspace can detect the error and take appropriate action. Signed-off-by: Jonathan E Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/dm-log.c')
-rw-r--r--drivers/md/dm-log.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index a503d12c2ff8..8d301409d814 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -615,6 +615,7 @@ static int core_status(struct dirty_log *log, status_type_t status,
switch(status) {
case STATUSTYPE_INFO:
+ DMEMIT("1 %s", log->type->name);
break;
case STATUSTYPE_TABLE:
@@ -630,17 +631,17 @@ static int disk_status(struct dirty_log *log, status_type_t status,
char *result, unsigned int maxlen)
{
int sz = 0;
- char buffer[16];
struct log_c *lc = log->context;
switch(status) {
case STATUSTYPE_INFO:
+ DMEMIT("3 %s %s %c", log->type->name, lc->log_dev->name,
+ lc->log_dev_failed ? 'D' : 'A');
break;
case STATUSTYPE_TABLE:
- format_dev_t(buffer, lc->log_dev->bdev->bd_dev);
DMEMIT("%s %u %s %u ", log->type->name,
- lc->sync == DEFAULTSYNC ? 2 : 3, buffer,
+ lc->sync == DEFAULTSYNC ? 2 : 3, lc->log_dev->name,
lc->region_size);
DMEMIT_SYNC;
}