freebsd-nq/sys/cddl
Steven Hartland 78ad0c1c80 Improve TXG handling in the TRIM module.
This patch adds some improvements to the way the trim module considers
TXGs:

 - Free ZIOs are registered with the TXG from the ZIO itself, not the
   current SPA syncing TXG (which may be out of date);
 - L2ARC are registered with a zero TXG number, as L2ARC has no concept
   of TXGs;
 - The TXG limit for issuing TRIMs is now computed from the last synced
   TXG, not the currently syncing TXG. Indeed, under extremely unlikely
   race conditions, there is a risk we could trim blocks which have been
   freed in a TXG that has not finished syncing, resulting in potential
   data corruption in case of a crash.

Reviewed by:	pjd (mentor)
Approved by:	pjd (mentor)
Obtained from:	5b46ad40d9
MFC after:	2 weeks
2013-03-21 10:16:10 +00:00
..
boot/zfs MFV r245512: 2013-02-09 06:39:28 +00:00
compat/opensolaris MFC @248493 2013-03-19 11:09:15 +00:00
contrib/opensolaris Improve TXG handling in the TRIM module. 2013-03-21 10:16:10 +00:00
dev Add FBT for PowerPC DTrace. Also, clean up the DTrace assembly code, 2013-03-18 05:30:18 +00:00