• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_BLKDEV_H
20 #define _LINUX_BLKDEV_H
21 #include <linux/major.h>
22 #include <linux/genhd.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #include <linux/list.h>
25 #include <linux/timer.h>
26 #include <linux/workqueue.h>
27 #include <linux/pagemap.h>
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #include <linux/backing-dev.h>
30 #include <linux/wait.h>
31 #include <linux/mempool.h>
32 #include <linux/bio.h>
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #include <linux/module.h>
35 #include <linux/stringify.h>
36 #include <asm/scatterlist.h>
37 struct scsi_ioctl_command;
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 struct request_queue;
40 typedef struct request_queue request_queue_t;
41 struct elevator_queue;
42 typedef struct elevator_queue elevator_t;
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 struct request_pm_state;
45 struct blk_trace;
46 #define BLKDEV_MIN_RQ 4
47 #define BLKDEV_MAX_RQ 128
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 struct as_io_context {
50  spinlock_t lock;
51  void (*dtor)(struct as_io_context *aic);
52  void (*exit)(struct as_io_context *aic);
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  unsigned long state;
55  atomic_t nr_queued;
56  atomic_t nr_dispatched;
57  unsigned long last_end_request;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  unsigned long ttime_total;
60  unsigned long ttime_samples;
61  unsigned long ttime_mean;
62  unsigned int seek_samples;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  sector_t last_request_pos;
65  u64 seek_total;
66  sector_t seek_mean;
67 };
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 struct cfq_queue;
70 struct cfq_io_context {
71  struct rb_node rb_node;
72  void *key;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  struct cfq_queue *cfqq[2];
75  struct io_context *ioc;
76  unsigned long last_end_request;
77  sector_t last_request_pos;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  unsigned long last_queue;
80  unsigned long ttime_total;
81  unsigned long ttime_samples;
82  unsigned long ttime_mean;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  unsigned int seek_samples;
85  u64 seek_total;
86  sector_t seek_mean;
87  struct list_head queue_list;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  void (*dtor)(struct io_context *);
90  void (*exit)(struct io_context *);
91 };
92 struct io_context {
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  atomic_t refcount;
95  struct task_struct *task;
96  int (*set_ioprio)(struct io_context *, unsigned int);
97  unsigned long last_waited;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  int nr_batch_requests;
100  struct as_io_context *aic;
101  struct rb_root cic_root;
102 };
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 struct io_context *current_io_context(gfp_t gfp_flags);
105 struct io_context *get_io_context(gfp_t gfp_flags);
106 struct request;
107 typedef void (rq_end_io_fn)(struct request *, int);
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 struct request_list {
110  int count[2];
111  int starved[2];
112  int elvpriv;
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  mempool_t *rq_pool;
115  wait_queue_head_t wait[2];
116 };
117 #define BLK_MAX_CDB 16
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 struct request {
120  struct list_head queuelist;
121  struct list_head donelist;
122  unsigned long flags;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  sector_t sector;
125  unsigned long nr_sectors;
126  unsigned int current_nr_sectors;
127  sector_t hard_sector;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  unsigned long hard_nr_sectors;
130  unsigned int hard_cur_sectors;
131  struct bio *bio;
132  struct bio *biotail;
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  void *elevator_private;
135  void *completion_data;
136  int rq_status;
137  int errors;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  struct gendisk *rq_disk;
140  unsigned long start_time;
141  unsigned short nr_phys_segments;
142  unsigned short nr_hw_segments;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  unsigned short ioprio;
145  int tag;
146  int ref_count;
147  request_queue_t *q;
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  struct request_list *rl;
150  struct completion *waiting;
151  void *special;
152  char *buffer;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  unsigned int cmd_len;
155  unsigned char cmd[BLK_MAX_CDB];
156  unsigned int data_len;
157  unsigned int sense_len;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  void *data;
160  void *sense;
161  unsigned int timeout;
162  int retries;
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  rq_end_io_fn *end_io;
165  void *end_io_data;
166 };
167 enum rq_flag_bits {
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  __REQ_RW,
170  __REQ_FAILFAST,
171  __REQ_SORTED,
172  __REQ_SOFTBARRIER,
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  __REQ_HARDBARRIER,
175  __REQ_FUA,
176  __REQ_CMD,
177  __REQ_NOMERGE,
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  __REQ_STARTED,
180  __REQ_DONTPREP,
181  __REQ_QUEUED,
182  __REQ_ELVPRIV,
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  __REQ_PC,
185  __REQ_BLOCK_PC,
186  __REQ_SENSE,
187  __REQ_FAILED,
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  __REQ_QUIET,
190  __REQ_SPECIAL,
191  __REQ_DRIVE_CMD,
192  __REQ_DRIVE_TASK,
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  __REQ_DRIVE_TASKFILE,
195  __REQ_PREEMPT,
196  __REQ_PM_SUSPEND,
197  __REQ_PM_RESUME,
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199  __REQ_PM_SHUTDOWN,
200  __REQ_ORDERED_COLOR,
201  __REQ_RW_SYNC,
202  __REQ_NR_BITS,
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 };
205 #define REQ_RW (1 << __REQ_RW)
206 #define REQ_FAILFAST (1 << __REQ_FAILFAST)
207 #define REQ_SORTED (1 << __REQ_SORTED)
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
210 #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
211 #define REQ_FUA (1 << __REQ_FUA)
212 #define REQ_CMD (1 << __REQ_CMD)
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define REQ_NOMERGE (1 << __REQ_NOMERGE)
215 #define REQ_STARTED (1 << __REQ_STARTED)
216 #define REQ_DONTPREP (1 << __REQ_DONTPREP)
217 #define REQ_QUEUED (1 << __REQ_QUEUED)
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define REQ_ELVPRIV (1 << __REQ_ELVPRIV)
220 #define REQ_PC (1 << __REQ_PC)
221 #define REQ_BLOCK_PC (1 << __REQ_BLOCK_PC)
222 #define REQ_SENSE (1 << __REQ_SENSE)
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #define REQ_FAILED (1 << __REQ_FAILED)
225 #define REQ_QUIET (1 << __REQ_QUIET)
226 #define REQ_SPECIAL (1 << __REQ_SPECIAL)
227 #define REQ_DRIVE_CMD (1 << __REQ_DRIVE_CMD)
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define REQ_DRIVE_TASK (1 << __REQ_DRIVE_TASK)
230 #define REQ_DRIVE_TASKFILE (1 << __REQ_DRIVE_TASKFILE)
231 #define REQ_PREEMPT (1 << __REQ_PREEMPT)
232 #define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND)
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 #define REQ_PM_RESUME (1 << __REQ_PM_RESUME)
235 #define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN)
236 #define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR)
237 #define REQ_RW_SYNC (1 << __REQ_RW_SYNC)
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 struct request_pm_state
240 {
241  int pm_step;
242  u32 pm_state;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244  void* data;
245 };
246 #include <linux/elevator.h>
247 typedef int (merge_request_fn) (request_queue_t *, struct request *,
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249  struct bio *);
250 typedef int (merge_requests_fn) (request_queue_t *, struct request *,
251  struct request *);
252 typedef void (request_fn_proc) (request_queue_t *q);
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
255 typedef int (prep_rq_fn) (request_queue_t *, struct request *);
256 typedef void (unplug_fn) (request_queue_t *);
257 struct bio_vec;
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
260 typedef void (activity_fn) (void *data, int rw);
261 typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
262 typedef void (prepare_flush_fn) (request_queue_t *, struct request *);
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 typedef void (softirq_done_fn)(struct request *);
265 enum blk_queue_state {
266  Queue_down,
267  Queue_up,
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 };
270 struct blk_queue_tag {
271  struct request **tag_index;
272  unsigned long *tag_map;
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274  struct list_head busy_list;
275  int busy;
276  int max_depth;
277  int real_max_depth;
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279  atomic_t refcnt;
280 };
281 struct request_queue
282 {
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284  struct list_head queue_head;
285  struct request *last_merge;
286  elevator_t *elevator;
287  struct request_list rq;
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289  request_fn_proc *request_fn;
290  merge_request_fn *back_merge_fn;
291  merge_request_fn *front_merge_fn;
292  merge_requests_fn *merge_requests_fn;
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294  make_request_fn *make_request_fn;
295  prep_rq_fn *prep_rq_fn;
296  unplug_fn *unplug_fn;
297  merge_bvec_fn *merge_bvec_fn;
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299  activity_fn *activity_fn;
300  issue_flush_fn *issue_flush_fn;
301  prepare_flush_fn *prepare_flush_fn;
302  softirq_done_fn *softirq_done_fn;
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304  sector_t end_sector;
305  struct request *boundary_rq;
306  struct timer_list unplug_timer;
307  int unplug_thresh;
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309  unsigned long unplug_delay;
310  struct work_struct unplug_work;
311  struct backing_dev_info backing_dev_info;
312  void *queuedata;
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314  void *activity_data;
315  unsigned long bounce_pfn;
316  gfp_t bounce_gfp;
317  unsigned long queue_flags;
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319  spinlock_t __queue_lock;
320  spinlock_t *queue_lock;
321  struct kobject kobj;
322  unsigned long nr_requests;
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324  unsigned int nr_congestion_on;
325  unsigned int nr_congestion_off;
326  unsigned int nr_batching;
327  unsigned int max_sectors;
328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329  unsigned int max_hw_sectors;
330  unsigned short max_phys_segments;
331  unsigned short max_hw_segments;
332  unsigned short hardsect_size;
333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334  unsigned int max_segment_size;
335  unsigned long seg_boundary_mask;
336  unsigned int dma_alignment;
337  struct blk_queue_tag *queue_tags;
338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339  unsigned int nr_sorted;
340  unsigned int in_flight;
341  unsigned int sg_timeout;
342  unsigned int sg_reserved_size;
343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344  int node;
345  struct blk_trace *blk_trace;
346  unsigned int ordered, next_ordered, ordseq;
347  int orderr, ordcolor;
348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349  struct request pre_flush_rq, bar_rq, post_flush_rq;
350  struct request *orig_bar_rq;
351  unsigned int bi_size;
352  struct mutex sysfs_lock;
353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354 };
355 #define RQ_INACTIVE (-1)
356 #define RQ_ACTIVE 1
357 #define QUEUE_FLAG_CLUSTER 0
358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359 #define QUEUE_FLAG_QUEUED 1
360 #define QUEUE_FLAG_STOPPED 2
361 #define QUEUE_FLAG_READFULL 3
362 #define QUEUE_FLAG_WRITEFULL 4
363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364 #define QUEUE_FLAG_DEAD 5
365 #define QUEUE_FLAG_REENTER 6
366 #define QUEUE_FLAG_PLUGGED 7
367 #define QUEUE_FLAG_ELVSWITCH 8
368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369 enum {
370  QUEUE_ORDERED_NONE = 0x00,
371  QUEUE_ORDERED_DRAIN = 0x01,
372  QUEUE_ORDERED_TAG = 0x02,
373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374  QUEUE_ORDERED_PREFLUSH = 0x10,
375  QUEUE_ORDERED_POSTFLUSH = 0x20,
376  QUEUE_ORDERED_FUA = 0x40,
377  QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379  QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
380  QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
381  QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
382  QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384  QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
385  QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
386  QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
387  QUEUE_ORDSEQ_STARTED = 0x01,
388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389  QUEUE_ORDSEQ_DRAIN = 0x02,
390  QUEUE_ORDSEQ_PREFLUSH = 0x04,
391  QUEUE_ORDSEQ_BAR = 0x08,
392  QUEUE_ORDSEQ_POSTFLUSH = 0x10,
393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394  QUEUE_ORDSEQ_DONE = 0x20,
395 };
396 #define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
397 #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399 #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
400 #define blk_queue_flushing(q) ((q)->ordseq)
401 #define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
402 #define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
404 #define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST)
405 #define blk_rq_started(rq) ((rq)->flags & REQ_STARTED)
406 #define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq))
407 #define blk_pm_suspend_request(rq) ((rq)->flags & REQ_PM_SUSPEND)
408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
409 #define blk_pm_resume_request(rq) ((rq)->flags & REQ_PM_RESUME)
410 #define blk_pm_request(rq)   ((rq)->flags & (REQ_PM_SUSPEND | REQ_PM_RESUME))
411 #define blk_sorted_rq(rq) ((rq)->flags & REQ_SORTED)
412 #define blk_barrier_rq(rq) ((rq)->flags & REQ_HARDBARRIER)
413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
414 #define blk_fua_rq(rq) ((rq)->flags & REQ_FUA)
415 #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
416 #define rq_data_dir(rq) ((rq)->flags & 1)
417 #define RQ_NOMERGE_FLAGS   (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
419 #define rq_mergeable(rq)   (!((rq)->flags & RQ_NOMERGE_FLAGS) && blk_fs_request((rq)))
420 #define blk_queue_headactive(q, head_active)
421 #define BLKPREP_OK 0
422 #define BLKPREP_KILL 1
423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
424 #define BLKPREP_DEFER 2
425 #define BLK_BOUNCE_HIGH ((u64)blk_max_low_pfn << PAGE_SHIFT)
426 #define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT)
427 #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
429 #define rq_for_each_bio(_bio, rq)   if ((rq->bio))   for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next)
430 struct sec_size {
431  unsigned block_size;
432  unsigned block_size_bits;
433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
434 };
435 #define end_io_error(uptodate) (unlikely((uptodate) <= 0))
436 #define blk_queue_tag_depth(q) ((q)->queue_tags->busy)
437 #define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth)
438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
439 #define blk_rq_tagged(rq) ((rq)->flags & REQ_QUEUED)
440 #define MAX_PHYS_SEGMENTS 128
441 #define MAX_HW_SEGMENTS 128
442 #define SAFE_MAX_SECTORS 255
443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
444 #define BLK_DEF_MAX_SECTORS 1024
445 #define MAX_SEGMENT_SIZE 65536
446 #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
447 #define blk_finished_io(nsects) do { } while (0)
448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
449 #define blk_started_io(nsects) do { } while (0)
450 typedef struct {struct page *v;} Sector;
451 struct work_struct;
452 #define sector_div(n, b)(  {   int _res;   _res = (n) % (b);   (n) /= (b);   _res;  }  )
453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
454 #define MODULE_ALIAS_BLOCKDEV(major,minor)   MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
455 #define MODULE_ALIAS_BLOCKDEV_MAJOR(major)   MODULE_ALIAS("block-major-" __stringify(major) "-*")
456 #endif
457