1 2 3 4 5 6 7 8 9 10 11 | int mpage_readpage(struct page *page, get_block_t get_block) { struct bio *bio = NULL; sector_t last_block_in_bio = 0; bio = do_mpage_readpage(bio, page, 1, &last_block_in_bio, get_block); if (bio) mpage_bio_submit(READ, bio); return 0; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | void generic_make_request(struct bio *bio) { …… do { char b[BDEVNAME_SIZE]; q = bdev_get_queue(bio->bi_bdev); …… block_wait_queue_running(q); /* * If this device has partitions, remap block n * of partition p to block n+start(p) of the disk. */ blk_partition_remap(bio); ret = q->make_request_fn(q, bio); } while (ret); } |
1 2 | q->request_fn = rfn; blk_queue_make_request(q, __make_request); |
1 2 | q->request_fn = rfn; blk_queue_make_request(q, __make_request); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |