]> Git Repo - linux.git/commit
block: Introduce elevator features
authorDamien Le Moal <[email protected]>
Thu, 5 Sep 2019 09:51:31 +0000 (18:51 +0900)
committerJens Axboe <[email protected]>
Fri, 6 Sep 2019 01:52:33 +0000 (19:52 -0600)
commit68c43f133a754c7bf5cb1018bb16dc0821cc43a1
tree79d8eba4264de5d90e3f8bedd2329e5802c94b6e
parent954b4a5ce4a806e7c284ce6b2659abdd03d0b6e2
block: Introduce elevator features

Introduce the definition of elevator features through the
elevator_features flags in the elevator_type structure. Each flag can
represent a feature supported by an elevator. The first feature defined
by this patch is support for zoned block device sequential write
constraint with the flag ELEVATOR_F_ZBD_SEQ_WRITE, which is implemented
by the mq-deadline elevator using zone write locking.

Other possible features are IO priorities, write hints, latency targets
or single-LUN dual-actuator disks (for which the elevator could maintain
one LBA ordered list per actuator).

The required_elevator_features field is also added to the request_queue
structure to allow a device driver to specify elevator feature flags
that an elevator must support for the correct operation of the device
(e.g. device drivers for zoned block devices can have the
ELEVATOR_F_ZBD_SEQ_WRITE flag as a required feature).
The helper function blk_queue_required_elevator_features() is
defined for setting this new field.

With these two new fields in place, the elevator functions
elevator_match() and elevator_find() are modified to allow a user to set
only an elevator with a set of features that satisfies the device
required features. Elevators not matching the device requirements are
not shown in the device sysfs queue/scheduler file to prevent their use.

The "none" elevator can always be selected as before.

Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
block/blk-settings.c
block/elevator.c
block/mq-deadline.c
include/linux/blkdev.h
include/linux/elevator.h
This page took 0.06074 seconds and 4 git commands to generate.