]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Restore the CAM XPT peripheral generation counter, and export it via sysctl.
authorwill <will@FreeBSD.org>
Tue, 20 Jan 2015 21:15:33 +0000 (21:15 +0000)
committerwill <will@FreeBSD.org>
Tue, 20 Jan 2015 21:15:33 +0000 (21:15 +0000)
commit4aade7954cad2265f804e1861c3a1e6fc3c0b808
tree3ee158a044f757658b3ec12cef62477958574d96
parentd8a01f771b23abe22fe19259e64e6c9cf443d5d3
Restore the CAM XPT peripheral generation counter, and export it via sysctl.

Define it as an atomic uint32_t.  These increments happen infrequently
enough for the atomic overhead to be a problem, and since they're now
independent atomics, they won't contend with xpt_lock_buses().

This counter is useful as a means of cheaply identifying whether any changes
have been made to the CAM peripheral list.  Userland programs have no guarantee
that the counter won't change on them while being returned or while processing
the information, so they must be written accordingly.

Discussed with: ken, mav (in general)
MFC after: 1 week
Sponsored by: Spectra Logic
sys/cam/cam_xpt.c