diff options
author | George Melikov <[email protected]> | 2017-01-27 22:43:42 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-01-27 11:43:42 -0800 |
commit | cc9bb3e58e926d4e056a89046301c1349755957b (patch) | |
tree | 83f205e900b662f13612ce2c66c754c87797ec9a /include | |
parent | 687e612f9a56763d82c78ed75656896ce9cace17 (diff) |
OpenZFS 7254 - ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs
Authored by: Paul Dagnelie <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Prakash Surya <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Steve Gonczi <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Ported-by: George Melikov <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/7254
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c166b69
Closes #5670
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/dmu_objset.h | 9 | ||||
-rw-r--r-- | include/sys/dsl_dataset.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/sys/dmu_objset.h b/include/sys/dmu_objset.h index ed3cbf498..940785a53 100644 --- a/include/sys/dmu_objset.h +++ b/include/sys/dmu_objset.h @@ -20,8 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ @@ -104,9 +104,14 @@ struct objset { zfs_redundant_metadata_type_t os_redundant_metadata; int os_recordsize; + /* + * Pointer is constant; the blkptr it points to is protected by + * os_dsl_dataset->ds_bp_rwlock + */ + blkptr_t *os_rootbp; + /* no lock needed: */ struct dmu_tx *os_synctx; /* XXX sketchy */ - blkptr_t *os_rootbp; zil_header_t os_zil_header; list_t os_synced_dnodes; uint64_t os_flags; diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h index e46bd5f25..fc87cbe86 100644 --- a/include/sys/dsl_dataset.h +++ b/include/sys/dsl_dataset.h @@ -38,6 +38,7 @@ #include <sys/zfs_context.h> #include <sys/dsl_deadlist.h> #include <sys/refcount.h> +#include <sys/rrwlock.h> #include <zfeature_common.h> #ifdef __cplusplus @@ -149,6 +150,7 @@ typedef struct dsl_dataset_phys { typedef struct dsl_dataset { dmu_buf_user_t ds_dbu; + rrwlock_t ds_bp_rwlock; /* Protects ds_phys->ds_bp */ /* Immutable: */ struct dsl_dir *ds_dir; |