mirror_zfs/module
Brian Behlendorf 2c6d0b1e07 Add zio constructor/destructor
Add a standard zio constructor and destructor.  Normally, this is
done to reduce to cost of allocating a new structure by reducing
expensive operations such as memory allocations.  However, in this
case none of the operations moved out of zio_create() were really
very expensive.

This change was principly made as a debug patch (and workaround)
for a zio_destroy() race.  The is good evidence that zio_create()
is reinitializing a mutex which is really still in use by another
thread.  This would completely explain the observed symptoms in
the issue report.

This patch doesn't fix the root cause of the race, but it should
make it less likely by only initializing the mutex once in the
constructor.  Also, this particular flaw might have gone unnoticed
in other zfs implementations due to the specific implementation
details of Linux ticket spinlocks.

Once the real root cause is determined and resolved this change
can be safely reverted.  Until then this should help workaround
the issue.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #496
2012-03-07 16:06:23 -08:00
..
avl Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
nvpair Implement SA based xattrs 2011-11-28 15:45:51 -08:00
unicode Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zcommon Support ashift=13 for 8KB SSD block sizes 2012-02-13 12:25:27 -08:00
zfs Add zio constructor/destructor 2012-03-07 16:06:23 -08:00
zpios Linux 2.6.36 compat, use fops->unlocked_ioctl() 2010-11-10 17:01:08 -08:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.in Fix 'make install' overly broad 'rm' 2011-07-20 09:38:51 -07:00