Re: [PATCH 08/14] blk-mq: add blk_mq_resize_tag_set()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux