aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/block/biodoc.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/block/biodoc.txt')
-rw-r--r--Documentation/block/biodoc.txt20
1 files changed, 10 insertions, 10 deletions
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 8af392fc6ef0..dc3f49e3e539 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -477,9 +477,9 @@ With this multipage bio design:
477 the same bi_io_vec array, but with the index and size accordingly modified) 477 the same bi_io_vec array, but with the index and size accordingly modified)
478- A linked list of bios is used as before for unrelated merges (*) - this 478- A linked list of bios is used as before for unrelated merges (*) - this
479 avoids reallocs and makes independent completions easier to handle. 479 avoids reallocs and makes independent completions easier to handle.
480- Code that traverses the req list needs to make a distinction between 480- Code that traverses the req list can find all the segments of a bio
481 segments of a request (bio_for_each_segment) and the distinct completion 481 by using rq_for_each_segment. This handles the fact that a request
482 units/bios (rq_for_each_bio). 482 has multiple bios, each of which can have multiple segments.
483- Drivers which can't process a large bio in one shot can use the bi_idx 483- Drivers which can't process a large bio in one shot can use the bi_idx
484 field to keep track of the next bio_vec entry to process. 484 field to keep track of the next bio_vec entry to process.
485 (e.g a 1MB bio_vec needs to be handled in max 128kB chunks for IDE) 485 (e.g a 1MB bio_vec needs to be handled in max 128kB chunks for IDE)
@@ -664,14 +664,14 @@ in lvm or md.
664 664
6653.2.1 Traversing segments and completion units in a request 6653.2.1 Traversing segments and completion units in a request
666 666
667The macros bio_for_each_segment() and rq_for_each_bio() should be used for 667The macro rq_for_each_segment() should be used for traversing the bios
668traversing the bios in the request list (drivers should avoid directly 668in the request list (drivers should avoid directly trying to do it
669trying to do it themselves). Using these helpers should also make it easier 669themselves). Using these helpers should also make it easier to cope
670to cope with block changes in the future. 670with block changes in the future.
671 671
672 rq_for_each_bio(bio, rq) 672 struct req_iterator iter;
673 bio_for_each_segment(bio_vec, bio, i) 673 rq_for_each_segment(bio_vec, rq, iter)
674 /* bio_vec is now current segment */ 674 /* bio_vec is now current segment */
675 675
676I/O completion callbacks are per-bio rather than per-segment, so drivers 676I/O completion callbacks are per-bio rather than per-segment, so drivers
677that traverse bio chains on completion need to keep that in mind. Drivers 677that traverse bio chains on completion need to keep that in mind. Drivers