http://defect.opensolaris.org/bz/show_bug.cgi?id=1986


Darren J Moffat <darrenm at opensolaris.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |FIXINPROGRESS




--- Comment #2 from Darren J Moffat <darrenm at opensolaris.org>  2008-05-21 
07:32:46 ---
Lets try again with another fix!

This time I'm going to keep the spa_keystore_remove() call in the same place
but I'll save the spa_t and objid at the start of the function.  I think what
was happening that causes the panic is that they are made invalid by some of
the earlier calls in dsl_dataset_destroy().

--- a/usr/src/uts/common/fs/zfs/dsl_dataset.c   Wed May 21 10:50:34 2008 +0100
+++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c   Wed May 21 13:49:41 2008 +0100
@@ -871,7 +871,8 @@ dsl_dataset_destroy(dsl_dataset_t *ds, v
        dsl_sync_task_group_t *dstg;
        objset_t *os;
        dsl_dir_t *dd;
-       uint64_t obj;
+       uint64_t obj, cryptkeyobj = ds->ds_object;
+       spa_t *spa = dsl_dataset_get_spa(ds);

        if (ds->ds_open_refcount != DS_REF_MAX) {
                if (dsl_dataset_tryupgrade(ds, DS_MODE_PRIMARY,
@@ -959,8 +960,7 @@ dsl_dataset_destroy(dsl_dataset_t *ds, v
        /*
         * Remove the key from the keystore for encrypted datasets.
         */
-       if ((err = spa_keystore_remove(dsl_dataset_get_spa(ds),
-           ds->ds_object)) != 0) {
+       if ((err = spa_keystore_remove(spa, cryptkeyobj)) != 0) {
                return (err);
        }


I can reproduce the panic with the same stack trace without the above fix but
I've succesfully created and destroyed tank/fs 400+ times without seeing this
panic.  So hopefully the fix is correct this time.

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to