summaryrefslogtreecommitdiffstats
path: root/drivers/block/Kconfig
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-08-15 00:04:53 +0200
committerJens Axboe <axboe@kernel.dk>2017-08-23 16:54:02 +0200
commit3bf2bd20734e3e6ffda53719a9c10fb3ee9c5ffa (patch)
treed4c02a55a7175a2b75d910aca85ef4f046746e18 /drivers/block/Kconfig
parentnullb: factor disk parameters (diff)
downloadlinux-3bf2bd20734e3e6ffda53719a9c10fb3ee9c5ffa.tar.xz
linux-3bf2bd20734e3e6ffda53719a9c10fb3ee9c5ffa.zip
nullb: add configfs interface
Add configfs interface for nullb. configfs interface is more flexible and easy to configure in a per-disk basis. Configuration is something like this: mount -t configfs none /mnt Checking which features the driver supports: cat /mnt/nullb/features The 'features' attribute is for future extension. We probably will add new features into the driver, userspace can check this attribute to find the supported features. Create/remove a device: mkdir/rmdir /mnt/nullb/a Then configure the device by setting attributes under /mnt/nullb/a, most of nullb supported module parameters are converted to attributes: size; /* device size in MB */ completion_nsec; /* time in ns to complete a request */ submit_queues; /* number of submission queues */ home_node; /* home node for the device */ queue_mode; /* block interface */ blocksize; /* block size */ irqmode; /* IRQ completion handler */ hw_queue_depth; /* queue depth */ use_lightnvm; /* register as a LightNVM device */ blocking; /* blocking blk-mq device */ use_per_node_hctx; /* use per-node allocation for hardware context */ Note, creating a device doesn't create a disk immediately. Creating a disk is done in two phases: create a device and then power on the device. Next patch will introduce device power on. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh <kkc6196@fb.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/Kconfig')
-rw-r--r--drivers/block/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 8ddc98279c8f..5dd62a8c4d60 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -17,6 +17,7 @@ if BLK_DEV
config BLK_DEV_NULL_BLK
tristate "Null test block driver"
+ depends on CONFIGFS_FS
config BLK_DEV_FD
tristate "Normal floppy disk support"