File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,11 @@ enum {
245245#define IORING_POLL_UPDATE_EVENTS (1U << 1)
246246#define IORING_POLL_UPDATE_USER_DATA (1U << 2)
247247
248+ #define IORING_NOP_INJECT_RESULT (1U << 0)
249+ #define IORING_NOP_FILE (1U << 1)
250+ #define IORING_NOP_FIXED_FILE (1U << 2)
251+ #define IORING_NOP_FIXED_BUFFER (1U << 3)
252+
248253/*
249254 * IO completion data structure (Completion Queue Entry)
250255 */
Original file line number Diff line number Diff line change @@ -546,16 +546,16 @@ static void init_io(struct submitter *s, unsigned index)
546546 f = get_next_file (s );
547547
548548 if (do_nop ) {
549+ sqe -> rw_flags = IORING_NOP_FILE ;
549550 if (register_files ) {
550551 sqe -> fd = f -> fixed_fd ;
551- sqe -> rw_flags = ( 1U << 1 ) | ( 1U << 2 ) ;
552+ sqe -> rw_flags |= IORING_NOP_FIXED_FILE ;
552553 } else {
553554 sqe -> fd = f -> real_fd ;
554- sqe -> rw_flags = (1U << 1 );
555555 }
556556 if (fixedbufs )
557- sqe -> rw_flags |= ( 1U << 3 ) ;
558- sqe -> rw_flags |= ( 1U << 0 ) ;
557+ sqe -> rw_flags |= IORING_NOP_FIXED_BUFFER ;
558+ sqe -> rw_flags |= IORING_NOP_INJECT_RESULT ;
559559 sqe -> len = bs ;
560560 sqe -> opcode = IORING_OP_NOP ;
561561 return ;
You can’t perform that action at this time.
0 commit comments