From: agk@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: device-mapper ./WHATS_NEW dmsetup/dmsetup.c
Date: 21 Apr 2008 13:16:31 -0000 [thread overview]
Message-ID: <20080421131631.5375.qmail@sourceware.org> (raw)
CVSROOT: /cvs/dm
Module name: device-mapper
Changes by: agk@sourceware.org 2008-04-21 13:16:31
Modified files:
. : WHATS_NEW
dmsetup : dmsetup.c
Log message:
Add 3 new reporting colums: tables_loaded, readonly, suspended.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/WHATS_NEW.diff?cvsroot=dm&r1=1.230&r2=1.231
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/dmsetup/dmsetup.c.diff?cvsroot=dm&r1=1.105&r2=1.106
--- device-mapper/WHATS_NEW 2008/04/21 11:59:22 1.230
+++ device-mapper/WHATS_NEW 2008/04/21 13:16:30 1.231
@@ -1,5 +1,6 @@
Version 1.02.26 -
=================================
+ Add tables_loaded, readonly and suspended columns to reports.
Add --prefixes to dmsetup.
Add field name prefix option to reporting functions.
Calculate string size within dm_pool_grow_object.
--- device-mapper/dmsetup/dmsetup.c 2008/04/21 11:59:22 1.105
+++ device-mapper/dmsetup/dmsetup.c 2008/04/21 13:16:30 1.106
@@ -1643,6 +1643,63 @@
return dm_report_field_string(rh, field, &s);
}
+static int _dm_info_table_loaded_disp(struct dm_report *rh,
+ struct dm_pool *mem __attribute((unused)),
+ struct dm_report_field *field,
+ const void *data,
+ void *private __attribute((unused)))
+{
+ const struct dm_info *info = data;
+
+ if (info->live_table) {
+ if (info->inactive_table)
+ dm_report_field_set_value(field, "Both", NULL);
+ else
+ dm_report_field_set_value(field, "Live", NULL);
+ return 1;
+ }
+
+ if (info->inactive_table)
+ dm_report_field_set_value(field, "Inactive", NULL);
+ else
+ dm_report_field_set_value(field, "None", NULL);
+
+ return 1;
+}
+
+static int _dm_info_suspended_disp(struct dm_report *rh,
+ struct dm_pool *mem __attribute((unused)),
+ struct dm_report_field *field,
+ const void *data,
+ void *private __attribute((unused)))
+{
+ const struct dm_info *info = data;
+
+ if (info->suspended)
+ dm_report_field_set_value(field, "Suspended", NULL);
+ else
+ dm_report_field_set_value(field, "", NULL);
+
+ return 1;
+}
+
+static int _dm_info_read_only_disp(struct dm_report *rh,
+ struct dm_pool *mem __attribute((unused)),
+ struct dm_report_field *field,
+ const void *data,
+ void *private __attribute((unused)))
+{
+ const struct dm_info *info = data;
+
+ if (info->read_only)
+ dm_report_field_set_value(field, "Read-only", NULL);
+ else
+ dm_report_field_set_value(field, "Writeable", NULL);
+
+ return 1;
+}
+
+
static int _dm_info_devno_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, const void *data,
void *private)
@@ -1885,6 +1942,9 @@
FIELD_F(TASK, NUM, "RAhead", 6, dm_read_ahead, "read_ahead", "Read ahead in sectors.")
FIELD_F(INFO, STR, "Stat", 4, dm_info_status, "attr", "(L)ive, (I)nactive, (s)uspended, (r)ead-only, read-(w)rite.")
+FIELD_F(INFO, STR, "Tables", 6, dm_info_table_loaded, "tables_loaded", "Which of the live and inactive table slots are filled.")
+FIELD_F(INFO, STR, "Suspended", 9, dm_info_suspended, "suspended", "Whether the device is suspended.")
+FIELD_F(INFO, STR, "Read-only", 9, dm_info_read_only, "readonly", "Whether the device is read-only or writeable.")
FIELD_F(INFO, STR, "DevNo", 5, dm_info_devno, "devno", "Device major and minor numbers")
FIELD_O(INFO, dm_info, NUM, "Maj", major, 3, int32, "major", "Block device major number.")
FIELD_O(INFO, dm_info, NUM, "Min", minor, 3, int32, "minor", "Block device minor number.")
next reply other threads:[~2008-04-21 13:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 13:16 agk [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-06-18 10:19 device-mapper ./WHATS_NEW dmsetup/dmsetup.c meyering
2008-06-06 18:53 agk
2008-04-21 11:59 agk
2007-06-19 15:47 agk
2007-06-15 18:20 agk
2007-06-11 13:20 agk
2007-04-27 15:12 agk
2007-01-29 18:18 agk
2007-01-29 17:45 agk
2007-01-24 18:09 agk
2006-10-19 15:34 agk
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=20080421131631.5375.qmail@sourceware.org \
--to=agk@sourceware.org \
--cc=dm-cvs@sourceware.org \
--cc=dm-devel@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.