Detecting changes when mapping /dev/devstat
Shea Levy
shea at shealevy.com
Sat Dec 31 12:26:33 UTC 2016
Hi all,
What is the appropriate way to detect changes when accessing devstat
info via a mapping of /dev/devstat? I'm interested both in changes to
the device list as a whole and new statistics on a given device.
For new stats on a given device, it seems the only way to detect a new
stat is to check the sequence number for that device. Is that right?
For changes in the device list, it's a bit less clear. My hope was that
I could map space for one more struct devstat than the current numdevs
and just check to see if some field or other is nonzero, but in my
glances through subr_devstat.c I'm not sure if there are any guarantees
about those fields for structures past the current list, especially if a
device was added and removed. Is there anything doable here?
Thanks,
Shea
P.S. I wasn't quite sure which list was appropriate for this question,
please feel free to point me to another!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20161230/1e92434e/attachment.sig>
More information about the freebsd-hackers
mailing list