Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
blk-tag.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/slab.h>
#include "blk.h"

Go to the source code of this file.

Functions

struct requestblk_queue_find_tag (struct request_queue *q, int tag)
 
 EXPORT_SYMBOL (blk_queue_find_tag)
 
void __blk_queue_free_tags (struct request_queue *q)
 
void blk_free_tags (struct blk_queue_tag *bqt)
 
 EXPORT_SYMBOL (blk_free_tags)
 
void blk_queue_free_tags (struct request_queue *q)
 
 EXPORT_SYMBOL (blk_queue_free_tags)
 
struct blk_queue_tag * blk_init_tags (int depth)
 
 EXPORT_SYMBOL (blk_init_tags)
 
int blk_queue_init_tags (struct request_queue *q, int depth, struct blk_queue_tag *tags)
 
 EXPORT_SYMBOL (blk_queue_init_tags)
 
int blk_queue_resize_tags (struct request_queue *q, int new_depth)
 
 EXPORT_SYMBOL (blk_queue_resize_tags)
 
void blk_queue_end_tag (struct request_queue *q, struct request *rq)
 
 EXPORT_SYMBOL (blk_queue_end_tag)
 
int blk_queue_start_tag (struct request_queue *q, struct request *rq)
 
 EXPORT_SYMBOL (blk_queue_start_tag)
 
void blk_queue_invalidate_tags (struct request_queue *q)
 
 EXPORT_SYMBOL (blk_queue_invalidate_tags)
 

Function Documentation

void __blk_queue_free_tags ( struct request_queue q)

__blk_queue_free_tags - release tag maintenance info : the request queue for the device

Notes: blk_cleanup_queue() will take care of calling this function, if tagging has been used. So there's no need to call this directly.

Definition at line 65 of file blk-tag.c.

void blk_free_tags ( struct blk_queue_tag *  bqt)

blk_free_tags - release a given set of tag maintenance info : the tag map to free

For externally managed frees the map. Callers of this function must guarantee to have released all the queues that might have been using this tag map.

Definition at line 86 of file blk-tag.c.

struct blk_queue_tag* blk_init_tags ( int  depth)
read

blk_init_tags - initialize the tag info for an external tag map : the maximum queue depth supported

Definition at line 163 of file blk-tag.c.

void blk_queue_end_tag ( struct request_queue q,
struct request rq 
)

blk_queue_end_tag - end tag operations for a request : the request queue for the device : the request that has completed

Description: Typically called when end_that_request_first() returns %0, meaning all transfers have been done for a request. It's important to call this function before end_that_request_last(), as that will put the request back on the free list thus corrupting the internal tag list.

Notes: queue lock must be held.

Definition at line 280 of file blk-tag.c.

struct request* blk_queue_find_tag ( struct request_queue q,
int  tag 
)
read

blk_queue_find_tag - find a request by its tag and queue : The request queue for the device : The tag of the request

Notes: Should be used when a device returns a tag and you want to match it with a request.

no locks need be held.

Definition at line 23 of file blk-tag.c.

void blk_queue_free_tags ( struct request_queue q)

blk_queue_free_tags - release tag maintenance info : the request queue for the device

Notes: This is used to disable tagged queuing to a device, yet leave queue in function.

Definition at line 101 of file blk-tag.c.

int blk_queue_init_tags ( struct request_queue q,
int  depth,
struct blk_queue_tag *  tags 
)

blk_queue_init_tags - initialize the queue tag info : the request queue for the device : the maximum queue depth supported : the tag to use

Queue lock must be held here if the function is called to resize an existing map.

Definition at line 178 of file blk-tag.c.

void blk_queue_invalidate_tags ( struct request_queue q)

blk_queue_invalidate_tags - invalidate all pending tags : the request queue for the device

Description: Hardware conditions may dictate a need to stop all pending requests. In this case, we will safely clear the block side of the tag queue and readd all requests to the request queue in the right order.

Notes: queue lock must be held.

Definition at line 390 of file blk-tag.c.

int blk_queue_resize_tags ( struct request_queue q,
int  new_depth 
)

blk_queue_resize_tags - change the queueing depth : the request queue for the device : the new max command queueing depth

Notes: Must be called with the queue lock held.

Definition at line 218 of file blk-tag.c.

int blk_queue_start_tag ( struct request_queue q,
struct request rq 
)

blk_queue_start_tag - find a free tag and assign it : the request queue for the device : the block request that needs tagging

Description: This can either be used as a stand-alone helper, or possibly be assigned as the queue &prep_rq_fn (in which case &struct request automagically gets a tag assigned). Note that this function assumes that any type of request can be queued! if this is not true for your device, you must check the request type before calling this function. The request will also be removed from the request queue, so it's the drivers responsibility to readd it if it should need to be restarted for some reason.

Notes: queue lock must be held.

Definition at line 328 of file blk-tag.c.

EXPORT_SYMBOL ( blk_queue_find_tag  )
EXPORT_SYMBOL ( blk_free_tags  )
EXPORT_SYMBOL ( blk_queue_free_tags  )
EXPORT_SYMBOL ( blk_init_tags  )
EXPORT_SYMBOL ( blk_queue_init_tags  )
EXPORT_SYMBOL ( blk_queue_resize_tags  )
EXPORT_SYMBOL ( blk_queue_end_tag  )
EXPORT_SYMBOL ( blk_queue_start_tag  )
EXPORT_SYMBOL ( blk_queue_invalidate_tags  )