freebsd-dev/sys/geom/mirror
Mark Johnston 7f053a44ae gmirror: Zero the metadata block before writing
The mirror metadata fields contain string buffers and pad bytes, neither
were being zeroed before metadata was written to disk.  Also, the
metadata structure is smaller than the sector size, and in one case
gmirror was failing to zero-fill the full buffer before writing.

Fix these problems by pre-zeroing the metadata structure and the sector
buffer.

Reported by:	KMSAN
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2021-07-13 17:45:57 -04:00
..
g_mirror_ctl.c gmirror: Zero the metadata block before writing 2021-07-13 17:45:57 -04:00
g_mirror.c gmirror: Zero the metadata block before writing 2021-07-13 17:45:57 -04:00
g_mirror.h gmirror: Pre-allocate the timeout event structure 2021-03-11 15:45:15 -05:00