Searched refs:bqt (Results 1 - 8 of 8) sorted by relevance
/linux-4.1.27/block/ |
H A D | blk-tag.c | 31 * @bqt: the tag map to free 33 * Drop the reference count on @bqt and frees it when the last reference 36 void blk_free_tags(struct blk_queue_tag *bqt) blk_free_tags() argument 38 if (atomic_dec_and_test(&bqt->refcnt)) { blk_free_tags() 39 BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) < blk_free_tags() 40 bqt->max_depth); blk_free_tags() 42 kfree(bqt->tag_index); blk_free_tags() 43 bqt->tag_index = NULL; blk_free_tags() 45 kfree(bqt->tag_map); blk_free_tags() 46 bqt->tag_map = NULL; blk_free_tags() 48 kfree(bqt); blk_free_tags() 63 struct blk_queue_tag *bqt = q->queue_tags; __blk_queue_free_tags() local 65 if (!bqt) __blk_queue_free_tags() 68 blk_free_tags(bqt); __blk_queue_free_tags() 205 struct blk_queue_tag *bqt = q->queue_tags; blk_queue_resize_tags() local 210 if (!bqt) blk_queue_resize_tags() 219 if (new_depth <= bqt->real_max_depth) { blk_queue_resize_tags() 220 bqt->max_depth = new_depth; blk_queue_resize_tags() 228 if (atomic_read(&bqt->refcnt) != 1) blk_queue_resize_tags() 234 tag_index = bqt->tag_index; blk_queue_resize_tags() 235 tag_map = bqt->tag_map; blk_queue_resize_tags() 236 max_depth = bqt->real_max_depth; blk_queue_resize_tags() 238 if (init_tag_map(q, bqt, new_depth)) blk_queue_resize_tags() 241 memcpy(bqt->tag_index, tag_index, max_depth * sizeof(struct request *)); blk_queue_resize_tags() 243 memcpy(bqt->tag_map, tag_map, nr_ulongs * sizeof(unsigned long)); blk_queue_resize_tags() 267 struct blk_queue_tag *bqt = q->queue_tags; blk_queue_end_tag() local 270 BUG_ON(tag >= bqt->real_max_depth); blk_queue_end_tag() 276 if (unlikely(bqt->tag_index[tag] == NULL)) blk_queue_end_tag() 280 bqt->tag_index[tag] = NULL; blk_queue_end_tag() 282 if (unlikely(!test_bit(tag, bqt->tag_map))) { blk_queue_end_tag() 291 clear_bit_unlock(tag, bqt->tag_map); blk_queue_end_tag() 315 struct blk_queue_tag *bqt = q->queue_tags; blk_queue_start_tag() local 334 max_depth = bqt->max_depth; blk_queue_start_tag() 351 if (bqt->alloc_policy == BLK_TAG_ALLOC_FIFO) { blk_queue_start_tag() 352 tag = find_first_zero_bit(bqt->tag_map, max_depth); blk_queue_start_tag() 356 int start = bqt->next_tag; blk_queue_start_tag() 357 int size = min_t(int, bqt->max_depth, max_depth + start); blk_queue_start_tag() 358 tag = find_next_zero_bit(bqt->tag_map, size, start); blk_queue_start_tag() 359 if (tag >= size && start + size > bqt->max_depth) { blk_queue_start_tag() 360 size = start + size - bqt->max_depth; blk_queue_start_tag() 361 tag = find_first_zero_bit(bqt->tag_map, size); blk_queue_start_tag() 367 } while (test_and_set_bit_lock(tag, bqt->tag_map)); blk_queue_start_tag() 373 bqt->next_tag = (tag + 1) % bqt->max_depth; blk_queue_start_tag() 376 bqt->tag_index[tag] = rq; blk_queue_start_tag()
|
/linux-4.1.27/include/scsi/ |
H A D | scsi_tcq.h | 65 * This saves callers from having to check ->bqt when setting up scsi_init_shared_tag_map() 68 if (!shost->bqt) { scsi_init_shared_tag_map() 69 shost->bqt = blk_init_tags(depth, scsi_init_shared_tag_map() 71 if (!shost->bqt) scsi_init_shared_tag_map() 94 req = blk_map_queue_find_tag(shost->bqt, tag); scsi_host_find_tag()
|
H A D | scsi_host.h | 577 struct blk_queue_tag *bqt; member in union:Scsi_Host::__anon12965
|
/linux-4.1.27/drivers/scsi/fnic/ |
H A D | fnic_scsi.c | 2157 struct blk_queue_tag *bqt = fnic->lport->host->bqt; fnic_scsi_host_start_tag() local 2160 BUG_ON(!bqt); fnic_scsi_host_start_tag() 2161 if (!bqt) { fnic_scsi_host_start_tag() 2167 tag = find_next_zero_bit(bqt->tag_map, bqt->max_depth, 1); fnic_scsi_host_start_tag() 2168 if (tag >= bqt->max_depth) { fnic_scsi_host_start_tag() 2172 } while (test_and_set_bit(tag, bqt->tag_map)); fnic_scsi_host_start_tag() 2174 bqt->tag_index[tag] = sc->request; fnic_scsi_host_start_tag() 2193 struct blk_queue_tag *bqt = fnic->lport->host->bqt; fnic_scsi_host_end_tag() local 2199 BUG_ON(!bqt || !bqt->tag_index[tag]); fnic_scsi_host_end_tag() 2200 if (!bqt) fnic_scsi_host_end_tag() 2203 bqt->tag_index[tag] = NULL; fnic_scsi_host_end_tag() 2204 clear_bit(tag, bqt->tag_map); fnic_scsi_host_end_tag()
|
/linux-4.1.27/drivers/scsi/ |
H A D | hosts.c | 334 if (shost->bqt) scsi_host_dev_release() 335 blk_free_tags(shost->bqt); scsi_host_dev_release()
|
H A D | scsi.c | 676 * Do not resize the tag map if it is a host wide share bqt, scsi_change_queue_depth() 681 if (!shost_use_blk_mq(sdev->host) && !sdev->host->bqt) { scsi_change_queue_depth()
|
H A D | scsi_scan.c | 278 (shost->bqt || shost->hostt->use_blk_tags)) { scsi_alloc_sdev() 280 sdev->host->cmd_per_lun, shost->bqt, scsi_alloc_sdev()
|
/linux-4.1.27/include/linux/ |
H A D | blkdev.h | 1150 static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, blk_map_queue_find_tag() argument 1153 if (unlikely(bqt == NULL || tag >= bqt->real_max_depth)) blk_map_queue_find_tag() 1155 return bqt->tag_index[tag]; blk_map_queue_find_tag()
|
Completed in 278 milliseconds