Module Name: src
Committed By: bouyer
Date: Sun Aug 7 17:15:40 UTC 2011
Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c
Log Message:
Add a comment explaing why a flush workqueue is handled differently from
read/write workqueue requests.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/xen/xen/xbdback_xenbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.43 src/sys/arch/xen/xen/xbdback_xenbus.c:1.44
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.43 Sun Aug 7 17:10:35 2011
+++ src/sys/arch/xen/xen/xbdback_xenbus.c Sun Aug 7 17:15:40 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: xbdback_xenbus.c,v 1.43 2011/08/07 17:10:35 bouyer Exp $ */
+/* $NetBSD: xbdback_xenbus.c,v 1.44 2011/08/07 17:15:40 bouyer Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.43 2011/08/07 17:10:35 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.44 2011/08/07 17:15:40 bouyer Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1047,7 +1047,12 @@
xbd_io->xio_operation = xbdi->xbdi_xen_req.operation;
xbd_io->xio_flush_id = xbdi->xbdi_xen_req.id;
workqueue_enqueue(xbdback_workqueue, &xbdi->xbdi_io->xio_work, NULL);
- /* xbdback_do_io() will advance req pointer and restart processing */
+ /*
+ * xbdback_do_io() will advance req pointer and restart processing.
+ * Note that we could probably set xbdi->xbdi_io to NULL and
+ * let the processing continue, but we really want to wait
+ * for the flush to complete before doing any more work.
+ */
xbdi->xbdi_cont = xbdback_co_cache_doflush_wait;
return NULL;
}