null_blk: Move driver into its own directory
[ Upstream commit eebf34a85c8c724676eba502d15202854f199b05 ] Move null_blk driver code into the new sub-directory drivers/block/null_blk. Suggested-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Stable-dep-of: 63f886597085 ("block: null_blk: Fix handling of fake timeout request") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
d5e61a859a
commit
d14d2574a5
@@ -16,13 +16,7 @@ menuconfig BLK_DEV
|
|||||||
|
|
||||||
if BLK_DEV
|
if BLK_DEV
|
||||||
|
|
||||||
config BLK_DEV_NULL_BLK
|
source "drivers/block/null_blk/Kconfig"
|
||||||
tristate "Null test block driver"
|
|
||||||
select CONFIGFS_FS
|
|
||||||
|
|
||||||
config BLK_DEV_NULL_BLK_FAULT_INJECTION
|
|
||||||
bool "Support fault injection for Null test block driver"
|
|
||||||
depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
|
|
||||||
|
|
||||||
config BLK_DEV_FD
|
config BLK_DEV_FD
|
||||||
tristate "Normal floppy disk support"
|
tristate "Normal floppy disk support"
|
||||||
|
@@ -41,12 +41,7 @@ obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/
|
|||||||
obj-$(CONFIG_ZRAM) += zram/
|
obj-$(CONFIG_ZRAM) += zram/
|
||||||
obj-$(CONFIG_BLK_DEV_RNBD) += rnbd/
|
obj-$(CONFIG_BLK_DEV_RNBD) += rnbd/
|
||||||
|
|
||||||
obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk.o
|
obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk/
|
||||||
null_blk-objs := null_blk_main.o
|
|
||||||
ifeq ($(CONFIG_BLK_DEV_ZONED), y)
|
|
||||||
null_blk-$(CONFIG_TRACING) += null_blk_trace.o
|
|
||||||
endif
|
|
||||||
null_blk-$(CONFIG_BLK_DEV_ZONED) += null_blk_zoned.o
|
|
||||||
|
|
||||||
skd-y := skd_main.o
|
skd-y := skd_main.o
|
||||||
swim_mod-y := swim.o swim_asm.o
|
swim_mod-y := swim.o swim_asm.o
|
||||||
|
12
drivers/block/null_blk/Kconfig
Normal file
12
drivers/block/null_blk/Kconfig
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
#
|
||||||
|
# Null block device driver configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
config BLK_DEV_NULL_BLK
|
||||||
|
tristate "Null test block driver"
|
||||||
|
select CONFIGFS_FS
|
||||||
|
|
||||||
|
config BLK_DEV_NULL_BLK_FAULT_INJECTION
|
||||||
|
bool "Support fault injection for Null test block driver"
|
||||||
|
depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
|
11
drivers/block/null_blk/Makefile
Normal file
11
drivers/block/null_blk/Makefile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
# needed for trace events
|
||||||
|
ccflags-y += -I$(src)
|
||||||
|
|
||||||
|
obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk.o
|
||||||
|
null_blk-objs := main.o
|
||||||
|
ifeq ($(CONFIG_BLK_DEV_ZONED), y)
|
||||||
|
null_blk-$(CONFIG_TRACING) += trace.o
|
||||||
|
endif
|
||||||
|
null_blk-$(CONFIG_BLK_DEV_ZONED) += zoned.o
|
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2020 Western Digital Corporation or its affiliates.
|
* Copyright (C) 2020 Western Digital Corporation or its affiliates.
|
||||||
*/
|
*/
|
||||||
#include "null_blk_trace.h"
|
#include "trace.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper to use for all null_blk traces to extract disk name.
|
* Helper to use for all null_blk traces to extract disk name.
|
@@ -73,7 +73,7 @@ TRACE_EVENT(nullb_report_zones,
|
|||||||
#undef TRACE_INCLUDE_PATH
|
#undef TRACE_INCLUDE_PATH
|
||||||
#define TRACE_INCLUDE_PATH .
|
#define TRACE_INCLUDE_PATH .
|
||||||
#undef TRACE_INCLUDE_FILE
|
#undef TRACE_INCLUDE_FILE
|
||||||
#define TRACE_INCLUDE_FILE null_blk_trace
|
#define TRACE_INCLUDE_FILE trace
|
||||||
|
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
#include <trace/define_trace.h>
|
#include <trace/define_trace.h>
|
@@ -4,7 +4,7 @@
|
|||||||
#include "null_blk.h"
|
#include "null_blk.h"
|
||||||
|
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include "null_blk_trace.h"
|
#include "trace.h"
|
||||||
|
|
||||||
#define MB_TO_SECTS(mb) (((sector_t)mb * SZ_1M) >> SECTOR_SHIFT)
|
#define MB_TO_SECTS(mb) (((sector_t)mb * SZ_1M) >> SECTOR_SHIFT)
|
||||||
|
|
Reference in New Issue
Block a user