Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

null_blk: Delete nullb.{queue_depth, nr_queues}

Since commit 8b631f9cf0b8 ("null_blk: remove the bio based I/O path"),
struct nullb members queue_depth and nr_queues are only ever written, so
delete them.

With that, null_exit_hctx() can also be deleted.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20240222083420.6026-1-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

John Garry and committed by
Jens Axboe
0f225f87 40685508

-13
-11
drivers/block/null_blk/main.c
··· 1620 1620 *rqlist = requeue_list; 1621 1621 } 1622 1622 1623 - static void null_exit_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx) 1624 - { 1625 - struct nullb_queue *nq = hctx->driver_data; 1626 - struct nullb *nullb = nq->dev->nullb; 1627 - 1628 - nullb->nr_queues--; 1629 - } 1630 - 1631 1623 static void null_init_queue(struct nullb *nullb, struct nullb_queue *nq) 1632 1624 { 1633 1625 nq->dev = nullb->dev; ··· 1639 1647 nq = &nullb->queues[hctx_idx]; 1640 1648 hctx->driver_data = nq; 1641 1649 null_init_queue(nullb, nq); 1642 - nullb->nr_queues++; 1643 1650 1644 1651 return 0; 1645 1652 } ··· 1651 1660 .poll = null_poll, 1652 1661 .map_queues = null_map_queues, 1653 1662 .init_hctx = null_init_hctx, 1654 - .exit_hctx = null_exit_hctx, 1655 1663 }; 1656 1664 1657 1665 static void null_del_dev(struct nullb *nullb) ··· 1721 1731 if (!nullb->queues) 1722 1732 return -ENOMEM; 1723 1733 1724 - nullb->queue_depth = nullb->dev->hw_queue_depth; 1725 1734 return 0; 1726 1735 } 1727 1736
-2
drivers/block/null_blk/null_blk.h
··· 114 114 struct gendisk *disk; 115 115 struct blk_mq_tag_set *tag_set; 116 116 struct blk_mq_tag_set __tag_set; 117 - unsigned int queue_depth; 118 117 atomic_long_t cur_bytes; 119 118 struct hrtimer bw_timer; 120 119 unsigned long cache_flush_pos; 121 120 spinlock_t lock; 122 121 123 122 struct nullb_queue *queues; 124 - unsigned int nr_queues; 125 123 char disk_name[DISK_NAME_LEN]; 126 124 }; 127 125