diff --git a/64-btrfs-zoned.rules b/64-btrfs-zoned.rules new file mode 100644 index 00000000..d70e2274 --- /dev/null +++ b/64-btrfs-zoned.rules @@ -0,0 +1,9 @@ +SUBSYSTEM!="block", GOTO="btrfs_end" +ACTION!="add|change", GOTO="btrfs_end" +ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end" + +# Zoned btrfs needs an IO scheduler that supports zone write locking and +# currently mq-deadline is the only scheduler capable of this. +ATTR{queue/zoned}=="host-managed", ATTR{queue/scheduler}="mq-deadline" + +LABEL="btrfs_end" diff --git a/Makefile b/Makefile index a75d9ad8..1223ba6d 100644 --- a/Makefile +++ b/Makefile @@ -231,7 +231,7 @@ image_objects = image/main.o image/sanitize.o all_objects = $(objects) $(cmds_objects) $(libbtrfs_objects) $(convert_objects) \ $(mkfs_objects) $(image_objects) $(libbtrfsutil_objects) -udev_rules = 64-btrfs-dm.rules +udev_rules = 64-btrfs-dm.rules 64-btrfs-zoned.rules ifeq ("$(origin V)", "command line") BUILD_VERBOSE = $(V)