Chnage documentation for NBD_CMD_FLUSH again.
authorAlex Bligh <alex@alex.org.uk>
Sun, 22 May 2011 09:58:47 +0000 (10:58 +0100)
committerAlex Bligh <alex@alex.org.uk>
Sun, 22 May 2011 09:58:47 +0000 (10:58 +0100)
Use offset, length=0 for normal flushes. Reserve other options
for later (idea from Goswin von Brederlow <goswin-v-b@web.de>)

doc/proto.txt

index 61c2401..bd26657 100644 (file)
@@ -34,8 +34,9 @@ header consists a 32 bit magic number (magic), a 32 bit field denoting
 the request type (see below; 'type'), a 64 bit handle ('handle'), a 64
 bit data offset ('from'), and a 32 bit length ('len'). In case of a
 write request, the header is immediately followed by 'len' bytes of
 the request type (see below; 'type'), a 64 bit handle ('handle'), a 64
 bit data offset ('from'), and a 32 bit length ('len'). In case of a
 write request, the header is immediately followed by 'len' bytes of
-data. In the case of NBD_CMD_FLUSH, the offset and length are
-ignored.
+data. In the case of NBD_CMD_FLUSH, the offset and length should
+be zero (meaning "flush entire device"); other values are reserved
+for future use (e.g. for flushing specific areas without a write).
 
 The reply contains three fields: a 32 bit magic number ('magic'), a 32
 bit error code ('error'; 0, unless an error occurred in which case it is
 
 The reply contains three fields: a 32 bit magic number ('magic'), a 32
 bit error code ('error'; 0, unless an error occurred in which case it is