Skip to content

Commit 1aa806a

Browse files
morbidrsakdave
authored andcommitted
btrfs-progs: add udev rule to use mq-deadline on zoned btrfs
As zoned btrfs uses regular writes for metadata, it needs zone write locking in the IO scheduler. Add a udev rule that configures an IO scheduler doing zone write locking. Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent b788f1d commit 1aa806a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

64-btrfs-zoned.rules

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SUBSYSTEM!="block", GOTO="btrfs_end"
2+
ACTION!="add|change", GOTO="btrfs_end"
3+
ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end"
4+
5+
# Zoned btrfs needs an IO scheduler that supports zone write locking and
6+
# currently mq-deadline is the only scheduler capable of this.
7+
ATTR{queue/zoned}=="host-managed", ATTR{queue/scheduler}="mq-deadline"
8+
9+
LABEL="btrfs_end"

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ image_objects = image/main.o image/sanitize.o
231231
all_objects = $(objects) $(cmds_objects) $(libbtrfs_objects) $(convert_objects) \
232232
$(mkfs_objects) $(image_objects) $(libbtrfsutil_objects)
233233

234-
udev_rules = 64-btrfs-dm.rules
234+
udev_rules = 64-btrfs-dm.rules 64-btrfs-zoned.rules
235235

236236
ifeq ("$(origin V)", "command line")
237237
BUILD_VERBOSE = $(V)

0 commit comments

Comments
 (0)