Bug #3464
closedzfs synctask code needs restructuring
100%
Description
The locking code around dsl_datasets and dsl_dir's is responsible for several deadlocks and race conditions, most prominently:
a concurrent "zfs list" while running "zfs destroy" can cause the destroy to fail with EBUSY.
bug #3041 deadlock between dp->dp_config_rwlock and ds->ds_opening_lock
To fix this, we must restructure the locking, and change the interface to synctasks.
The wad that will fix this also addresses the following:
improve performance of "zfs recv" by reducing the number of calls to txg_wait_synced()
fix zfs refquota can be violated by "zfs rollback" and "zfs receive" operations
fix ztest fails in ztest_dmu_snapshot_hold due to bad printf string
remove unused zc_top_ds from zfs_cmd_t
fix zdb crashes on pools < SPA_VERSION_DEADLISTS
remove undocumented "zfs hold -t" flag (for temporary hold)
use ASSERT0 / VERIFY0 in more places
new libzfs_core routines: lzc_hold(), lzc_release(), lzc_get_holds() (for user holds)
move some routines from dsl_dataset.c to dsl_destroy.c, dsl_userhold.c
make rrwlock.c work in userland (libzpool.so)
change all synctask consumers to new model
remove ds_recvlock; all receives use "%recv" child to prevent concurrent receives
"zfs destroy" destroys multiple snapshots at once, so it is much faster
Updated by Christopher Siden over 10 years ago
- Assignee changed from Matthew Ahrens to Christopher Siden
- % Done changed from 0 to 100
Updated by Christopher Siden over 10 years ago
- Status changed from In Progress to Closed
commit 3b2aab1 (HEAD, illumos/master, illumos) Author: Matthew Ahrens <mahrens@delphix.com> Date: Thu Feb 28 12:44:05 2013 3464 zfs synctask code needs restructuring Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org>