Re: [PATCH] block: add support for shared tag maps

Randy.Dunlap
2006-08-30T15:27:58Z

On Wed, 30 Aug 2006 09:44:18 -0400 James Bottomley wrote:

> [PATCH] block: add support for shared tag maps
>
> The current block queue implementation already contains most of the
> machinery for shared tag maps. The only remaining pieces are a way to
> allocate and destroy a tag map independently of the queues (so that
> the maps can be managed on the life cycle of the overseeing entity)
>

kernel-doc only: no blank line between the function name
and its parameter(s) list.

> Index: linux-2.6/block/ll_rw_blk.c
> ===================================================================
> --- linux-2.6.orig/block/ll_rw_blk.c
> +++ linux-2.6/block/ll_rw_blk.c
> @@ -848,6 +848,34 @@ struct request *blk_queue_find_tag(reque
> EXPORT_SYMBOL(blk_queue_find_tag);
>
> /**
> + * __blk_free_tags - release a given set of tag maintenance info
> + *

drop

> + * @bqt: the tag map to free
> + *
> + * Tries to free the specified @bqt@. Returns true if it was
> + * actually freed and false if there are still references using it
> + */
> +static int __blk_free_tags(struct blk_queue_tag *bqt)
> +{
> +}
> +
> @@ -862,23 +890,28 @@ static void __blk_queue_free_tags(reques
>
> +
> +/**
> + * blk_free_tags - release a given set of tag maintenance info
> + *

drop

> + * @bqt: the tag map to free
> + *
> + * For externally managed @bqt@ frees the map. Callers of this
> + * function must guarantee to have released all the queues that
> + * might have been using this tag map.
> + */
> +void blk_free_tags(struct blk_queue_tag *bqt)
> +{
> + if (unlikely(!__blk_free_tags(bqt)))
> + BUG();
> +}
> +
> /**
> * blk_queue_free_tags - release tag maintenance info
> * @q: the request queue for the device
> @@ -927,6 +960,38 @@ fail:
> +
> +/**
> + * blk_init_tags - initialize the tag info for an external tag map
> + *

drop

> + * @depth: the maximum queue depth supported
> + * @tags: the tag to use
> + **/
> +struct blk_queue_tag *blk_init_tags(int depth)
> +{
> + return __blk_queue_init_tags(NULL, depth);
> +}
> +EXPORT_SYMBOL(blk_init_tags);

---
~Randy