Skip to content

Commit 6dcfb75

Browse files
committed
xen-blkfront: Provide for 'feature-flush-cache' the BLKIF_OP_WRITE_FLUSH_CACHE operation.
The operation BLKIF_OP_WRITE_FLUSH_CACHE has existed in the Xen tree header file for years but it was never present in the Linux tree because the frontend (nor the backend) supported this interface. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
1 parent 4352b47 commit 6dcfb75

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎include/xen/interface/io/blkif.h‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ typedef uint64_t blkif_sector_t;
4444
*/
4545
#define BLKIF_OP_WRITE_BARRIER 2
4646

47+
/*
48+
* Recognised if "feature-flush-cache" is present in backend xenbus
49+
* info. A flush will ask the underlying storage hardware to flush its
50+
* non-volatile caches as appropriate. The "feature-flush-cache" node
51+
* contains a boolean indicating whether flush requests are likely to
52+
* succeed or fail. Either way, a flush request may fail at any time
53+
* with BLKIF_RSP_EOPNOTSUPP if it is unsupported by the underlying
54+
* block-device hardware. The boolean simply indicates whether or not it
55+
* is worthwhile for the frontend to attempt flushes. If a backend does
56+
* not recognise BLKIF_OP_WRITE_FLUSH_CACHE, it should *not* create the
57+
* "feature-flush-cache" node!
58+
*/
59+
#define BLKIF_OP_FLUSH_DISKCACHE 3
4760
/*
4861
* Maximum scatter/gather segments per request.
4962
* This is carefully chosen so that sizeof(struct blkif_ring) <= PAGE_SIZE.

0 commit comments

Comments
 (0)