On 06/02/2016 07:39 AM, Hannes Reinecke wrote:
+int blk_mq_resize_tag_set(struct blk_mq_tag_set *set, int new_tags)
+{
+ int i, ret = 0;
+
+ for (i = 0; i < set->nr_hw_queues; i++) {
+ if (!set->tags[i])
+ continue;
+ ret = blk_mq_tag_update_depth(set->tags[i], new_tags);
+ if (ret)
+ break;
+ }
+ return ret;
+}
+EXPORT_SYMBOL(blk_mq_resize_tag_set);
(+Jens)
This code does not change the size of the bitmaps allocated by
bt_alloc() so I think the word "resize" in the function name is
misleading. How about using the name blk_mq_update_depth()? Have you
considered a more clear name for the "new_tags" argument, e.g. tdepth?
Please document that this argument represents the sum of the regular and
reserved tags. Additionally, I don't think it is safe to call this
function while I/O is in progress. Please either add code to stop and
restart I/O inside this function or document this clearly.
Thanks,
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html