[xen-unstable] blkif interface: Add BLKIF_OP_FLUSH_DISKCACHE.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen-unstable] blkif interface: Add BLKIF_OP_FLUSH_DISKCACHE.

Xen patchbot-unstable
# HG changeset patch
# User Keir Fraser <[hidden email]>
# Date 1196765428 0
# Node ID ebfb3b26010da86328d3844fe37fe20e9170d6ba
# Parent  b1da8762f85312656b19a905903ddf06fe0bacf2
blkif interface: Add BLKIF_OP_FLUSH_DISKCACHE.

This disk operation, implemented on Solaris only so far, asks a
backend to flush the disk caches of the underlying storage if
possible, and is contigent upon the 'feature-flush-cache' xenstore
flag (although currently Solaris will always attempt to flush
anyway).

Signed-off-by: John Levon <[hidden email]>
---
 xen/include/public/io/blkif.h |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletion(-)

diff -r b1da8762f853 -r ebfb3b26010d xen/include/public/io/blkif.h
--- a/xen/include/public/io/blkif.h Tue Dec 04 10:48:28 2007 +0000
+++ b/xen/include/public/io/blkif.h Tue Dec 04 10:50:28 2007 +0000
@@ -54,7 +54,7 @@
 #define BLKIF_OP_WRITE             1
 /*
  * Recognised only if "feature-barrier" is present in backend xenbus info.
- * The "feature_barrier" node contains a boolean indicating whether barrier
+ * The "feature-barrier" node contains a boolean indicating whether barrier
  * requests are likely to succeed or fail. Either way, a barrier request
  * may fail at any time with BLKIF_RSP_EOPNOTSUPP if it is unsupported by
  * the underlying block-device hardware. The boolean simply indicates whether
@@ -63,6 +63,19 @@
  * create the "feature-barrier" node!
  */
 #define BLKIF_OP_WRITE_BARRIER     2
+/*
+ * Recognised if "feature-flush-cache" is present in backend xenbus
+ * info.  A flush will ask the underlying storage hardware to flush its
+ * non-volatile caches as appropriate.  The "feature-flush-cache" node
+ * contains a boolean indicating whether flush requests are likely to
+ * succeed or fail. Either way, a flush request may fail at any time
+ * with BLKIF_RSP_EOPNOTSUPP if it is unsupported by the underlying
+ * block-device hardware. The boolean simply indicates whether or not it
+ * is worthwhile for the frontend to attempt flushes.  If a backend does
+ * not recognise BLKIF_OP_WRITE_FLUSH_CACHE, it should *not* create the
+ * "feature-flush-cache" node!
+ */
+#define BLKIF_OP_FLUSH_DISKCACHE   3
 
 /*
  * Maximum scatter/gather segments per request.

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog