Queue creation and deletion
request_queue_t *blk_init_queue(request_fn_proc *request, spinlock_t *lock);
The arguments are, of course, the request function for this queue and a spinlock that controls access to the queue.
This function allocates memory (quite a bit of memory, actually) and can fail because of this; you should
always check the return value before attempting to use the queue.
As part of the initialization of a request queue, you can set the field queuedata
(which is a void * pointer) to any value you like. This field is the request
queue's equivalent to the private_data we have seen in other structures.
To return a request queue to the system (at module unload time, generally), call blk_cleanup_queue :
void blk_cleanup_queue(request_queue_t *);
After this call, your driver sees no more requests from the given
queue and should not reference it again.