changeset 10581:c2151e45dda5

6878580 xentop -b doesn't show tap statistics
author Mark Johnson <Mark.Johnson@Sun.COM>
date Fri, 18 Sep 2009 12:43:49 -0700
parents 030e7fb9c81f
children cdf5d98e419e
files usr/src/uts/common/xen/io/blk_common.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/xen/io/blk_common.c	Fri Sep 18 09:00:12 2009 -0600
+++ b/usr/src/uts/common/xen/io/blk_common.c	Fri Sep 18 12:43:49 2009 -0700
@@ -558,6 +558,17 @@
 		goto startconnectfail_transaction_start;
 	}
 
+	/* xentop requires the instance in xenstore */
+	e = xenbus_printf(xbt, xsnode, "instance", "%d",
+	    ddi_get_instance(ring->ri_dip));
+	if (e != 0) {
+		cmn_err(CE_WARN, "xdb@%s: failed to write 'instance'",
+		    ddi_get_name_addr(dip));
+		xvdi_fatal_error(dip, e, "writing 'instance'");
+		(void) xenbus_transaction_end(xbt, 1);
+		goto startconnectfail_xenbus_printf;
+	}
+
 	/* If feature-barrier isn't present in xenstore, add it */
 	e = xenbus_read(xbt, xsnode, "feature-barrier", (void **)&barrier,
 	    &len);