Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. struct bio *bio = bio_alloc(GFP_NOIO, 1);
  2. struct page *page = alloc_page(GFP_KERNEL)
  3. struct completion event;
  4. bio->bi_bdev = conf->disks[0].rdev;
  5. bio->bi_sector = (sector_t) 0;
  6. bio_add_page(bio, page, (sizeof(struct nuda_table)) * conf->nbr_chunk, 0);
  7. init_completion(&event);
  8. bio->bi_private = &event;
  9. bio->bi_end_io = readComplete;
  10.  
  11. submit_bio(READ | REQ_SYNC, bio);
  12. wait_for_completion(&event);
  13. bio_put(bio);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement