Tue Jun 7 16:41:14 2011 UTC ()
Be more consistent for event handler naming with block backend: it is
xbdback(4) rather than xbd(4), and use i for identifier separation
(like xvif(4)).

The name is not used outside from event counters (vmstat -i), so
should be transparent to Xen block scripts.


(jym)
diff -r1.38 -r1.39 src/sys/arch/xen/xen/xbdback_xenbus.c

cvs diff -r1.38 -r1.39 src/sys/arch/xen/xen/xbdback_xenbus.c (expand / switch to context diff)
--- src/sys/arch/xen/xen/xbdback_xenbus.c 2011/05/26 22:16:42 1.38
+++ src/sys/arch/xen/xen/xbdback_xenbus.c 2011/06/07 16:41:14 1.39
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbdback_xenbus.c,v 1.38 2011/05/26 22:16:42 jym Exp $      */
+/*      $NetBSD: xbdback_xenbus.c,v 1.39 2011/06/07 16:41:14 jym Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.38 2011/05/26 22:16:42 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.39 2011/06/07 16:41:14 jym Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -588,13 +588,13 @@
 	}
 	xbdi->xbdi_evtchn = evop.u.bind_interdomain.local_port;
 
-	snprintf(evname, sizeof(evname), "xbd%d.%d",
+	snprintf(evname, sizeof(evname), "xbdback%di%d",
 	    xbdi->xbdi_domid, xbdi->xbdi_handle);
 	event_set_handler(xbdi->xbdi_evtchn, xbdback_evthandler,
 	    xbdi, IPL_BIO, evname);
-	aprint_verbose("xbd backend 0x%x for domain %d "
-	    "using event channel %d, protocol %s\n", xbdi->xbdi_handle,
-	    xbdi->xbdi_domid, xbdi->xbdi_evtchn, proto);
+	aprint_verbose("xbd backend domain %d handle %#x (%d) "
+	    "using event channel %d, protocol %s\n", xbdi->xbdi_domid,
+	    xbdi->xbdi_handle, xbdi->xbdi_handle, xbdi->xbdi_evtchn, proto);
 	hypervisor_enable_event(xbdi->xbdi_evtchn);
 	hypervisor_notify_via_evtchn(xbdi->xbdi_evtchn);
 	xbdi->xbdi_status = CONNECTED;