Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 2016 21:58:49 -0500
From:      Shea Levy <shea@shealevy.com>
To:        freebsd-hackers@freebsd.org
Subject:   Detecting changes when mapping /dev/devstat
Message-ID:  <87r34o3ity.fsf@shlevy-laptop.i-did-not-set--mail-host-address--so-tickle-me>

next in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain

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!

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE6ESKvwKkwnxgMLnaXAvWlX2G/icFAlhnHukACgkQXAvWlX2G
/icRQw//QqWGAy+nTglYUMMP1H9/JD+UHlFj3bbewU+yGELA/boVHauAqT53VmiE
qbYr0W+d7lc0NgkUSVJzTOZfcxMKFqAuGZu3B/u3FVf1fif7VqBu80egqYmt2AaG
FKrRfOUA/y6MJq0SRfNUCLeia7BIbaUMLOiqzWcmRZH7p0Tl9V4ZzhKq6sADWKEg
6BOKN9DN2U4v/4ZYtom9jZwKpecf/Vzp4rdCeweAi1cVuTlHul7QFk36lBKQJhhb
+5zrFsiJfmVpxnZgHM9gXLlGotm+EB70tBzvKcUFe27MZx3L6gZOiz3zUpXsWm88
RZWX5F3p+A6TxhxcROnvsbKTCots/2vZYzhfufYhsyF12Kr2om9c4T+W201il1gv
d9HNpjMjBHM0oHLAHEo3GVVlkWVHu4RdxJ08tTlMGlrmfdXhks/nbOk/1jk3QfNJ
pLs+CvihnO7iYGzF4Llyp+sCpJJRh1GH53fs71260qJidtVgSjKXbMQsI4upoqLr
fhorfPHvxiG0flOXOH3ngJMMgLuNOtMsIXIKP59ypj6f5kLEe+cDAY9JDNFjrnRv
D4H5pZx3rQtMdMrdsnU8Xk+lmxu+/GwXn57TXzb1orxGpA5sJBtPDeanq7UJqEoc
VhN6E53YC5epiCiKbL0/yzePOUf5WYgiFEU7PmBRYxDyuvBOXTc=
=OEO6
-----END PGP SIGNATURE-----
--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87r34o3ity.fsf>