Revision bbb74edd
b/nbd.c | ||
---|---|---|
67 | 67 |
#define NBD_PRINT_DEBUG _IO(0xab, 6) |
68 | 68 |
#define NBD_SET_SIZE_BLOCKS _IO(0xab, 7) |
69 | 69 |
#define NBD_DISCONNECT _IO(0xab, 8) |
70 |
#define NBD_SET_TIMEOUT _IO(0xab, 9) |
|
71 |
#define NBD_SET_FLAGS _IO(0xab, 10) |
|
70 | 72 |
|
71 | 73 |
#define NBD_OPT_EXPORT_NAME (1 << 0) |
72 | 74 |
|
b/nbd.h | ||
---|---|---|
39 | 39 |
|
40 | 40 |
#define NBD_FLAG_HAS_FLAGS (1 << 0) /* Flags are there */ |
41 | 41 |
#define NBD_FLAG_READ_ONLY (1 << 1) /* Device is read-only */ |
42 |
#define NBD_FLAG_SEND_FLUSH (1 << 2) /* Send FLUSH */ |
|
43 |
#define NBD_FLAG_SEND_FUA (1 << 3) /* Send FUA (Force Unit Access) */ |
|
44 |
#define NBD_FLAG_ROTATIONAL (1 << 4) /* Use elevator algorithm - rotational media */ |
|
45 |
#define NBD_FLAG_SEND_TRIM (1 << 5) /* Send TRIM (discard) */ |
|
46 |
|
|
47 |
#define NBD_CMD_MASK_COMMAND 0x0000ffff |
|
48 |
#define NBD_CMD_FLAG_FUA (1 << 16) |
|
42 | 49 |
|
43 | 50 |
enum { |
44 | 51 |
NBD_CMD_READ = 0, |
45 | 52 |
NBD_CMD_WRITE = 1, |
46 |
NBD_CMD_DISC = 2 |
|
53 |
NBD_CMD_DISC = 2, |
|
54 |
NBD_CMD_FLUSH = 3, |
|
55 |
NBD_CMD_TRIM = 4 |
|
47 | 56 |
}; |
48 | 57 |
|
49 | 58 |
#define NBD_DEFAULT_PORT 10809 |
Also available in: Unified diff