1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _LINUX_ELEVATOR_H 20 #define _LINUX_ELEVATOR_H 21 typedef int (elevator_merge_fn) (request_queue_t *, struct request **, 22 struct bio *); 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *); 25 typedef void (elevator_merged_fn) (request_queue_t *, struct request *); 26 typedef int (elevator_dispatch_fn) (request_queue_t *, int); 27 typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 typedef int (elevator_queue_empty_fn) (request_queue_t *); 30 typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); 31 typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); 32 typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *); 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t); 35 typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); 36 typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); 37 typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *); 40 typedef void (elevator_exit_fn) (elevator_t *); 41 struct elevator_ops 42 { 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 elevator_merge_fn *elevator_merge_fn; 45 elevator_merged_fn *elevator_merged_fn; 46 elevator_merge_req_fn *elevator_merge_req_fn; 47 elevator_dispatch_fn *elevator_dispatch_fn; 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 elevator_add_req_fn *elevator_add_req_fn; 50 elevator_activate_req_fn *elevator_activate_req_fn; 51 elevator_deactivate_req_fn *elevator_deactivate_req_fn; 52 elevator_queue_empty_fn *elevator_queue_empty_fn; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 elevator_completed_req_fn *elevator_completed_req_fn; 55 elevator_request_list_fn *elevator_former_req_fn; 56 elevator_request_list_fn *elevator_latter_req_fn; 57 elevator_set_req_fn *elevator_set_req_fn; 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 elevator_put_req_fn *elevator_put_req_fn; 60 elevator_may_queue_fn *elevator_may_queue_fn; 61 elevator_init_fn *elevator_init_fn; 62 elevator_exit_fn *elevator_exit_fn; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 void (*trim)(struct io_context *); 65 }; 66 #define ELV_NAME_MAX (16) 67 struct elv_fs_entry { 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 struct attribute attr; 70 ssize_t (*show)(elevator_t *, char *); 71 ssize_t (*store)(elevator_t *, const char *, size_t); 72 }; 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 struct elevator_type 75 { 76 struct list_head list; 77 struct elevator_ops ops; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 struct elevator_type *elevator_type; 80 struct elv_fs_entry *elevator_attrs; 81 char elevator_name[ELV_NAME_MAX]; 82 struct module *elevator_owner; 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 }; 85 struct elevator_queue 86 { 87 struct elevator_ops *ops; 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 void *elevator_data; 90 struct kobject kobj; 91 struct elevator_type *elevator_type; 92 struct mutex sysfs_lock; 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 }; 95 #define ELEVATOR_NO_MERGE 0 96 #define ELEVATOR_FRONT_MERGE 1 97 #define ELEVATOR_BACK_MERGE 2 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 #define ELEVATOR_INSERT_FRONT 1 100 #define ELEVATOR_INSERT_BACK 2 101 #define ELEVATOR_INSERT_SORT 3 102 #define ELEVATOR_INSERT_REQUEUE 4 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 enum { 105 ELV_MQUEUE_MAY, 106 ELV_MQUEUE_NO, 107 ELV_MQUEUE_MUST, 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 }; 110 #define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors) 111 #endif 112