block: Make blk_cleanup_queue() wait until request_fn finished
[linux-2.6-block.git] / include / linux / blkdev.h
index 8bc46c250ca4c7500d7664e9e64cbbd94d2a07ea..c9d233e727f27286555c68085318892654202295 100644 (file)
@@ -378,6 +378,12 @@ struct request_queue {
 
        unsigned int            nr_sorted;
        unsigned int            in_flight[2];
+       /*
+        * Number of active block driver functions for which blk_drain_queue()
+        * must wait. Must be incremented around functions that unlock the
+        * queue_lock internally, e.g. scsi_request_fn().
+        */
+       unsigned int            request_fn_active;
 
        unsigned int            rq_timeout;
        struct timer_list       timeout;