diff options
author | luigi <luigi@FreeBSD.org> | 2009-02-13 11:36:32 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2009-02-13 11:36:32 +0000 |
commit | 8faaf7bcde3cc3e6cf37c37c3652dd5196e47521 (patch) | |
tree | df791133eef4aebd113363e81de096bf1b08c891 /sys/compat/linux/linux_file.c | |
parent | 58c99591c6bd3cd69de7784bd479ef26d45dc334 (diff) | |
download | FreeBSD-src-8faaf7bcde3cc3e6cf37c37c3652dd5196e47521.zip FreeBSD-src-8faaf7bcde3cc3e6cf37c37c3652dd5196e47521.tar.gz |
Clarify and reimplement the bioq API so that bioq_disksort() has
the correct behaviour (sorting by distance from the current head position
in the scan direction) and bioq_insert_head() and bioq_insert_tail()
have a well defined (and useful) behaviour, especially when intermixed
with calls to bioq_disksort().
In particular:
- fix a bug in the existing bioq_disksort() that did not use the
current head position correctly;
- redefine semantics of bioq_insert_head() and bioq_insert_tail().
bioq_insert_tail() can now be used as a barrier
between previous and subsequent calls to bioq_disksort().
The code is heavily documented in the source code so please refer
to that for the details.
Much of this code comes from Fabio Checconi. Also thanks to Kirk
for feedback on the (re)definition of bioq_insert_tail().
NOTE: in the current tree there is only a handful of files which
intermix calls to bioq_disksort() with bioq_insert_head() and
bioq_insert_tail(). The ordering of the queue in these situation
was not specified (nor easy to figure out) before, so I doubt any
of that code could be affected by the specification of the API.
Also note that the current implementation is significantly simpler
than the previous one (also used in ata_sort_queue()).
It would be useful to reimplement ata_sort_queue() using
the same code used in bioq_disksort().
MFC after: 1 week
Diffstat (limited to 'sys/compat/linux/linux_file.c')
0 files changed, 0 insertions, 0 deletions