Deleted Added
full compact
zdb.c (332550) zdb.c (339034)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 2267 unchanged lines hidden (view full) ---

2276 }
2277
2278 object = 0;
2279 while ((error = dmu_object_next(os, &object, B_FALSE, 0)) == 0) {
2280 dump_object(os, object, verbosity, &print_header);
2281 object_count++;
2282 }
2283
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 2267 unchanged lines hidden (view full) ---

2276 }
2277
2278 object = 0;
2279 while ((error = dmu_object_next(os, &object, B_FALSE, 0)) == 0) {
2280 dump_object(os, object, verbosity, &print_header);
2281 object_count++;
2282 }
2283
2284 ASSERT3U(object_count, ==, usedobjs);
2285
2286 (void) printf("\n");
2287
2288 if (error != ESRCH) {
2289 (void) fprintf(stderr, "dmu_object_next() = %d\n", error);
2290 abort();
2291 }
2284 (void) printf("\n");
2285
2286 if (error != ESRCH) {
2287 (void) fprintf(stderr, "dmu_object_next() = %d\n", error);
2288 abort();
2289 }
2290
2291 ASSERT3U(object_count, ==, usedobjs);
2292}
2293
2294static void
2295dump_uberblock(uberblock_t *ub, const char *header, const char *footer)
2296{
2297 time_t timestamp = ub->ub_timestamp;
2298
2299 (void) printf("%s", header ? header : "");

--- 483 unchanged lines hidden (view full) ---

2783 int ioerr = zio->io_error;
2784 zdb_cb_t *zcb = zio->io_private;
2785 zbookmark_phys_t *zb = &zio->io_bookmark;
2786
2787 abd_free(zio->io_abd);
2788
2789 mutex_enter(&spa->spa_scrub_lock);
2790 spa->spa_scrub_inflight--;
2292}
2293
2294static void
2295dump_uberblock(uberblock_t *ub, const char *header, const char *footer)
2296{
2297 time_t timestamp = ub->ub_timestamp;
2298
2299 (void) printf("%s", header ? header : "");

--- 483 unchanged lines hidden (view full) ---

2783 int ioerr = zio->io_error;
2784 zdb_cb_t *zcb = zio->io_private;
2785 zbookmark_phys_t *zb = &zio->io_bookmark;
2786
2787 abd_free(zio->io_abd);
2788
2789 mutex_enter(&spa->spa_scrub_lock);
2790 spa->spa_scrub_inflight--;
2791 spa->spa_load_verify_ios--;
2791 cv_broadcast(&spa->spa_scrub_io_cv);
2792
2793 if (ioerr && !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) {
2794 char blkbuf[BP_SPRINTF_LEN];
2795
2796 zcb->zcb_haderrors = 1;
2797 zcb->zcb_errors[ioerr]++;
2798

--- 55 unchanged lines hidden (view full) ---

2854 abd_t *abd = abd_alloc(size, B_FALSE);
2855 int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW;
2856
2857 /* If it's an intent log block, failure is expected. */
2858 if (zb->zb_level == ZB_ZIL_LEVEL)
2859 flags |= ZIO_FLAG_SPECULATIVE;
2860
2861 mutex_enter(&spa->spa_scrub_lock);
2792 cv_broadcast(&spa->spa_scrub_io_cv);
2793
2794 if (ioerr && !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) {
2795 char blkbuf[BP_SPRINTF_LEN];
2796
2797 zcb->zcb_haderrors = 1;
2798 zcb->zcb_errors[ioerr]++;
2799

--- 55 unchanged lines hidden (view full) ---

2855 abd_t *abd = abd_alloc(size, B_FALSE);
2856 int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW;
2857
2858 /* If it's an intent log block, failure is expected. */
2859 if (zb->zb_level == ZB_ZIL_LEVEL)
2860 flags |= ZIO_FLAG_SPECULATIVE;
2861
2862 mutex_enter(&spa->spa_scrub_lock);
2862 while (spa->spa_scrub_inflight > max_inflight)
2863 while (spa->spa_load_verify_ios > max_inflight)
2863 cv_wait(&spa->spa_scrub_io_cv, &spa->spa_scrub_lock);
2864 spa->spa_scrub_inflight++;
2864 cv_wait(&spa->spa_scrub_io_cv, &spa->spa_scrub_lock);
2865 spa->spa_scrub_inflight++;
2866 spa->spa_load_verify_ios++;
2865 mutex_exit(&spa->spa_scrub_lock);
2866
2867 zio_nowait(zio_read(NULL, spa, bp, abd, size,
2868 zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb));
2869 }
2870
2871 zcb->zcb_readfails = 0;
2872

--- 2502 unchanged lines hidden ---
2867 mutex_exit(&spa->spa_scrub_lock);
2868
2869 zio_nowait(zio_read(NULL, spa, bp, abd, size,
2870 zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb));
2871 }
2872
2873 zcb->zcb_readfails = 0;
2874

--- 2502 unchanged lines hidden ---