title: wait_for_completion for submit_bio in make_request not returning
body: <p>I am writing a custom block driver in the Linux kernel and in my make_request routine, on writes I need to read the data of the bio's specified sector (from the physical drive) prior to writing the new data. My excerpt below showcases most of what I am trying to accomplish but for whatever reason, I never get a return from the wait_for_completion. Once I/O is executed to the block device. It hangs after the submit_bio and never continues. Every 120 seconds I get a stack dump and message saying how the task is blocked. Any ideas? Thoughts?</p>
  
  <pre><code>... in make_request ....
  
  if(rw != READ){
      struct completion event;
      struct bio *biow = bio_alloc(GFP_NOIO, bio_segments(bio));
      biow-&gt;bi_bdev = bio-&gt;bi_bdev;
      biow-&gt;bi_sector = bio-&gt;sector;
      biow-&gt;bi_rw = READ_SYNC;
      biow-&gt;bi_vcnt = bio_segments(bio);
      biow-&gt;bi_size = bio-&gt;bi_size;
      init_completion(&amp;event);
      biow-&gt;bi_private = &amp;event;
      biow-&gt;bi_end_io = bi_complete;
      submit_bio(READ_SYNC, biow);
      wait_for_completion(&amp;event);
      .... some more magic occurs here ....
  }
  generic_make_request(bio);
  </code></pre>
  
  <hr>