Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct bio *bio = bio_alloc(GFP_NOIO, 1);
- struct page *page = alloc_page(GFP_KERNEL)
- struct completion event;
- bio->bi_bdev = conf->disks[0].rdev;
- bio->bi_sector = (sector_t) 0;
- bio_add_page(bio, page, (sizeof(struct nuda_table)) * conf->nbr_chunk, 0);
- init_completion(&event);
- bio->bi_private = &event;
- bio->bi_end_io = readComplete;
- submit_bio(READ | REQ_SYNC, bio);
- wait_for_completion(&event);
- bio_put(bio);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement