diff options
| author | Tim Haley <Tim.Haley@Sun.COM> | 2009-10-30 18:47:17 -0600 |
|---|---|---|
| committer | Tim Haley <Tim.Haley@Sun.COM> | 2009-10-30 18:47:17 -0600 |
| commit | 468c413a79615e77179e8d98f22a7e513a8135bd (patch) | |
| tree | 1b240a69a1bcdf6a38627a29a8cd43adae87f5b3 /usr/src/uts/common/fs/zfs/vdev_label.c | |
| parent | f4f00ee6d3f12bbd07ebfdc3f8d93438792db6f0 (diff) | |
| download | illumos-joyent-468c413a79615e77179e8d98f22a7e513a8135bd.tar.gz | |
PSARC 2009/479 zpool recovery support
6667683 need a way to rollback to an uberblock from a previous txg
6885998 bad ASSERT() in traverse_zil_block()
Diffstat (limited to 'usr/src/uts/common/fs/zfs/vdev_label.c')
| -rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_label.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_label.c b/usr/src/uts/common/fs/zfs/vdev_label.c index 888e5695ac..e8f8e43e02 100644 --- a/usr/src/uts/common/fs/zfs/vdev_label.c +++ b/usr/src/uts/common/fs/zfs/vdev_label.c @@ -779,11 +779,6 @@ retry: */ /* - * For use by zdb and debugging purposes only - */ -uint64_t ub_max_txg = UINT64_MAX; - -/* * Consider the following situation: txg is safely synced to disk. We've * written the first uberblock for txg + 1, and then we lose power. When we * come back up, we fail to see the uberblock for txg + 1 because, say, @@ -812,6 +807,7 @@ vdev_uberblock_compare(uberblock_t *ub1, uberblock_t *ub2) static void vdev_uberblock_load_done(zio_t *zio) { + spa_t *spa = zio->io_spa; zio_t *rio = zio->io_private; uberblock_t *ub = zio->io_data; uberblock_t *ubbest = rio->io_private; @@ -820,7 +816,7 @@ vdev_uberblock_load_done(zio_t *zio) if (zio->io_error == 0 && uberblock_verify(ub) == 0) { mutex_enter(&rio->io_lock); - if (ub->ub_txg <= ub_max_txg && + if (ub->ub_txg <= spa->spa_load_max_txg && vdev_uberblock_compare(ub, ubbest) > 0) *ubbest = *ub; mutex_exit(&rio->io_lock); |
