]> granicus.if.org Git - zfs/commit
OpenZFS 8126 - ztest assertion failed in dbuf_dirty due to dn_nlevels changing
authorMatthew Ahrens <mahrens@delphix.com>
Mon, 20 Mar 2017 22:38:11 +0000 (15:38 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 7 Jul 2017 21:58:33 +0000 (14:58 -0700)
commit2ade4a99f0b995df6fb45138d04a0209b959ef63
tree78a602f093a77bb6c8d5421b2da482e5db7b05f8
parenta896468c7872dc7277fd0171c65bd2c185bfcaab
OpenZFS 8126 - ztest assertion failed in dbuf_dirty due to dn_nlevels changing

The sync thread is concurrently modifying dn_phys->dn_nlevels
while dbuf_dirty() is trying to assert something about it, without
holding the necessary lock. We need to move this assertion further down
in the function, after we have acquired the dn_struct_rwlock.

Authored by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/8126
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/0ef125d
Closes #6314
module/zfs/dbuf.c