to go to the inversion list is incomplete. If the cylinders are equal
block numbers must be checked.
This caused lockups if some buffers with the same cylinder were cycling
through the list, as it may happen with softdep enabled.
Fixes PR #9197.
be issued/completed in order; that is, provide a barrier for I/O queues.
- Change the buffer driver queue links to a TAILQ, rather than using
a home-grown equivalent. Provide BUFQ_*() macros to manipulate buffer
queues; these deal with the barrier provided by B_ORDERED.
- Update disksort() accordingly, and provide 3 versions:
- disksort_cylinder(): historical disksort(), which keys on
b_cylinder (and b_blkno for the case when b_cylinder matches).
- disksort_blkno(): sorts only on b_blkno. Essentially the
same as disksort_cylinder(), but with fewer comparisons.
- disksort_tail(): requests are simply inserted into the queue
at the tail. This is provided as an option so that drivers
can simply have a pointer to the appropriate sort function.
Note that disksort() now pays attention to B_ORDERED.
- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.
- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.
- Several new functions for attaching and detaching disks, and
handling metrics calculation.
Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.
For usage and architectural details, see the forthcoming disk(9) manual
page.