On 5/27/20 8:06 PM, Christoph Hellwig wrote:
From: Ming Lei <ming.lei@xxxxxxxxxx> Add a new blk_mq_all_tag_iter function to iterate over all allocated scheduler tags and driver tags. This is more flexible than the existing blk_mq_all_tag_busy_iter function as it allows the callers to do whatever they want on allocated request instead of being limited to started requests. It will be used to implement draining allocated requests on specified hctx in this patchset. Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> [hch: switch from the two booleans to a more readable flags field and consolidate the tags iter functions] Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- block/blk-mq-tag.c | 46 +++++++++++++++++++++++++++++----------------- block/blk-mq-tag.h | 2 ++ 2 files changed, 31 insertions(+), 17 deletions(-)
Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer