Skip to content

Commit 4b92543

Browse files
committed
Merge branch 'for-4.21/block' into for-4.21/aio
* for-4.21/block: (351 commits) blk-mq: enable IO poll if .nr_queues of type poll > 0 blk-mq: change blk_mq_queue_busy() to blk_mq_queue_inflight() blk-mq: skip zero-queue maps in blk_mq_map_swqueue block: fix blk-iolatency accounting underflow blk-mq: fix dispatch from sw queue block: mq-deadline: Fix write completion handling nvme-pci: don't share queue maps blk-mq: only dispatch to non-defauly queue maps if they have queues blk-mq: export hctx->type in debugfs instead of sysfs blk-mq: fix allocation for queue mapping table blk-wbt: export internal state via debugfs blk-mq-debugfs: support rq_qos block: update sysfs documentation block: loop: check error using IS_ERR instead of IS_ERR_OR_NULL in loop_add() aoe: add __exit annotation block: clear REQ_HIPRI if polling is not supported blk-mq: replace and kill blk_mq_request_issue_directly blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests blk-mq: refactor the code of issue request directly block: remove the bio_integrity_advance export ...
2 parents 1a9430d + cd19181 commit 4b92543

File tree

247 files changed

+10454
-14440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+10454
-14440
lines changed

Documentation/ABI/testing/sysfs-block

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Description:
244244

245245
What: /sys/block/<disk>/queue/zoned
246246
Date: September 2016
247-
Contact: Damien Le Moal <damien.lemoal@hgst.com>
247+
Contact: Damien Le Moal <damien.lemoal@wdc.com>
248248
Description:
249249
zoned indicates if the device is a zoned block device
250250
and the zone model of the device if it is indeed zoned.
@@ -259,6 +259,14 @@ Description:
259259
zone commands, they will be treated as regular block
260260
devices and zoned will report "none".
261261

262+
What: /sys/block/<disk>/queue/nr_zones
263+
Date: November 2018
264+
Contact: Damien Le Moal <damien.lemoal@wdc.com>
265+
Description:
266+
nr_zones indicates the total number of zones of a zoned block
267+
device ("host-aware" or "host-managed" zone model). For regular
268+
block devices, the value is always 0.
269+
262270
What: /sys/block/<disk>/queue/chunk_sectors
263271
Date: September 2016
264272
Contact: Hannes Reinecke <hare@suse.com>
@@ -268,6 +276,6 @@ Description:
268276
indicates the size in 512B sectors of the RAID volume
269277
stripe segment. For a zoned block device, either
270278
host-aware or host-managed, chunk_sectors indicates the
271-
size of 512B sectors of the zones of the device, with
279+
size in 512B sectors of the zones of the device, with
272280
the eventual exception of the last zone of the device
273281
which may be smaller.

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,8 +1879,10 @@ following two functions.
18791879

18801880
wbc_init_bio(@wbc, @bio)
18811881
Should be called for each bio carrying writeback data and
1882-
associates the bio with the inode's owner cgroup. Can be
1883-
called anytime between bio allocation and submission.
1882+
associates the bio with the inode's owner cgroup and the
1883+
corresponding request queue. This must be called after
1884+
a queue (device) has been associated with the bio and
1885+
before submission.
18841886

18851887
wbc_account_io(@wbc, @page, @bytes)
18861888
Should be called for each data segment being written out.
@@ -1899,7 +1901,7 @@ the configuration, the bio may be executed at a lower priority and if
18991901
the writeback session is holding shared resources, e.g. a journal
19001902
entry, may lead to priority inversion. There is no one easy solution
19011903
for the problem. Filesystems can try to work around specific problem
1902-
cases by skipping wbc_init_bio() or using bio_associate_blkcg()
1904+
cases by skipping wbc_init_bio() and using bio_associate_blkg()
19031905
directly.
19041906

19051907

Documentation/block/biodoc.txt

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ Description of Contents:
6565
3.2.3 I/O completion
6666
3.2.4 Implications for drivers that do not interpret bios (don't handle
6767
multiple segments)
68-
3.2.5 Request command tagging
6968
3.3 I/O submission
7069
4. The I/O scheduler
7170
5. Scalability related changes
@@ -708,93 +707,6 @@ is crossed on completion of a transfer. (The end*request* functions should
708707
be used if only if the request has come down from block/bio path, not for
709708
direct access requests which only specify rq->buffer without a valid rq->bio)
710709

711-
3.2.5 Generic request command tagging
712-
713-
3.2.5.1 Tag helpers
714-
715-
Block now offers some simple generic functionality to help support command
716-
queueing (typically known as tagged command queueing), ie manage more than
717-
one outstanding command on a queue at any given time.
718-
719-
blk_queue_init_tags(struct request_queue *q, int depth)
720-
721-
Initialize internal command tagging structures for a maximum
722-
depth of 'depth'.
723-
724-
blk_queue_free_tags((struct request_queue *q)
725-
726-
Teardown tag info associated with the queue. This will be done
727-
automatically by block if blk_queue_cleanup() is called on a queue
728-
that is using tagging.
729-
730-
The above are initialization and exit management, the main helpers during
731-
normal operations are:
732-
733-
blk_queue_start_tag(struct request_queue *q, struct request *rq)
734-
735-
Start tagged operation for this request. A free tag number between
736-
0 and 'depth' is assigned to the request (rq->tag holds this number),
737-
and 'rq' is added to the internal tag management. If the maximum depth
738-
for this queue is already achieved (or if the tag wasn't started for
739-
some other reason), 1 is returned. Otherwise 0 is returned.
740-
741-
blk_queue_end_tag(struct request_queue *q, struct request *rq)
742-
743-
End tagged operation on this request. 'rq' is removed from the internal
744-
book keeping structures.
745-
746-
To minimize struct request and queue overhead, the tag helpers utilize some
747-
of the same request members that are used for normal request queue management.
748-
This means that a request cannot both be an active tag and be on the queue
749-
list at the same time. blk_queue_start_tag() will remove the request, but
750-
the driver must remember to call blk_queue_end_tag() before signalling
751-
completion of the request to the block layer. This means ending tag
752-
operations before calling end_that_request_last()! For an example of a user
753-
of these helpers, see the IDE tagged command queueing support.
754-
755-
3.2.5.2 Tag info
756-
757-
Some block functions exist to query current tag status or to go from a
758-
tag number to the associated request. These are, in no particular order:
759-
760-
blk_queue_tagged(q)
761-
762-
Returns 1 if the queue 'q' is using tagging, 0 if not.
763-
764-
blk_queue_tag_request(q, tag)
765-
766-
Returns a pointer to the request associated with tag 'tag'.
767-
768-
blk_queue_tag_depth(q)
769-
770-
Return current queue depth.
771-
772-
blk_queue_tag_queue(q)
773-
774-
Returns 1 if the queue can accept a new queued command, 0 if we are
775-
at the maximum depth already.
776-
777-
blk_queue_rq_tagged(rq)
778-
779-
Returns 1 if the request 'rq' is tagged.
780-
781-
3.2.5.2 Internal structure
782-
783-
Internally, block manages tags in the blk_queue_tag structure:
784-
785-
struct blk_queue_tag {
786-
struct request **tag_index; /* array or pointers to rq */
787-
unsigned long *tag_map; /* bitmap of free tags */
788-
struct list_head busy_list; /* fifo list of busy tags */
789-
int busy; /* queue depth */
790-
int max_depth; /* max queue depth */
791-
};
792-
793-
Most of the above is simple and straight forward, however busy_list may need
794-
a bit of explaining. Normally we don't care too much about request ordering,
795-
but in the event of any barrier requests in the tag queue we need to ensure
796-
that requests are restarted in the order they were queue.
797-
798710
3.3 I/O Submission
799711

800712
The routine submit_bio() is used to submit a single io. Higher level i/o

0 commit comments

Comments
 (0)