Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #ifndef IOU_OP_DEF_H
0003 #define IOU_OP_DEF_H
0004 
0005 struct io_op_def {
0006     /* needs req->file assigned */
0007     unsigned        needs_file : 1;
0008     /* should block plug */
0009     unsigned        plug : 1;
0010     /* hash wq insertion if file is a regular file */
0011     unsigned        hash_reg_file : 1;
0012     /* unbound wq insertion if file is a non-regular file */
0013     unsigned        unbound_nonreg_file : 1;
0014     /* set if opcode supports polled "wait" */
0015     unsigned        pollin : 1;
0016     unsigned        pollout : 1;
0017     unsigned        poll_exclusive : 1;
0018     /* op supports buffer selection */
0019     unsigned        buffer_select : 1;
0020     /* opcode is not supported by this kernel */
0021     unsigned        not_supported : 1;
0022     /* skip auditing */
0023     unsigned        audit_skip : 1;
0024     /* supports ioprio */
0025     unsigned        ioprio : 1;
0026     /* supports iopoll */
0027     unsigned        iopoll : 1;
0028     /* opcode specific path will handle ->async_data allocation if needed */
0029     unsigned        manual_alloc : 1;
0030     /* size of async data needed, if any */
0031     unsigned short      async_size;
0032 
0033     const char      *name;
0034 
0035     int (*prep)(struct io_kiocb *, const struct io_uring_sqe *);
0036     int (*issue)(struct io_kiocb *, unsigned int);
0037     int (*prep_async)(struct io_kiocb *);
0038     void (*cleanup)(struct io_kiocb *);
0039 };
0040 
0041 extern const struct io_op_def io_op_defs[];
0042 
0043 void io_uring_optable_init(void);
0044 #endif