]> git.proxmox.com Git - mirror_zfs.git/commit - include/sys/zap_leaf.h
Illumos 5056 - ZFS deadlock on db_mtx and dn_holds
authorJustin T. Gibbs <justing@spectralogic.com>
Thu, 2 Apr 2015 03:44:32 +0000 (14:44 +1100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 28 Apr 2015 23:25:34 +0000 (16:25 -0700)
commit0c66c32d1d8b64a261cceb5f50a9e86777c5d0b2
tree82f5630e8a4e77931e9992db3a7fac1964414716
parentd683ddbb7272a179da3918cc4f922d92a2195ba2
Illumos 5056 - ZFS deadlock on db_mtx and dn_holds

5056 ZFS deadlock on db_mtx and dn_holds
Author: Justin Gibbs <justing@spectralogic.com>
Reviewed by: Will Andrews <willa@spectralogic.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

References:
  https://www.illumos.org/issues/5056
  https://github.com/illumos/illumos-gate/commit/bc9014e

Porting Notes:

sa_handle_get_from_db():
  - the original patch includes an otherwise unmentioned fix for a
    possible usage of an uninitialised variable

dmu_objset_open_impl():
  - Under Illumos list_link_init() is the same as filling a list_node_t
    with NULLs, so they don't notice if they miss doing list_link_init()
    on a zero'd containing structure (e.g. allocated with kmem_zalloc as
    here). Under Linux, not so much: an uninitialised list_node_t goes
    "Boom!" some time later when it's used or destroyed.

dmu_objset_evict_dbufs():
  - reduce stack usage using kmem_alloc()

Ported-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
35 files changed:
include/sys/dbuf.h
include/sys/dmu.h
include/sys/dmu_objset.h
include/sys/dnode.h
include/sys/dsl_dataset.h
include/sys/dsl_dir.h
include/sys/sa.h
include/sys/sa_impl.h
include/sys/spa.h
include/sys/spa_impl.h
include/sys/zap_impl.h
include/sys/zap_leaf.h
module/zfs/dbuf.c
module/zfs/dmu_objset.c
module/zfs/dmu_send.c
module/zfs/dmu_traverse.c
module/zfs/dnode.c
module/zfs/dnode_sync.c
module/zfs/dsl_bookmark.c
module/zfs/dsl_dataset.c
module/zfs/dsl_deadlist.c
module/zfs/dsl_deleg.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/dsl_pool.c
module/zfs/dsl_prop.c
module/zfs/dsl_scan.c
module/zfs/dsl_userhold.c
module/zfs/sa.c
module/zfs/spa.c
module/zfs/spa_misc.c
module/zfs/zap.c
module/zfs/zap_micro.c
module/zfs/zfs_sa.c
module/zfs/zil.c