2 * Copyright (C) 2001 Jens Axboe <axboe@suse.de>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public Licens
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-
19 #include <linux/swap.h>
20 #include <linux/bio.h>
21 #include <linux/blkdev.h>
22 #include <linux/slab.h>
23 #include <linux/init.h>
24 #include <linux/kernel.h>
25 #include <linux/module.h>
26 #include <linux/mempool.h>
27 #include <linux/workqueue.h>
29 #define BIO_POOL_SIZE 256
31 static mempool_t *bio_pool;
32 static kmem_cache_t *bio_slab;
34 #define BIOVEC_NR_POOLS 6
37 * a small number of entries is fine, not going to be performance critical.
38 * basically we just need to survive
40 #define BIO_SPLIT_ENTRIES 8
41 mempool_t *bio_split_pool;
51 * if you change this list, also change bvec_alloc or things will
52 * break badly! cannot be bigger than what you can fit into an
56 #define BV(x) { .nr_vecs = x, .name = "biovec-"__stringify(x) }
57 static struct biovec_pool bvec_array[BIOVEC_NR_POOLS] = {
58 BV(1), BV(4), BV(16), BV(64), BV(128), BV(BIO_MAX_PAGES),
62 static inline struct bio_vec *bvec_alloc(int gfp_mask, int nr, unsigned long *idx)
64 struct biovec_pool *bp;
68 * see comment near bvec_array define!
71 case 1 : *idx = 0; break;
72 case 2 ... 4: *idx = 1; break;
73 case 5 ... 16: *idx = 2; break;
74 case 17 ... 64: *idx = 3; break;
75 case 65 ... 128: *idx = 4; break;
76 case 129 ... BIO_MAX_PAGES: *idx = 5; break;
81 * idx now points to the pool we want to allocate from
83 bp = bvec_array + *idx;
85 bvl = mempool_alloc(bp->pool, gfp_mask);
87 memset(bvl, 0, bp->nr_vecs * sizeof(struct bio_vec));
92 * default destructor for a bio allocated with bio_alloc()
94 void bio_destructor(struct bio *bio)
96 const int pool_idx = BIO_POOL_IDX(bio);
97 struct biovec_pool *bp = bvec_array + pool_idx;
99 BIO_BUG_ON(pool_idx >= BIOVEC_NR_POOLS);
101 mempool_free(bio->bi_io_vec, bp->pool);
102 mempool_free(bio, bio_pool);
105 inline void bio_init(struct bio *bio)
108 bio->bi_flags = 1 << BIO_UPTODATE;
112 bio->bi_phys_segments = 0;
113 bio->bi_hw_segments = 0;
114 bio->bi_hw_front_size = 0;
115 bio->bi_hw_back_size = 0;
117 bio->bi_max_vecs = 0;
118 bio->bi_end_io = NULL;
119 atomic_set(&bio->bi_cnt, 1);
120 bio->bi_private = NULL;
124 * bio_alloc - allocate a bio for I/O
125 * @gfp_mask: the GFP_ mask given to the slab allocator
126 * @nr_iovecs: number of iovecs to pre-allocate
129 * bio_alloc will first try it's on mempool to satisfy the allocation.
130 * If %__GFP_WAIT is set then we will block on the internal pool waiting
131 * for a &struct bio to become free.
133 struct bio *bio_alloc(int gfp_mask, int nr_iovecs)
135 struct bio *bio = mempool_alloc(bio_pool, gfp_mask);
138 struct bio_vec *bvl = NULL;
141 if (likely(nr_iovecs)) {
144 bvl = bvec_alloc(gfp_mask, nr_iovecs, &idx);
145 if (unlikely(!bvl)) {
146 mempool_free(bio, bio_pool);
150 bio->bi_flags |= idx << BIO_POOL_OFFSET;
151 bio->bi_max_vecs = bvec_array[idx].nr_vecs;
153 bio->bi_io_vec = bvl;
154 bio->bi_destructor = bio_destructor;
161 * bio_put - release a reference to a bio
162 * @bio: bio to release reference to
165 * Put a reference to a &struct bio, either one you have gotten with
166 * bio_alloc or bio_get. The last put of a bio will free it.
168 void bio_put(struct bio *bio)
170 BIO_BUG_ON(!atomic_read(&bio->bi_cnt));
175 if (atomic_dec_and_test(&bio->bi_cnt)) {
177 bio->bi_destructor(bio);
181 inline int bio_phys_segments(request_queue_t *q, struct bio *bio)
183 if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
184 blk_recount_segments(q, bio);
186 return bio->bi_phys_segments;
189 inline int bio_hw_segments(request_queue_t *q, struct bio *bio)
191 if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
192 blk_recount_segments(q, bio);
194 return bio->bi_hw_segments;
198 * __bio_clone - clone a bio
199 * @bio: destination bio
200 * @bio_src: bio to clone
202 * Clone a &bio. Caller will own the returned bio, but not
203 * the actual data it points to. Reference count of returned
206 inline void __bio_clone(struct bio *bio, struct bio *bio_src)
208 request_queue_t *q = bdev_get_queue(bio_src->bi_bdev);
210 memcpy(bio->bi_io_vec, bio_src->bi_io_vec, bio_src->bi_max_vecs * sizeof(struct bio_vec));
212 bio->bi_sector = bio_src->bi_sector;
213 bio->bi_bdev = bio_src->bi_bdev;
214 bio->bi_flags |= 1 << BIO_CLONED;
215 bio->bi_rw = bio_src->bi_rw;
218 * notes -- maybe just leave bi_idx alone. assume identical mapping
221 bio->bi_vcnt = bio_src->bi_vcnt;
222 bio->bi_size = bio_src->bi_size;
223 bio_phys_segments(q, bio);
224 bio_hw_segments(q, bio);
228 * bio_clone - clone a bio
230 * @gfp_mask: allocation priority
232 * Like __bio_clone, only also allocates the returned bio
234 struct bio *bio_clone(struct bio *bio, int gfp_mask)
236 struct bio *b = bio_alloc(gfp_mask, bio->bi_max_vecs);
245 * bio_get_nr_vecs - return approx number of vecs
248 * Return the approximate number of pages we can send to this target.
249 * There's no guarantee that you will be able to fit this number of pages
250 * into a bio, it does not account for dynamic restrictions that vary
253 int bio_get_nr_vecs(struct block_device *bdev)
255 request_queue_t *q = bdev_get_queue(bdev);
258 nr_pages = ((q->max_sectors << 9) + PAGE_SIZE - 1) >> PAGE_SHIFT;
259 if (nr_pages > q->max_phys_segments)
260 nr_pages = q->max_phys_segments;
261 if (nr_pages > q->max_hw_segments)
262 nr_pages = q->max_hw_segments;
267 static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page
268 *page, unsigned int len, unsigned int offset)
270 int retried_segments = 0;
271 struct bio_vec *bvec;
274 * cloned bio must not modify vec list
276 if (unlikely(bio_flagged(bio, BIO_CLONED)))
279 if (bio->bi_vcnt >= bio->bi_max_vecs)
282 if (((bio->bi_size + len) >> 9) > q->max_sectors)
286 * we might lose a segment or two here, but rather that than
287 * make this too complex.
290 while (bio->bi_phys_segments >= q->max_phys_segments
291 || bio->bi_hw_segments >= q->max_hw_segments
292 || BIOVEC_VIRT_OVERSIZE(bio->bi_size)) {
294 if (retried_segments)
297 retried_segments = 1;
298 blk_recount_segments(q, bio);
302 * setup the new entry, we might clear it again later if we
303 * cannot add the page
305 bvec = &bio->bi_io_vec[bio->bi_vcnt];
306 bvec->bv_page = page;
308 bvec->bv_offset = offset;
311 * if queue has other restrictions (eg varying max sector size
312 * depending on offset), it can specify a merge_bvec_fn in the
313 * queue to get further control
315 if (q->merge_bvec_fn) {
317 * merge_bvec_fn() returns number of bytes it can accept
320 if (q->merge_bvec_fn(q, bio, bvec) < len) {
321 bvec->bv_page = NULL;
328 /* If we may be able to merge these biovecs, force a recount */
329 if (bio->bi_vcnt && (BIOVEC_PHYS_MERGEABLE(bvec-1, bvec) ||
330 BIOVEC_VIRT_MERGEABLE(bvec-1, bvec)))
331 bio->bi_flags &= ~(1 << BIO_SEG_VALID);
334 bio->bi_phys_segments++;
335 bio->bi_hw_segments++;
341 * bio_add_page - attempt to add page to bio
342 * @bio: destination bio
344 * @len: vec entry length
345 * @offset: vec entry offset
347 * Attempt to add a page to the bio_vec maplist. This can fail for a
348 * number of reasons, such as the bio being full or target block
349 * device limitations. The target block device must allow bio's
350 * smaller than PAGE_SIZE, so it is always possible to add a single
351 * page to an empty bio.
353 int bio_add_page(struct bio *bio, struct page *page, unsigned int len,
356 return __bio_add_page(bdev_get_queue(bio->bi_bdev), bio, page,
360 struct bio_map_data {
361 struct bio_vec *iovecs;
362 void __user *userptr;
365 static void bio_set_map_data(struct bio_map_data *bmd, struct bio *bio)
367 memcpy(bmd->iovecs, bio->bi_io_vec, sizeof(struct bio_vec) * bio->bi_vcnt);
368 bio->bi_private = bmd;
371 static void bio_free_map_data(struct bio_map_data *bmd)
377 static struct bio_map_data *bio_alloc_map_data(int nr_segs)
379 struct bio_map_data *bmd = kmalloc(sizeof(*bmd), GFP_KERNEL);
384 bmd->iovecs = kmalloc(sizeof(struct bio_vec) * nr_segs, GFP_KERNEL);
393 * bio_uncopy_user - finish previously mapped bio
394 * @bio: bio being terminated
396 * Free pages allocated from bio_copy_user() and write back data
397 * to user space in case of a read.
399 int bio_uncopy_user(struct bio *bio)
401 struct bio_map_data *bmd = bio->bi_private;
402 const int read = bio_data_dir(bio) == READ;
403 struct bio_vec *bvec;
406 __bio_for_each_segment(bvec, bio, i, 0) {
407 char *addr = page_address(bvec->bv_page);
408 unsigned int len = bmd->iovecs[i].bv_len;
410 if (read && !ret && copy_to_user(bmd->userptr, addr, len))
413 __free_page(bvec->bv_page);
416 bio_free_map_data(bmd);
422 * bio_copy_user - copy user data to bio
423 * @q: destination block queue
424 * @uaddr: start of user address
425 * @len: length in bytes
426 * @write_to_vm: bool indicating writing to pages or not
428 * Prepares and returns a bio for indirect user io, bouncing data
429 * to/from kernel pages as necessary. Must be paired with
430 * call bio_uncopy_user() on io completion.
432 struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr,
433 unsigned int len, int write_to_vm)
435 unsigned long end = (uaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
436 unsigned long start = uaddr >> PAGE_SHIFT;
437 struct bio_map_data *bmd;
438 struct bio_vec *bvec;
443 bmd = bio_alloc_map_data(end - start);
445 return ERR_PTR(-ENOMEM);
447 bmd->userptr = (void __user *) uaddr;
450 bio = bio_alloc(GFP_KERNEL, end - start);
454 bio->bi_rw |= (!write_to_vm << BIO_RW);
458 unsigned int bytes = PAGE_SIZE;
463 page = alloc_page(q->bounce_gfp | GFP_KERNEL);
469 if (__bio_add_page(q, bio, page, bytes, 0) < bytes) {
484 char __user *p = (char __user *) uaddr;
487 * for a write, copy in data to kernel pages
490 bio_for_each_segment(bvec, bio, i) {
491 char *addr = page_address(bvec->bv_page);
493 if (copy_from_user(addr, p, bvec->bv_len))
499 bio_set_map_data(bmd, bio);
502 bio_for_each_segment(bvec, bio, i)
503 __free_page(bvec->bv_page);
507 bio_free_map_data(bmd);
511 static struct bio *__bio_map_user(request_queue_t *q, struct block_device *bdev,
512 unsigned long uaddr, unsigned int len,
515 unsigned long end = (uaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
516 unsigned long start = uaddr >> PAGE_SHIFT;
517 const int nr_pages = end - start;
523 * transfer and buffer must be aligned to at least hardsector
524 * size for now, in the future we can relax this restriction
526 if ((uaddr & queue_dma_alignment(q)) || (len & queue_dma_alignment(q)))
527 return ERR_PTR(-EINVAL);
529 bio = bio_alloc(GFP_KERNEL, nr_pages);
531 return ERR_PTR(-ENOMEM);
534 pages = kmalloc(nr_pages * sizeof(struct page *), GFP_KERNEL);
538 down_read(¤t->mm->mmap_sem);
539 ret = get_user_pages(current, current->mm, uaddr, nr_pages,
540 write_to_vm, 0, pages, NULL);
541 up_read(¤t->mm->mmap_sem);
548 offset = uaddr & ~PAGE_MASK;
549 for (i = 0; i < nr_pages; i++) {
550 unsigned int bytes = PAGE_SIZE - offset;
561 if (__bio_add_page(q, bio, pages[i], bytes, offset) < bytes)
569 * release the pages we didn't map into the bio, if any
572 page_cache_release(pages[i++]);
577 * set data direction, and check if mapped pages need bouncing
580 bio->bi_rw |= (1 << BIO_RW);
582 bio->bi_flags |= (1 << BIO_USER_MAPPED);
591 * bio_map_user - map user address into bio
592 * @bdev: destination block device
593 * @uaddr: start of user address
594 * @len: length in bytes
595 * @write_to_vm: bool indicating writing to pages or not
597 * Map the user space address into a bio suitable for io to a block
598 * device. Returns an error pointer in case of error.
600 struct bio *bio_map_user(request_queue_t *q, struct block_device *bdev,
601 unsigned long uaddr, unsigned int len, int write_to_vm)
605 bio = __bio_map_user(q, bdev, uaddr, len, write_to_vm);
611 * subtle -- if __bio_map_user() ended up bouncing a bio,
612 * it would normally disappear when its bi_end_io is run.
613 * however, we need it for the unmap, so grab an extra
618 if (bio->bi_size == len)
622 * don't support partial mappings
624 bio_endio(bio, bio->bi_size, 0);
626 return ERR_PTR(-EINVAL);
629 static void __bio_unmap_user(struct bio *bio)
631 struct bio_vec *bvec;
635 * make sure we dirty pages we wrote to
637 __bio_for_each_segment(bvec, bio, i, 0) {
638 if (bio_data_dir(bio) == READ)
639 set_page_dirty_lock(bvec->bv_page);
641 page_cache_release(bvec->bv_page);
648 * bio_unmap_user - unmap a bio
649 * @bio: the bio being unmapped
651 * Unmap a bio previously mapped by bio_map_user(). Must be called with
654 * bio_unmap_user() may sleep.
656 void bio_unmap_user(struct bio *bio)
658 __bio_unmap_user(bio);
663 * bio_set_pages_dirty() and bio_check_pages_dirty() are support functions
664 * for performing direct-IO in BIOs.
666 * The problem is that we cannot run set_page_dirty() from interrupt context
667 * because the required locks are not interrupt-safe. So what we can do is to
668 * mark the pages dirty _before_ performing IO. And in interrupt context,
669 * check that the pages are still dirty. If so, fine. If not, redirty them
670 * in process context.
672 * We special-case compound pages here: normally this means reads into hugetlb
673 * pages. The logic in here doesn't really work right for compound pages
674 * because the VM does not uniformly chase down the head page in all cases.
675 * But dirtiness of compound pages is pretty meaningless anyway: the VM doesn't
676 * handle them at all. So we skip compound pages here at an early stage.
678 * Note that this code is very hard to test under normal circumstances because
679 * direct-io pins the pages with get_user_pages(). This makes
680 * is_page_cache_freeable return false, and the VM will not clean the pages.
681 * But other code (eg, pdflush) could clean the pages if they are mapped
684 * Simply disabling the call to bio_set_pages_dirty() is a good way to test the
685 * deferred bio dirtying paths.
689 * bio_set_pages_dirty() will mark all the bio's pages as dirty.
691 void bio_set_pages_dirty(struct bio *bio)
693 struct bio_vec *bvec = bio->bi_io_vec;
696 for (i = 0; i < bio->bi_vcnt; i++) {
697 struct page *page = bvec[i].bv_page;
699 if (page && !PageCompound(page))
700 set_page_dirty_lock(page);
704 static void bio_release_pages(struct bio *bio)
706 struct bio_vec *bvec = bio->bi_io_vec;
709 for (i = 0; i < bio->bi_vcnt; i++) {
710 struct page *page = bvec[i].bv_page;
718 * bio_check_pages_dirty() will check that all the BIO's pages are still dirty.
719 * If they are, then fine. If, however, some pages are clean then they must
720 * have been written out during the direct-IO read. So we take another ref on
721 * the BIO and the offending pages and re-dirty the pages in process context.
723 * It is expected that bio_check_pages_dirty() will wholly own the BIO from
724 * here on. It will run one page_cache_release() against each page and will
725 * run one bio_put() against the BIO.
728 static void bio_dirty_fn(void *data);
730 static DECLARE_WORK(bio_dirty_work, bio_dirty_fn, NULL);
731 static spinlock_t bio_dirty_lock = SPIN_LOCK_UNLOCKED;
732 static struct bio *bio_dirty_list;
735 * This runs in process context
737 static void bio_dirty_fn(void *data)
742 spin_lock_irqsave(&bio_dirty_lock, flags);
743 bio = bio_dirty_list;
744 bio_dirty_list = NULL;
745 spin_unlock_irqrestore(&bio_dirty_lock, flags);
748 struct bio *next = bio->bi_private;
750 bio_set_pages_dirty(bio);
751 bio_release_pages(bio);
757 void bio_check_pages_dirty(struct bio *bio)
759 struct bio_vec *bvec = bio->bi_io_vec;
760 int nr_clean_pages = 0;
763 for (i = 0; i < bio->bi_vcnt; i++) {
764 struct page *page = bvec[i].bv_page;
766 if (PageDirty(page) || PageCompound(page)) {
767 page_cache_release(page);
768 bvec[i].bv_page = NULL;
774 if (nr_clean_pages) {
777 spin_lock_irqsave(&bio_dirty_lock, flags);
778 bio->bi_private = bio_dirty_list;
779 bio_dirty_list = bio;
780 spin_unlock_irqrestore(&bio_dirty_lock, flags);
781 schedule_work(&bio_dirty_work);
788 * bio_endio - end I/O on a bio
790 * @bytes_done: number of bytes completed
791 * @error: error, if any
794 * bio_endio() will end I/O on @bytes_done number of bytes. This may be
795 * just a partial part of the bio, or it may be the whole bio. bio_endio()
796 * is the preferred way to end I/O on a bio, it takes care of decrementing
797 * bi_size and clearing BIO_UPTODATE on error. @error is 0 on success, and
798 * and one of the established -Exxxx (-EIO, for instance) error values in
799 * case something went wrong. Noone should call bi_end_io() directly on
800 * a bio unless they own it and thus know that it has an end_io function.
802 void bio_endio(struct bio *bio, unsigned int bytes_done, int error)
805 clear_bit(BIO_UPTODATE, &bio->bi_flags);
807 if (unlikely(bytes_done > bio->bi_size)) {
808 printk("%s: want %u bytes done, only %u left\n", __FUNCTION__,
809 bytes_done, bio->bi_size);
810 bytes_done = bio->bi_size;
813 bio->bi_size -= bytes_done;
814 bio->bi_sector += (bytes_done >> 9);
817 bio->bi_end_io(bio, bytes_done, error);
820 void bio_pair_release(struct bio_pair *bp)
822 if (atomic_dec_and_test(&bp->cnt)) {
823 struct bio *master = bp->bio1.bi_private;
825 bio_endio(master, master->bi_size, bp->error);
826 mempool_free(bp, bp->bio2.bi_private);
830 static int bio_pair_end_1(struct bio * bi, unsigned int done, int err)
832 struct bio_pair *bp = container_of(bi, struct bio_pair, bio1);
840 bio_pair_release(bp);
844 static int bio_pair_end_2(struct bio * bi, unsigned int done, int err)
846 struct bio_pair *bp = container_of(bi, struct bio_pair, bio2);
854 bio_pair_release(bp);
859 * split a bio - only worry about a bio with a single page
862 struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors)
864 struct bio_pair *bp = mempool_alloc(pool, GFP_NOIO);
869 BUG_ON(bi->bi_vcnt != 1);
870 BUG_ON(bi->bi_idx != 0);
871 atomic_set(&bp->cnt, 3);
875 bp->bio2.bi_sector += first_sectors;
876 bp->bio2.bi_size -= first_sectors << 9;
877 bp->bio1.bi_size = first_sectors << 9;
879 bp->bv1 = bi->bi_io_vec[0];
880 bp->bv2 = bi->bi_io_vec[0];
881 bp->bv2.bv_offset += first_sectors << 9;
882 bp->bv2.bv_len -= first_sectors << 9;
883 bp->bv1.bv_len = first_sectors << 9;
885 bp->bio1.bi_io_vec = &bp->bv1;
886 bp->bio2.bi_io_vec = &bp->bv2;
888 bp->bio1.bi_end_io = bio_pair_end_1;
889 bp->bio2.bi_end_io = bio_pair_end_2;
891 bp->bio1.bi_private = bi;
892 bp->bio2.bi_private = pool;
897 static void *bio_pair_alloc(int gfp_flags, void *data)
899 return kmalloc(sizeof(struct bio_pair), gfp_flags);
902 static void bio_pair_free(void *bp, void *data)
907 static void __init biovec_init_pools(void)
909 int i, size, megabytes, pool_entries = BIO_POOL_SIZE;
910 int scale = BIOVEC_NR_POOLS;
912 megabytes = nr_free_pages() >> (20 - PAGE_SHIFT);
915 * find out where to start scaling
919 else if (megabytes <= 32)
921 else if (megabytes <= 64)
923 else if (megabytes <= 96)
925 else if (megabytes <= 128)
929 * scale number of entries
931 pool_entries = megabytes * 2;
932 if (pool_entries > 256)
935 for (i = 0; i < BIOVEC_NR_POOLS; i++) {
936 struct biovec_pool *bp = bvec_array + i;
938 size = bp->nr_vecs * sizeof(struct bio_vec);
940 bp->slab = kmem_cache_create(bp->name, size, 0,
941 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
946 bp->pool = mempool_create(pool_entries, mempool_alloc_slab,
947 mempool_free_slab, bp->slab);
949 panic("biovec: can't init mempool\n");
953 static int __init init_bio(void)
955 bio_slab = kmem_cache_create("bio", sizeof(struct bio), 0,
956 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
957 bio_pool = mempool_create(BIO_POOL_SIZE, mempool_alloc_slab,
958 mempool_free_slab, bio_slab);
960 panic("bio: can't create mempool\n");
964 bio_split_pool = mempool_create(BIO_SPLIT_ENTRIES,
965 bio_pair_alloc, bio_pair_free, NULL);
967 panic("bio: can't create split pool\n");
972 subsys_initcall(init_bio);
974 EXPORT_SYMBOL(bio_alloc);
975 EXPORT_SYMBOL(bio_put);
976 EXPORT_SYMBOL(bio_endio);
977 EXPORT_SYMBOL(bio_init);
978 EXPORT_SYMBOL(__bio_clone);
979 EXPORT_SYMBOL(bio_clone);
980 EXPORT_SYMBOL(bio_phys_segments);
981 EXPORT_SYMBOL(bio_hw_segments);
982 EXPORT_SYMBOL(bio_add_page);
983 EXPORT_SYMBOL(bio_get_nr_vecs);
984 EXPORT_SYMBOL(bio_map_user);
985 EXPORT_SYMBOL(bio_unmap_user);
986 EXPORT_SYMBOL(bio_pair_release);
987 EXPORT_SYMBOL(bio_split);
988 EXPORT_SYMBOL(bio_split_pool);
989 EXPORT_SYMBOL(bio_copy_user);
990 EXPORT_SYMBOL(bio_uncopy_user);