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.

block: Move zone related debugfs attribute to blk-zoned.c

block/blk-mq-debugfs-zone.c contains a single debugfs attribute
function. Defining this outside of block/blk-zoned.c does not really
help in any way, so move this zone related debugfs attribute to
block/blk-zoned.c and delete block/blk-mq-debugfs-zone.c.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Hans Holmberg <hans.holmberg@wdc.com>
Tested-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240408014128.205141-25-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Damien Le Moal and committed by
Jens Axboe
d9f1439a bca150f0

+21 -28
-4
block/Kconfig
··· 198 198 Unless you are building a kernel for a tiny system, you should 199 199 say Y here. 200 200 201 - config BLK_DEBUG_FS_ZONED 202 - bool 203 - default BLK_DEBUG_FS && BLK_DEV_ZONED 204 - 205 201 config BLK_SED_OPAL 206 202 bool "Logic for interfacing with Opal enabled SEDs" 207 203 depends on KEYS
-1
block/Makefile
··· 33 33 obj-$(CONFIG_BLK_DEV_ZONED) += blk-zoned.o 34 34 obj-$(CONFIG_BLK_WBT) += blk-wbt.o 35 35 obj-$(CONFIG_BLK_DEBUG_FS) += blk-mq-debugfs.o 36 - obj-$(CONFIG_BLK_DEBUG_FS_ZONED)+= blk-mq-debugfs-zoned.o 37 36 obj-$(CONFIG_BLK_SED_OPAL) += sed-opal.o 38 37 obj-$(CONFIG_BLK_PM) += blk-pm.o 39 38 obj-$(CONFIG_BLK_INLINE_ENCRYPTION) += blk-crypto.o blk-crypto-profile.o \
-22
block/blk-mq-debugfs-zoned.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * Copyright (C) 2017 Western Digital Corporation or its affiliates. 4 - */ 5 - 6 - #include <linux/blkdev.h> 7 - #include "blk-mq-debugfs.h" 8 - 9 - int queue_zone_wlock_show(void *data, struct seq_file *m) 10 - { 11 - struct request_queue *q = data; 12 - unsigned int i; 13 - 14 - if (!q->disk->seq_zones_wlock) 15 - return 0; 16 - 17 - for (i = 0; i < q->disk->nr_zones; i++) 18 - if (test_bit(i, q->disk->seq_zones_wlock)) 19 - seq_printf(m, "%u\n", i); 20 - 21 - return 0; 22 - }
+1 -1
block/blk-mq-debugfs.h
··· 83 83 } 84 84 #endif 85 85 86 - #ifdef CONFIG_BLK_DEBUG_FS_ZONED 86 + #if defined(CONFIG_BLK_DEV_ZONED) && defined(CONFIG_BLK_DEBUG_FS) 87 87 int queue_zone_wlock_show(void *data, struct seq_file *m); 88 88 #else 89 89 static inline int queue_zone_wlock_show(void *data, struct seq_file *m)
+20
block/blk-zoned.c
··· 23 23 24 24 #include "blk.h" 25 25 #include "blk-mq-sched.h" 26 + #include "blk-mq-debugfs.h" 26 27 27 28 #define ZONE_COND_NAME(name) [BLK_ZONE_COND_##name] = #name 28 29 static const char *const zone_cond_name[] = { ··· 1805 1804 return ret; 1806 1805 } 1807 1806 EXPORT_SYMBOL_GPL(blk_revalidate_disk_zones); 1807 + 1808 + #ifdef CONFIG_BLK_DEBUG_FS 1809 + 1810 + int queue_zone_wlock_show(void *data, struct seq_file *m) 1811 + { 1812 + struct request_queue *q = data; 1813 + unsigned int i; 1814 + 1815 + if (!q->disk->seq_zones_wlock) 1816 + return 0; 1817 + 1818 + for (i = 0; i < q->disk->nr_zones; i++) 1819 + if (test_bit(i, q->disk->seq_zones_wlock)) 1820 + seq_printf(m, "%u\n", i); 1821 + 1822 + return 0; 1823 + } 1824 + 1825 + #endif