File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 30
30
* this IO request, request's handling result is committed to ublk
31
31
* driver, meantime FETCH_REQ is piggyback, and FETCH_REQ has to be
32
32
* handled before completing io request.
33
+ *
34
+ * NEED_GET_DATA: only used for write requests to set io addr and copy data
35
+ * When NEED_GET_DATA is set, ublksrv has to issue UBLK_IO_NEED_GET_DATA
36
+ * command after ublk driver returns UBLK_IO_RES_NEED_GET_DATA.
37
+ *
38
+ * It is only used if ublksrv set UBLK_F_NEED_GET_DATA flag
39
+ * while starting a ublk device.
33
40
*/
34
41
#define UBLK_IO_FETCH_REQ 0x20
35
42
#define UBLK_IO_COMMIT_AND_FETCH_REQ 0x21
43
+ #define UBLK_IO_NEED_GET_DATA 0x22
36
44
37
45
/* only ABORT means that no re-fetch */
38
46
#define UBLK_IO_RES_OK 0
47
+ #define UBLK_IO_RES_NEED_GET_DATA 1
39
48
#define UBLK_IO_RES_ABORT (-ENODEV)
40
49
41
50
#define UBLKSRV_CMD_BUF_OFFSET 0
56
65
*/
57
66
#define UBLK_F_URING_CMD_COMP_IN_TASK (1ULL << 1)
58
67
68
+ /*
69
+ * User should issue io cmd again for write requests to
70
+ * set io buffer address and copy data from bio vectors
71
+ * to the userspace io buffer.
72
+ *
73
+ * In this mode, task_work is not used.
74
+ */
75
+ #define UBLK_F_NEED_GET_DATA (1UL << 2)
76
+
59
77
/* device state */
60
78
#define UBLK_S_DEV_DEAD 0
61
79
#define UBLK_S_DEV_LIVE 1
You can’t perform that action at this time.
0 commit comments