dm-rq.c (d869f86645fc07dc83b89b68f1a22d91ebe29439) | dm-rq.c (56d18f62f556b80105e38e7975975cf7465aae3e) |
---|---|
1/* 2 * Copyright (C) 2016 Red Hat, Inc. All rights reserved. 3 * 4 * This file is released under the GPL. 5 */ 6 7#include "dm-core.h" 8#include "dm-rq.h" --- 117 unchanged lines hidden (view full) --- 126/* 127 * Don't touch any member of the md after calling this function because 128 * the md may be freed in dm_put() at the end of this function. 129 * Or do dm_get() before calling this function and dm_put() later. 130 */ 131static void rq_completed(struct mapped_device *md) 132{ 133 /* nudge anyone waiting on suspend queue */ | 1/* 2 * Copyright (C) 2016 Red Hat, Inc. All rights reserved. 3 * 4 * This file is released under the GPL. 5 */ 6 7#include "dm-core.h" 8#include "dm-rq.h" --- 117 unchanged lines hidden (view full) --- 126/* 127 * Don't touch any member of the md after calling this function because 128 * the md may be freed in dm_put() at the end of this function. 129 * Or do dm_get() before calling this function and dm_put() later. 130 */ 131static void rq_completed(struct mapped_device *md) 132{ 133 /* nudge anyone waiting on suspend queue */ |
134 if (unlikely(wq_has_sleeper(&md->wait))) | 134 if (unlikely(waitqueue_active(&md->wait))) |
135 wake_up(&md->wait); 136 137 /* 138 * dm_put() must be at the end of this function. See the comment above 139 */ 140 dm_put(md); 141} 142 --- 379 unchanged lines hidden (view full) --- 522 523 md->tag_set = kzalloc_node(sizeof(struct blk_mq_tag_set), GFP_KERNEL, md->numa_node_id); 524 if (!md->tag_set) 525 return -ENOMEM; 526 527 md->tag_set->ops = &dm_mq_ops; 528 md->tag_set->queue_depth = dm_get_blk_mq_queue_depth(); 529 md->tag_set->numa_node = md->numa_node_id; | 135 wake_up(&md->wait); 136 137 /* 138 * dm_put() must be at the end of this function. See the comment above 139 */ 140 dm_put(md); 141} 142 --- 379 unchanged lines hidden (view full) --- 522 523 md->tag_set = kzalloc_node(sizeof(struct blk_mq_tag_set), GFP_KERNEL, md->numa_node_id); 524 if (!md->tag_set) 525 return -ENOMEM; 526 527 md->tag_set->ops = &dm_mq_ops; 528 md->tag_set->queue_depth = dm_get_blk_mq_queue_depth(); 529 md->tag_set->numa_node = md->numa_node_id; |
530 md->tag_set->flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_SG_MERGE; | 530 md->tag_set->flags = BLK_MQ_F_SHOULD_MERGE; |
531 md->tag_set->nr_hw_queues = dm_get_blk_mq_nr_hw_queues(); 532 md->tag_set->driver_data = md; 533 534 md->tag_set->cmd_size = sizeof(struct dm_rq_target_io); 535 immutable_tgt = dm_table_get_immutable_target(t); 536 if (immutable_tgt && immutable_tgt->per_io_data_size) { 537 /* any target-specific per-io data is immediately after the tio */ 538 md->tag_set->cmd_size += immutable_tgt->per_io_data_size; --- 44 unchanged lines hidden --- | 531 md->tag_set->nr_hw_queues = dm_get_blk_mq_nr_hw_queues(); 532 md->tag_set->driver_data = md; 533 534 md->tag_set->cmd_size = sizeof(struct dm_rq_target_io); 535 immutable_tgt = dm_table_get_immutable_target(t); 536 if (immutable_tgt && immutable_tgt->per_io_data_size) { 537 /* any target-specific per-io data is immediately after the tio */ 538 md->tag_set->cmd_size += immutable_tgt->per_io_data_size; --- 44 unchanged lines hidden --- |