diff options
author | Christoph Hellwig <hch@lst.de> | 2017-01-27 19:51:45 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-28 01:08:35 +0300 |
commit | 6d247d7f71d1fa4b66a5f4da7b1daa21510d529b (patch) | |
tree | 449921f154b9bd0176453478fdd7a8c6911be5ad /block/blk-sysfs.c | |
parent | 5ea708d15a928f7a479987704203616d3274c03b (diff) | |
download | linux-6d247d7f71d1fa4b66a5f4da7b1daa21510d529b.tar.xz |
block: allow specifying size for extra command data
This mirrors the blk-mq capabilities to allocate extra drivers-specific
data behind struct request by setting a cmd_size field, as well as having
a constructor / destructor for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 1dbce057592d..894f77342fd4 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -814,10 +814,13 @@ static void blk_release_queue(struct kobject *kobj) if (q->queue_tags) __blk_queue_free_tags(q); - if (!q->mq_ops) + if (!q->mq_ops) { + if (q->exit_rq_fn) + q->exit_rq_fn(q, q->fq->flush_rq); blk_free_flush_queue(q->fq); - else + } else { blk_mq_release(q); + } blk_trace_shutdown(q); |