FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 12-07-2007, 07:10 PM
"Wood, Brian J"
 
Default dm: add additional info to end of status line

From: Brian Wood <brian.j.wood@intel.com>

This patch adds additional information to the status line. It is added
at the
end of the returned text so it will not interfere with existing
implementations using this data. The addition of this information will
allow
for a common return interface to match that returned with the dm-raid1.c
status line (with Jonathan Brassow's patches).

Here is a sample of what is returned with a mirror:
isw_eeaaabgfg_mirror: 0 488390920 mirror 2 8:16 8:32 3727/3727 1 AA 1
core
here is what is returned with this patch for a stripe:
isw_dheeijjdej_stripe: 0 976783872 striped 2 8:16 8:32 AA

Signed-off-by: Brian Wood <brian.j.wood@intel.com>

--- linux-2.6.24-rc3/drivers/md/dm-stripe.c 2007-12-06
01:51:54.000000000 -0800
+++ linux-2.6.24-rc3.mod/drivers/md/dm-stripe.c 2007-12-06
01:50:50.000000000 -0800
@@ -274,12 +274,20 @@ static int stripe_status(struct dm_targe
status_type_t type, char *result, unsigned int
maxlen)
{
struct stripe_c *sc = (struct stripe_c *) ti->private;
+ char buffer[sc->stripes + 1];
unsigned int sz = 0;
unsigned int i;

switch (type) {
case STATUSTYPE_INFO:
- result[0] = '';
+ DMEMIT("%d ", sc->stripes);
+ for (i = 0; i < sc->stripes; i++) {
+ DMEMIT("%s ", sc->stripe[i].dev->name);
+ buffer[i] =
atomic_read(&(sc->stripe[i].error_count)) ?
+ 'D' : 'A';
+ }
+ buffer[i] = '';
+ DMEMIT("%s ", buffer);
break;

case STATUSTYPE_TABLE:
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 06:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org