Skip to content

Kernel Compilation Configuration

Several kernel compilation configuration options control zoned block device support features.

ZBD Core Support

The main option controlling the block layer zoned block device support, that is, exposing zoned block devices through a block device file, is CONFIG_BLK_DEV_ZONED. This option is part of the Enable the block layer top menu.

config-zbd
Block layer zoned block device support option with make menuconfig

Without this configuration option set, users will not have access to the ZBD interface and support for zoned block devices will be disabled in all kernel subsystems (I/O schedulers, device mapper and file systems) that include support code for these devices.

Write Ordering Control

Write ordering control is achieved through the deadline (legacy single queue block I/O path) and mq-deadline (multi-queue block I/O path) block I/O scheduler (see Write Ordering Control). deadline and mq-deadline zoned block device support is automatically enabled if the CONFIG_BLK_DEV_ZONED configuration option is set.

Enabling this scheduler is mandatory for zoned block devices. This is controlled with the CONFIG_MQ_IOSCHED_DEADLINE option for mq-deadline and with the CONFIG_IOSCHED_DEADLINE option for deadline. Either option be selected from the IO Schedulers top menu.

config-sched
I/O scheduler configuration with make menuconfig

With the introduction of kernel version 5.0 and the removal of the block layer legacy single queue I/O path, only the mq-deadline scheduler remains. Since kernel version 5.2, the selection of the CONFIG_MQ_IOSCHED_DEADLINE option is automatic when the CONFIG_BLK_DEV_ZONED configuration option is set.

Device Mapper

Zoned block device support for the device mapper subsystem is automatically enabled when the CONFIG_BLK_DEV_ZONED option is set. This will enables support for the dm-linear and dm-flakey targets. However, the dm-zoned device mapper target must be enabled to be usable.

Enabling the dm-zoned target can be done by selecting the CONFIG_DM_ZONED option from the menu Device Drivers → Multiple devices driver support (RAID and LVM) → Device mapper support → Drive-managed zoned block device target support.

config-dm
dm-zoned device mapper target configuration with make menuconfig