svn commit: r226966 - head/sys/dev/md

Andrey V. Elsukov ae at FreeBSD.org
Mon Oct 31 10:53:27 UTC 2011


Author: ae
Date: Mon Oct 31 10:53:27 2011
New Revision: 226966
URL: http://svn.freebsd.org/changeset/base/226966

Log:
  Add information about MD_READONLY and MD_COMPRESS flags to the
  configuration dump.
  
  MFC after:	1 week

Modified:
  head/sys/dev/md/md.c

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c	Mon Oct 31 09:27:10 2011	(r226965)
+++ head/sys/dev/md/md.c	Mon Oct 31 10:53:27 2011	(r226966)
@@ -1370,6 +1370,11 @@ g_md_dumpconf(struct sbuf *sb, const cha
 			    indent, (uintmax_t) mp->fwsectors);
 			sbuf_printf(sb, "%s<length>%ju</length>\n",
 			    indent, (uintmax_t) mp->mediasize);
+			sbuf_printf(sb, "%s<compression>%s</compression>\n", indent,
+			    (mp->flags & MD_COMPRESS) == 0 ? "off": "on");
+			sbuf_printf(sb, "%s<access>%s</access>\n", indent,
+			    (mp->flags & MD_READONLY) == 0 ? "read-write":
+			    "read-only");
 			sbuf_printf(sb, "%s<type>%s</type>\n", indent,
 			    type);
 			if (mp->type == MD_VNODE && mp->vnode != NULL)


More information about the svn-src-all mailing list