Skip to content

Commit

Permalink
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failu…
Browse files Browse the repository at this point in the history
…re handling

6667208 zfs/zpool commands on failed pool should not hang
6430480 grabbing config lock as writer during I/O load can take excessively long
  • Loading branch information
Jeff Bonwick authored and Jeff Bonwick committed Sep 30, 2008
1 parent d0fa49b commit e14bb32
Show file tree
Hide file tree
Showing 45 changed files with 3,506 additions and 3,775 deletions.
13 changes: 3 additions & 10 deletions usr/src/cmd/mdb/common/modules/zfs/zfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,8 @@ static int
spa_print(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
{
spa_t spa;
char poolname[MAXNAMELEN];
const char *statetab[] = { "ACTIVE", "EXPORTED", "DESTROYED",
"SPARE", "UNINIT", "IOFAILURE", "UNAVAIL" };
"SPARE", "L2CACHE", "UNINIT", "UNAVAIL", "POTENTIAL" };
const char *state;
int config = FALSE;
int vdevs = FALSE;
Expand Down Expand Up @@ -945,18 +944,12 @@ spa_print(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_ERR);
}

if (mdb_readstr(poolname, sizeof (poolname), (uintptr_t)spa.spa_name)
== -1) {
mdb_warn("failed to read pool name at %p", spa.spa_name);
return (DCMD_ERR);
}

if (spa.spa_state < 0 || spa.spa_state > POOL_STATE_UNAVAIL)
state = "UNKNOWN";
else
state = statetab[spa.spa_state];

mdb_printf("%0?p %9s %s\n", addr, state, poolname);
mdb_printf("%0?p %9s %s\n", addr, state, spa.spa_name);

if (config) {
mdb_printf("\n");
Expand Down Expand Up @@ -1935,7 +1928,7 @@ zio_walk_root_step(mdb_walk_state_t *wsp)
if (wsp->walk_data != NULL && wsp->walk_data != zio.io_spa)
return (WALK_NEXT);

if ((uintptr_t)zio.io_root != wsp->walk_addr)
if ((uintptr_t)zio.io_parent != NULL)
return (WALK_NEXT);

return (wsp->walk_callback(wsp->walk_addr, &zio, wsp->walk_cbdata));
Expand Down
Loading

0 comments on commit e14bb32

Please sign in to comment.