Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13977:af7f2603d4d7 Illumos ZFS issues: 3603 panic from bpobj_enqueue_subobj() 3604 zdb should print bpobjs more verbosely
This commit is contained in:
parent
0c75791b4c
commit
c433297d86
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor-sys/illumos/dist/; revision=247845
@ -1222,7 +1222,7 @@ dump_bpobj_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_bpobj(bpobj_t *bpo, char *name)
|
dump_bpobj(bpobj_t *bpo, char *name, int indent)
|
||||||
{
|
{
|
||||||
char bytes[32];
|
char bytes[32];
|
||||||
char comp[32];
|
char comp[32];
|
||||||
@ -1232,31 +1232,56 @@ dump_bpobj(bpobj_t *bpo, char *name)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes);
|
zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes);
|
||||||
if (bpo->bpo_havesubobj) {
|
if (bpo->bpo_havesubobj && bpo->bpo_phys->bpo_subobjs != 0) {
|
||||||
zdb_nicenum(bpo->bpo_phys->bpo_comp, comp);
|
zdb_nicenum(bpo->bpo_phys->bpo_comp, comp);
|
||||||
zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp);
|
zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp);
|
||||||
(void) printf("\n %s: %llu local blkptrs, %llu subobjs, "
|
(void) printf(" %*s: object %llu, %llu local blkptrs, "
|
||||||
"%s (%s/%s comp)\n",
|
"%llu subobjs, %s (%s/%s comp)\n",
|
||||||
name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs,
|
indent * 8, name,
|
||||||
|
(u_longlong_t)bpo->bpo_object,
|
||||||
|
(u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs,
|
||||||
(u_longlong_t)bpo->bpo_phys->bpo_num_subobjs,
|
(u_longlong_t)bpo->bpo_phys->bpo_num_subobjs,
|
||||||
bytes, comp, uncomp);
|
bytes, comp, uncomp);
|
||||||
|
|
||||||
|
for (uint64_t i = 0; i < bpo->bpo_phys->bpo_num_subobjs; i++) {
|
||||||
|
uint64_t subobj;
|
||||||
|
bpobj_t subbpo;
|
||||||
|
int error;
|
||||||
|
VERIFY0(dmu_read(bpo->bpo_os,
|
||||||
|
bpo->bpo_phys->bpo_subobjs,
|
||||||
|
i * sizeof (subobj), sizeof (subobj), &subobj, 0));
|
||||||
|
error = bpobj_open(&subbpo, bpo->bpo_os, subobj);
|
||||||
|
if (error != 0) {
|
||||||
|
(void) printf("ERROR %u while trying to open "
|
||||||
|
"subobj id %llu\n",
|
||||||
|
error, (u_longlong_t)subobj);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
dump_bpobj(&subbpo, "subobj", indent + 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
(void) printf("\n %s: %llu blkptrs, %s\n",
|
(void) printf(" %*s: object %llu, %llu blkptrs, %s\n",
|
||||||
name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, bytes);
|
indent * 8, name,
|
||||||
|
(u_longlong_t)bpo->bpo_object,
|
||||||
|
(u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs,
|
||||||
|
bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dump_opt['d'] < 5)
|
if (dump_opt['d'] < 5)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
(void) printf("\n");
|
|
||||||
|
|
||||||
(void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL);
|
if (indent == 0) {
|
||||||
|
(void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL);
|
||||||
|
(void) printf("\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_deadlist(dsl_deadlist_t *dl)
|
dump_deadlist(dsl_deadlist_t *dl)
|
||||||
{
|
{
|
||||||
dsl_deadlist_entry_t *dle;
|
dsl_deadlist_entry_t *dle;
|
||||||
|
uint64_t unused;
|
||||||
char bytes[32];
|
char bytes[32];
|
||||||
char comp[32];
|
char comp[32];
|
||||||
char uncomp[32];
|
char uncomp[32];
|
||||||
@ -1275,14 +1300,24 @@ dump_deadlist(dsl_deadlist_t *dl)
|
|||||||
|
|
||||||
(void) printf("\n");
|
(void) printf("\n");
|
||||||
|
|
||||||
|
/* force the tree to be loaded */
|
||||||
|
dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused);
|
||||||
|
|
||||||
for (dle = avl_first(&dl->dl_tree); dle;
|
for (dle = avl_first(&dl->dl_tree); dle;
|
||||||
dle = AVL_NEXT(&dl->dl_tree, dle)) {
|
dle = AVL_NEXT(&dl->dl_tree, dle)) {
|
||||||
(void) printf(" mintxg %llu -> obj %llu\n",
|
if (dump_opt['d'] >= 5) {
|
||||||
(longlong_t)dle->dle_mintxg,
|
char buf[128];
|
||||||
(longlong_t)dle->dle_bpobj.bpo_object);
|
(void) snprintf(buf, sizeof (buf), "mintxg %llu -> ",
|
||||||
|
(longlong_t)dle->dle_mintxg,
|
||||||
|
(longlong_t)dle->dle_bpobj.bpo_object);
|
||||||
|
|
||||||
if (dump_opt['d'] >= 5)
|
dump_bpobj(&dle->dle_bpobj, buf, 0);
|
||||||
dump_bpobj(&dle->dle_bpobj, "");
|
} else {
|
||||||
|
(void) printf("mintxg %llu -> obj %llu\n",
|
||||||
|
(longlong_t)dle->dle_mintxg,
|
||||||
|
(longlong_t)dle->dle_bpobj.bpo_object);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1305,7 +1340,7 @@ fuid_table_destroy()
|
|||||||
* print uid or gid information.
|
* print uid or gid information.
|
||||||
* For normal POSIX id just the id is printed in decimal format.
|
* For normal POSIX id just the id is printed in decimal format.
|
||||||
* For CIFS files with FUID the fuid is printed in hex followed by
|
* For CIFS files with FUID the fuid is printed in hex followed by
|
||||||
* the doman-rid string.
|
* the domain-rid string.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
print_idstr(uint64_t id, const char *id_type)
|
print_idstr(uint64_t id, const char *id_type)
|
||||||
@ -2598,10 +2633,11 @@ dump_zpool(spa_t *spa)
|
|||||||
if (dump_opt['d'] || dump_opt['i']) {
|
if (dump_opt['d'] || dump_opt['i']) {
|
||||||
dump_dir(dp->dp_meta_objset);
|
dump_dir(dp->dp_meta_objset);
|
||||||
if (dump_opt['d'] >= 3) {
|
if (dump_opt['d'] >= 3) {
|
||||||
dump_bpobj(&spa->spa_deferred_bpobj, "Deferred frees");
|
dump_bpobj(&spa->spa_deferred_bpobj,
|
||||||
|
"Deferred frees", 0);
|
||||||
if (spa_version(spa) >= SPA_VERSION_DEADLISTS) {
|
if (spa_version(spa) >= SPA_VERSION_DEADLISTS) {
|
||||||
dump_bpobj(&spa->spa_dsl_pool->dp_free_bpobj,
|
dump_bpobj(&spa->spa_dsl_pool->dp_free_bpobj,
|
||||||
"Pool snapshot frees");
|
"Pool snapshot frees", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spa_feature_is_active(spa,
|
if (spa_feature_is_active(spa,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/bpobj.h>
|
#include <sys/bpobj.h>
|
||||||
@ -418,6 +418,12 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint64_t subobj, dmu_tx_t *tx)
|
|||||||
|
|
||||||
VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, subsubobjs,
|
VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, subsubobjs,
|
||||||
0, FTAG, &subdb, 0));
|
0, FTAG, &subdb, 0));
|
||||||
|
/*
|
||||||
|
* Make sure that we are not asking dmu_write()
|
||||||
|
* to write more data than we have in our buffer.
|
||||||
|
*/
|
||||||
|
VERIFY3U(subdb->db_size, >=,
|
||||||
|
numsubsub * sizeof (subobj));
|
||||||
dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs,
|
dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs,
|
||||||
bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj),
|
bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj),
|
||||||
numsubsub * sizeof (subobj), subdb->db_data, tx);
|
numsubsub * sizeof (subobj), subdb->db_data, tx);
|
||||||
|
@ -1698,7 +1698,7 @@ dmu_object_info_from_dnode(dnode_t *dn, dmu_object_info_t *doi)
|
|||||||
doi->doi_checksum = dn->dn_checksum;
|
doi->doi_checksum = dn->dn_checksum;
|
||||||
doi->doi_compress = dn->dn_compress;
|
doi->doi_compress = dn->dn_compress;
|
||||||
doi->doi_physical_blocks_512 = (DN_USED_BYTES(dnp) + 256) >> 9;
|
doi->doi_physical_blocks_512 = (DN_USED_BYTES(dnp) + 256) >> 9;
|
||||||
doi->doi_max_offset = (dnp->dn_maxblkid + 1) * dn->dn_datablksz;
|
doi->doi_max_offset = (dn->dn_maxblkid + 1) * dn->dn_datablksz;
|
||||||
doi->doi_fill_count = 0;
|
doi->doi_fill_count = 0;
|
||||||
for (int i = 0; i < dnp->dn_nblkptr; i++)
|
for (int i = 0; i < dnp->dn_nblkptr; i++)
|
||||||
doi->doi_fill_count += dnp->dn_blkptr[i].blk_fill;
|
doi->doi_fill_count += dnp->dn_blkptr[i].blk_fill;
|
||||||
|
Loading…
Reference in New Issue
Block a user