bio.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. /*
  2. * 2.5 block I/O model
  3. *
  4. * Copyright (C) 2001 Jens Axboe <axboe@suse.de>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public Licens
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-
  18. */
  19. #ifndef __LINUX_BIO_H
  20. #define __LINUX_BIO_H
  21. #include <linux/highmem.h>
  22. #include <linux/mempool.h>
  23. #include <linux/ioprio.h>
  24. #ifdef CONFIG_BLOCK
  25. #include <asm/io.h>
  26. #define BIO_DEBUG
  27. #ifdef BIO_DEBUG
  28. #define BIO_BUG_ON BUG_ON
  29. #else
  30. #define BIO_BUG_ON
  31. #endif
  32. #define BIO_MAX_PAGES 256
  33. #define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_CACHE_SHIFT)
  34. #define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9)
  35. /*
  36. * was unsigned short, but we might as well be ready for > 64kB I/O pages
  37. */
  38. struct bio_vec {
  39. struct page *bv_page;
  40. unsigned int bv_len;
  41. unsigned int bv_offset;
  42. };
  43. struct bio_set;
  44. struct bio;
  45. struct bio_integrity_payload;
  46. typedef void (bio_end_io_t) (struct bio *, int);
  47. typedef void (bio_destructor_t) (struct bio *);
  48. /*
  49. * main unit of I/O for the block layer and lower layers (ie drivers and
  50. * stacking drivers)
  51. */
  52. struct bio {
  53. sector_t bi_sector; /* device address in 512 byte
  54. sectors */
  55. struct bio *bi_next; /* request queue link */
  56. struct block_device *bi_bdev;
  57. unsigned long bi_flags; /* status, command, etc */
  58. unsigned long bi_rw; /* bottom bits READ/WRITE,
  59. * top bits priority
  60. */
  61. unsigned short bi_vcnt; /* how many bio_vec's */
  62. unsigned short bi_idx; /* current index into bvl_vec */
  63. /* Number of segments in this BIO after
  64. * physical address coalescing is performed.
  65. */
  66. unsigned int bi_phys_segments;
  67. unsigned int bi_size; /* residual I/O count */
  68. /*
  69. * To keep track of the max segment size, we account for the
  70. * sizes of the first and last mergeable segments in this bio.
  71. */
  72. unsigned int bi_seg_front_size;
  73. unsigned int bi_seg_back_size;
  74. unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
  75. unsigned int bi_comp_cpu; /* completion CPU */
  76. struct bio_vec *bi_io_vec; /* the actual vec list */
  77. bio_end_io_t *bi_end_io;
  78. atomic_t bi_cnt; /* pin count */
  79. void *bi_private;
  80. #if defined(CONFIG_BLK_DEV_INTEGRITY)
  81. struct bio_integrity_payload *bi_integrity; /* data integrity */
  82. #endif
  83. bio_destructor_t *bi_destructor; /* destructor */
  84. };
  85. /*
  86. * bio flags
  87. */
  88. #define BIO_UPTODATE 0 /* ok after I/O completion */
  89. #define BIO_RW_BLOCK 1 /* RW_AHEAD set, and read/write would block */
  90. #define BIO_EOF 2 /* out-out-bounds error */
  91. #define BIO_SEG_VALID 3 /* bi_phys_segments valid */
  92. #define BIO_CLONED 4 /* doesn't own data */
  93. #define BIO_BOUNCED 5 /* bio is a bounce bio */
  94. #define BIO_USER_MAPPED 6 /* contains user pages */
  95. #define BIO_EOPNOTSUPP 7 /* not supported */
  96. #define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */
  97. #define BIO_NULL_MAPPED 9 /* contains invalid user pages */
  98. #define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */
  99. #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
  100. /*
  101. * top 4 bits of bio flags indicate the pool this bio came from
  102. */
  103. #define BIO_POOL_BITS (4)
  104. #define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS)
  105. #define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET)
  106. #define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET)
  107. /*
  108. * bio bi_rw flags
  109. *
  110. * bit 0 -- data direction
  111. * If not set, bio is a read from device. If set, it's a write to device.
  112. * bit 1 -- rw-ahead when set
  113. * bit 2 -- barrier
  114. * Insert a serialization point in the IO queue, forcing previously
  115. * submitted IO to be completed before this oen is issued.
  116. * bit 3 -- synchronous I/O hint: the block layer will unplug immediately
  117. * Note that this does NOT indicate that the IO itself is sync, just
  118. * that the block layer will not postpone issue of this IO by plugging.
  119. * bit 4 -- metadata request
  120. * Used for tracing to differentiate metadata and data IO. May also
  121. * get some preferential treatment in the IO scheduler
  122. * bit 5 -- discard sectors
  123. * Informs the lower level device that this range of sectors is no longer
  124. * used by the file system and may thus be freed by the device. Used
  125. * for flash based storage.
  126. * bit 6 -- fail fast device errors
  127. * bit 7 -- fail fast transport errors
  128. * bit 8 -- fail fast driver errors
  129. * Don't want driver retries for any fast fail whatever the reason.
  130. */
  131. #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */
  132. #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */
  133. #define BIO_RW_BARRIER 2
  134. #define BIO_RW_SYNC 3
  135. #define BIO_RW_META 4
  136. #define BIO_RW_DISCARD 5
  137. #define BIO_RW_FAILFAST_DEV 6
  138. #define BIO_RW_FAILFAST_TRANSPORT 7
  139. #define BIO_RW_FAILFAST_DRIVER 8
  140. /*
  141. * upper 16 bits of bi_rw define the io priority of this bio
  142. */
  143. #define BIO_PRIO_SHIFT (8 * sizeof(unsigned long) - IOPRIO_BITS)
  144. #define bio_prio(bio) ((bio)->bi_rw >> BIO_PRIO_SHIFT)
  145. #define bio_prio_valid(bio) ioprio_valid(bio_prio(bio))
  146. #define bio_set_prio(bio, prio) do { \
  147. WARN_ON(prio >= (1 << IOPRIO_BITS)); \
  148. (bio)->bi_rw &= ((1UL << BIO_PRIO_SHIFT) - 1); \
  149. (bio)->bi_rw |= ((unsigned long) (prio) << BIO_PRIO_SHIFT); \
  150. } while (0)
  151. /*
  152. * various member access, note that bio_data should of course not be used
  153. * on highmem page vectors
  154. */
  155. #define bio_iovec_idx(bio, idx) (&((bio)->bi_io_vec[(idx)]))
  156. #define bio_iovec(bio) bio_iovec_idx((bio), (bio)->bi_idx)
  157. #define bio_page(bio) bio_iovec((bio))->bv_page
  158. #define bio_offset(bio) bio_iovec((bio))->bv_offset
  159. #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
  160. #define bio_sectors(bio) ((bio)->bi_size >> 9)
  161. #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
  162. #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
  163. #define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV))
  164. #define bio_failfast_transport(bio) \
  165. ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT))
  166. #define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER))
  167. #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
  168. #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META))
  169. #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD))
  170. #define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio))
  171. static inline unsigned int bio_cur_sectors(struct bio *bio)
  172. {
  173. if (bio->bi_vcnt)
  174. return bio_iovec(bio)->bv_len >> 9;
  175. else /* dataless requests such as discard */
  176. return bio->bi_size >> 9;
  177. }
  178. static inline void *bio_data(struct bio *bio)
  179. {
  180. if (bio->bi_vcnt)
  181. return page_address(bio_page(bio)) + bio_offset(bio);
  182. return NULL;
  183. }
  184. /*
  185. * will die
  186. */
  187. #define bio_to_phys(bio) (page_to_phys(bio_page((bio))) + (unsigned long) bio_offset((bio)))
  188. #define bvec_to_phys(bv) (page_to_phys((bv)->bv_page) + (unsigned long) (bv)->bv_offset)
  189. /*
  190. * queues that have highmem support enabled may still need to revert to
  191. * PIO transfers occasionally and thus map high pages temporarily. For
  192. * permanent PIO fall back, user is probably better off disabling highmem
  193. * I/O completely on that queue (see ide-dma for example)
  194. */
  195. #define __bio_kmap_atomic(bio, idx, kmtype) \
  196. (kmap_atomic(bio_iovec_idx((bio), (idx))->bv_page, kmtype) + \
  197. bio_iovec_idx((bio), (idx))->bv_offset)
  198. #define __bio_kunmap_atomic(addr, kmtype) kunmap_atomic(addr, kmtype)
  199. /*
  200. * merge helpers etc
  201. */
  202. #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
  203. #define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
  204. /*
  205. * allow arch override, for eg virtualized architectures (put in asm/io.h)
  206. */
  207. #ifndef BIOVEC_PHYS_MERGEABLE
  208. #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
  209. ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
  210. #endif
  211. #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
  212. (((addr1) | (mask)) == (((addr2) - 1) | (mask)))
  213. #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \
  214. __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, (q)->seg_boundary_mask)
  215. #define BIO_SEG_BOUNDARY(q, b1, b2) \
  216. BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2)))
  217. #define bio_io_error(bio) bio_endio((bio), -EIO)
  218. /*
  219. * drivers should not use the __ version unless they _really_ want to
  220. * run through the entire bio and not just pending pieces
  221. */
  222. #define __bio_for_each_segment(bvl, bio, i, start_idx) \
  223. for (bvl = bio_iovec_idx((bio), (start_idx)), i = (start_idx); \
  224. i < (bio)->bi_vcnt; \
  225. bvl++, i++)
  226. #define bio_for_each_segment(bvl, bio, i) \
  227. __bio_for_each_segment(bvl, bio, i, (bio)->bi_idx)
  228. /*
  229. * get a reference to a bio, so it won't disappear. the intended use is
  230. * something like:
  231. *
  232. * bio_get(bio);
  233. * submit_bio(rw, bio);
  234. * if (bio->bi_flags ...)
  235. * do_something
  236. * bio_put(bio);
  237. *
  238. * without the bio_get(), it could potentially complete I/O before submit_bio
  239. * returns. and then bio would be freed memory when if (bio->bi_flags ...)
  240. * runs
  241. */
  242. #define bio_get(bio) atomic_inc(&(bio)->bi_cnt)
  243. #if defined(CONFIG_BLK_DEV_INTEGRITY)
  244. /*
  245. * bio integrity payload
  246. */
  247. struct bio_integrity_payload {
  248. struct bio *bip_bio; /* parent bio */
  249. struct bio_vec *bip_vec; /* integrity data vector */
  250. sector_t bip_sector; /* virtual start sector */
  251. void *bip_buf; /* generated integrity data */
  252. bio_end_io_t *bip_end_io; /* saved I/O completion fn */
  253. int bip_error; /* saved I/O error */
  254. unsigned int bip_size;
  255. unsigned short bip_pool; /* pool the ivec came from */
  256. unsigned short bip_vcnt; /* # of integrity bio_vecs */
  257. unsigned short bip_idx; /* current bip_vec index */
  258. struct work_struct bip_work; /* I/O completion */
  259. };
  260. #endif /* CONFIG_BLK_DEV_INTEGRITY */
  261. /*
  262. * A bio_pair is used when we need to split a bio.
  263. * This can only happen for a bio that refers to just one
  264. * page of data, and in the unusual situation when the
  265. * page crosses a chunk/device boundary
  266. *
  267. * The address of the master bio is stored in bio1.bi_private
  268. * The address of the pool the pair was allocated from is stored
  269. * in bio2.bi_private
  270. */
  271. struct bio_pair {
  272. struct bio bio1, bio2;
  273. struct bio_vec bv1, bv2;
  274. #if defined(CONFIG_BLK_DEV_INTEGRITY)
  275. struct bio_integrity_payload bip1, bip2;
  276. struct bio_vec iv1, iv2;
  277. #endif
  278. atomic_t cnt;
  279. int error;
  280. };
  281. extern struct bio_pair *bio_split(struct bio *bi, int first_sectors);
  282. extern void bio_pair_release(struct bio_pair *dbio);
  283. extern struct bio_set *bioset_create(int, int);
  284. extern void bioset_free(struct bio_set *);
  285. extern struct bio *bio_alloc(gfp_t, int);
  286. extern struct bio *bio_kmalloc(gfp_t, int);
  287. extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
  288. extern void bio_put(struct bio *);
  289. extern void bio_free(struct bio *, struct bio_set *);
  290. extern void bio_endio(struct bio *, int);
  291. struct request_queue;
  292. extern int bio_phys_segments(struct request_queue *, struct bio *);
  293. extern void __bio_clone(struct bio *, struct bio *);
  294. extern struct bio *bio_clone(struct bio *, gfp_t);
  295. extern void bio_init(struct bio *);
  296. extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
  297. extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
  298. unsigned int, unsigned int);
  299. extern int bio_get_nr_vecs(struct block_device *);
  300. extern sector_t bio_sector_offset(struct bio *, unsigned short, unsigned int);
  301. extern struct bio *bio_map_user(struct request_queue *, struct block_device *,
  302. unsigned long, unsigned int, int, gfp_t);
  303. struct sg_iovec;
  304. struct rq_map_data;
  305. extern struct bio *bio_map_user_iov(struct request_queue *,
  306. struct block_device *,
  307. struct sg_iovec *, int, int, gfp_t);
  308. extern void bio_unmap_user(struct bio *);
  309. extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int,
  310. gfp_t);
  311. extern struct bio *bio_copy_kern(struct request_queue *, void *, unsigned int,
  312. gfp_t, int);
  313. extern void bio_set_pages_dirty(struct bio *bio);
  314. extern void bio_check_pages_dirty(struct bio *bio);
  315. extern struct bio *bio_copy_user(struct request_queue *, struct rq_map_data *,
  316. unsigned long, unsigned int, int, gfp_t);
  317. extern struct bio *bio_copy_user_iov(struct request_queue *,
  318. struct rq_map_data *, struct sg_iovec *,
  319. int, int, gfp_t);
  320. extern int bio_uncopy_user(struct bio *);
  321. void zero_fill_bio(struct bio *bio);
  322. extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set *);
  323. extern unsigned int bvec_nr_vecs(unsigned short idx);
  324. /*
  325. * Allow queuer to specify a completion CPU for this bio
  326. */
  327. static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu)
  328. {
  329. bio->bi_comp_cpu = cpu;
  330. }
  331. /*
  332. * bio_set is used to allow other portions of the IO system to
  333. * allocate their own private memory pools for bio and iovec structures.
  334. * These memory pools in turn all allocate from the bio_slab
  335. * and the bvec_slabs[].
  336. */
  337. #define BIO_POOL_SIZE 2
  338. #define BIOVEC_NR_POOLS 6
  339. struct bio_set {
  340. mempool_t *bio_pool;
  341. #if defined(CONFIG_BLK_DEV_INTEGRITY)
  342. mempool_t *bio_integrity_pool;
  343. #endif
  344. mempool_t *bvec_pools[BIOVEC_NR_POOLS];
  345. };
  346. struct biovec_slab {
  347. int nr_vecs;
  348. char *name;
  349. struct kmem_cache *slab;
  350. };
  351. extern struct bio_set *fs_bio_set;
  352. /*
  353. * a small number of entries is fine, not going to be performance critical.
  354. * basically we just need to survive
  355. */
  356. #define BIO_SPLIT_ENTRIES 2
  357. #ifdef CONFIG_HIGHMEM
  358. /*
  359. * remember to add offset! and never ever reenable interrupts between a
  360. * bvec_kmap_irq and bvec_kunmap_irq!!
  361. *
  362. * This function MUST be inlined - it plays with the CPU interrupt flags.
  363. */
  364. static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags)
  365. {
  366. unsigned long addr;
  367. /*
  368. * might not be a highmem page, but the preempt/irq count
  369. * balancing is a lot nicer this way
  370. */
  371. local_irq_save(*flags);
  372. addr = (unsigned long) kmap_atomic(bvec->bv_page, KM_BIO_SRC_IRQ);
  373. BUG_ON(addr & ~PAGE_MASK);
  374. return (char *) addr + bvec->bv_offset;
  375. }
  376. static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags)
  377. {
  378. unsigned long ptr = (unsigned long) buffer & PAGE_MASK;
  379. kunmap_atomic((void *) ptr, KM_BIO_SRC_IRQ);
  380. local_irq_restore(*flags);
  381. }
  382. #else
  383. #define bvec_kmap_irq(bvec, flags) (page_address((bvec)->bv_page) + (bvec)->bv_offset)
  384. #define bvec_kunmap_irq(buf, flags) do { *(flags) = 0; } while (0)
  385. #endif
  386. static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
  387. unsigned long *flags)
  388. {
  389. return bvec_kmap_irq(bio_iovec_idx(bio, idx), flags);
  390. }
  391. #define __bio_kunmap_irq(buf, flags) bvec_kunmap_irq(buf, flags)
  392. #define bio_kmap_irq(bio, flags) \
  393. __bio_kmap_irq((bio), (bio)->bi_idx, (flags))
  394. #define bio_kunmap_irq(buf,flags) __bio_kunmap_irq(buf, flags)
  395. /*
  396. * Check whether this bio carries any data or not. A NULL bio is allowed.
  397. */
  398. static inline int bio_has_data(struct bio *bio)
  399. {
  400. return bio && bio->bi_io_vec != NULL;
  401. }
  402. #if defined(CONFIG_BLK_DEV_INTEGRITY)
  403. #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)]))
  404. #define bip_vec(bip) bip_vec_idx(bip, 0)
  405. #define __bip_for_each_vec(bvl, bip, i, start_idx) \
  406. for (bvl = bip_vec_idx((bip), (start_idx)), i = (start_idx); \
  407. i < (bip)->bip_vcnt; \
  408. bvl++, i++)
  409. #define bip_for_each_vec(bvl, bip, i) \
  410. __bip_for_each_vec(bvl, bip, i, (bip)->bip_idx)
  411. #define bio_integrity(bio) (bio->bi_integrity != NULL)
  412. extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *);
  413. extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int);
  414. extern void bio_integrity_free(struct bio *, struct bio_set *);
  415. extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int);
  416. extern int bio_integrity_enabled(struct bio *bio);
  417. extern int bio_integrity_set_tag(struct bio *, void *, unsigned int);
  418. extern int bio_integrity_get_tag(struct bio *, void *, unsigned int);
  419. extern int bio_integrity_prep(struct bio *);
  420. extern void bio_integrity_endio(struct bio *, int);
  421. extern void bio_integrity_advance(struct bio *, unsigned int);
  422. extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int);
  423. extern void bio_integrity_split(struct bio *, struct bio_pair *, int);
  424. extern int bio_integrity_clone(struct bio *, struct bio *, struct bio_set *);
  425. extern int bioset_integrity_create(struct bio_set *, int);
  426. extern void bioset_integrity_free(struct bio_set *);
  427. extern void bio_integrity_init_slab(void);
  428. #else /* CONFIG_BLK_DEV_INTEGRITY */
  429. #define bio_integrity(a) (0)
  430. #define bioset_integrity_create(a, b) (0)
  431. #define bio_integrity_prep(a) (0)
  432. #define bio_integrity_enabled(a) (0)
  433. #define bio_integrity_clone(a, b, c) (0)
  434. #define bioset_integrity_free(a) do { } while (0)
  435. #define bio_integrity_free(a, b) do { } while (0)
  436. #define bio_integrity_endio(a, b) do { } while (0)
  437. #define bio_integrity_advance(a, b) do { } while (0)
  438. #define bio_integrity_trim(a, b, c) do { } while (0)
  439. #define bio_integrity_split(a, b, c) do { } while (0)
  440. #define bio_integrity_set_tag(a, b, c) do { } while (0)
  441. #define bio_integrity_get_tag(a, b, c) do { } while (0)
  442. #define bio_integrity_init_slab(a) do { } while (0)
  443. #endif /* CONFIG_BLK_DEV_INTEGRITY */
  444. #endif /* CONFIG_BLOCK */
  445. #endif /* __LINUX_BIO_H */