Illumos 4914 - zfs on-disk bookmark structure should be named *_phys_t

4914 zfs on-disk bookmark structure should be named *_phys_t

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>

References:
  https://www.illumos.org/issues/4914
  https://github.com/illumos/illumos-gate/commit/7802d7b

Porting notes:

There were a number of zfsonlinux-specific uses of zbookmark_t which
needed to be updated.  This should reduce the likelihood of further
problems like issue #2094 from occurring.

Ported by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2558
This commit is contained in:
Matthew Ahrens 2014-06-25 10:37:59 -08:00 committed by Brian Behlendorf
parent 1fa8f795d5
commit 5dbd68a352
27 changed files with 137 additions and 132 deletions

View File

@ -21,7 +21,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, 2014 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
*/ */
#include <stdio.h> #include <stdio.h>
@ -1019,7 +1019,8 @@ dump_dnode(objset_t *os, uint64_t object, void *data, size_t size)
} }
static uint64_t static uint64_t
blkid2offset(const dnode_phys_t *dnp, const blkptr_t *bp, const zbookmark_t *zb) blkid2offset(const dnode_phys_t *dnp, const blkptr_t *bp,
const zbookmark_phys_t *zb)
{ {
if (dnp == NULL) { if (dnp == NULL) {
ASSERT(zb->zb_level < 0); ASSERT(zb->zb_level < 0);
@ -1083,7 +1084,7 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp)
} }
static void static void
print_indirect(blkptr_t *bp, const zbookmark_t *zb, print_indirect(blkptr_t *bp, const zbookmark_phys_t *zb,
const dnode_phys_t *dnp) const dnode_phys_t *dnp)
{ {
char blkbuf[BP_SPRINTF_LEN]; char blkbuf[BP_SPRINTF_LEN];
@ -1112,7 +1113,7 @@ print_indirect(blkptr_t *bp, const zbookmark_t *zb,
static int static int
visit_indirect(spa_t *spa, const dnode_phys_t *dnp, visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
blkptr_t *bp, const zbookmark_t *zb) blkptr_t *bp, const zbookmark_phys_t *zb)
{ {
int err = 0; int err = 0;
@ -1138,7 +1139,7 @@ visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
/* recursively visit blocks below this */ /* recursively visit blocks below this */
cbp = buf->b_data; cbp = buf->b_data;
for (i = 0; i < epb; i++, cbp++) { for (i = 0; i < epb; i++, cbp++) {
zbookmark_t czb; zbookmark_phys_t czb;
SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object,
zb->zb_level - 1, zb->zb_level - 1,
@ -1162,7 +1163,7 @@ dump_indirect(dnode_t *dn)
{ {
dnode_phys_t *dnp = dn->dn_phys; dnode_phys_t *dnp = dn->dn_phys;
int j; int j;
zbookmark_t czb; zbookmark_phys_t czb;
(void) printf("Indirect blocks:\n"); (void) printf("Indirect blocks:\n");
@ -2261,7 +2262,7 @@ zdb_blkptr_done(zio_t *zio)
blkptr_t *bp = zio->io_bp; blkptr_t *bp = zio->io_bp;
int ioerr = zio->io_error; int ioerr = zio->io_error;
zdb_cb_t *zcb = zio->io_private; zdb_cb_t *zcb = zio->io_private;
zbookmark_t *zb = &zio->io_bookmark; zbookmark_phys_t *zb = &zio->io_bookmark;
zio_data_buf_free(zio->io_data, zio->io_size); zio_data_buf_free(zio->io_data, zio->io_size);
@ -2295,7 +2296,7 @@ zdb_blkptr_done(zio_t *zio)
static int static int
zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
zdb_cb_t *zcb = arg; zdb_cb_t *zcb = arg;
dmu_object_type_t type; dmu_object_type_t type;
@ -2753,7 +2754,7 @@ typedef struct zdb_ddt_entry {
/* ARGSUSED */ /* ARGSUSED */
static int static int
zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, zdb_ddt_add_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
avl_tree_t *t = arg; avl_tree_t *t = arg;
avl_index_t where; avl_index_t where;

View File

@ -25,7 +25,7 @@
*/ */
/* /*
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/ */
/* /*
@ -123,7 +123,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr)
{ {
char *data, *dlimit; char *data, *dlimit;
blkptr_t *bp = &lr->lr_blkptr; blkptr_t *bp = &lr->lr_blkptr;
zbookmark_t zb; zbookmark_phys_t zb;
char buf[SPA_MAXBLOCKSIZE]; char buf[SPA_MAXBLOCKSIZE];
int verbose = MAX(dump_opt['d'], dump_opt['i']); int verbose = MAX(dump_opt['d'], dump_opt['i']);
int error; int error;

View File

@ -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) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
*/ */
@ -147,12 +147,12 @@ int arc_referenced(arc_buf_t *buf);
int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
arc_done_func_t *done, void *private, zio_priority_t priority, int flags, arc_done_func_t *done, void *private, zio_priority_t priority, int flags,
uint32_t *arc_flags, const zbookmark_t *zb); uint32_t *arc_flags, const zbookmark_phys_t *zb);
zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg, zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg,
blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress, blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress,
const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *physdone, const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *physdone,
arc_done_func_t *done, void *private, zio_priority_t priority, arc_done_func_t *done, void *private, zio_priority_t priority,
int zio_flags, const zbookmark_t *zb); int zio_flags, const zbookmark_phys_t *zb);
arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *private); arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *private);
void arc_remove_prune_callback(arc_prune_t *p); void arc_remove_prune_callback(arc_prune_t *p);

View File

@ -19,7 +19,7 @@
* CDDL HEADER END * CDDL HEADER END
*/ */
/* /*
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/ */
#ifndef _SYS_BPTREE_H #ifndef _SYS_BPTREE_H
@ -43,7 +43,7 @@ typedef struct bptree_phys {
typedef struct bptree_entry_phys { typedef struct bptree_entry_phys {
blkptr_t be_bp; blkptr_t be_bp;
uint64_t be_birth_txg; /* only delete blocks born after this txg */ uint64_t be_birth_txg; /* only delete blocks born after this txg */
zbookmark_t be_zb; /* holds traversal resume point if needed */ zbookmark_phys_t be_zb; /* holds traversal resume point if needed */
} bptree_entry_phys_t; } bptree_entry_phys_t;
typedef int bptree_itor_t(void *arg, const blkptr_t *bp, dmu_tx_t *tx); typedef int bptree_itor_t(void *arg, const blkptr_t *bp, dmu_tx_t *tx);

View File

@ -62,7 +62,7 @@ struct dsl_pool;
struct dnode; struct dnode;
struct drr_begin; struct drr_begin;
struct drr_end; struct drr_end;
struct zbookmark; struct zbookmark_phys;
struct spa; struct spa;
struct nvlist; struct nvlist;
struct arc_buf; struct arc_buf;

View File

@ -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) 2012, 2014 by Delphix. All rights reserved.
*/ */
#ifndef _SYS_DMU_TRAVERSE_H #ifndef _SYS_DMU_TRAVERSE_H
@ -40,7 +40,7 @@ struct zilog;
struct arc_buf; struct arc_buf;
typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const struct dnode_phys *dnp, void *arg); const zbookmark_phys_t *zb, const struct dnode_phys *dnp, void *arg);
#define TRAVERSE_PRE (1<<0) #define TRAVERSE_PRE (1<<0)
#define TRAVERSE_POST (1<<1) #define TRAVERSE_POST (1<<1)
@ -55,7 +55,7 @@ typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
int traverse_dataset(struct dsl_dataset *ds, int traverse_dataset(struct dsl_dataset *ds,
uint64_t txg_start, int flags, blkptr_cb_t func, void *arg); uint64_t txg_start, int flags, blkptr_cb_t func, void *arg);
int traverse_dataset_destroyed(spa_t *spa, blkptr_t *blkptr, int traverse_dataset_destroyed(spa_t *spa, blkptr_t *blkptr,
uint64_t txg_start, zbookmark_t *resume, int flags, uint64_t txg_start, zbookmark_phys_t *resume, int flags,
blkptr_cb_t func, void *arg); blkptr_cb_t func, void *arg);
int traverse_pool(spa_t *spa, int traverse_pool(spa_t *spa,
uint64_t txg_start, int flags, blkptr_cb_t func, void *arg); uint64_t txg_start, int flags, blkptr_cb_t func, void *arg);

View File

@ -20,7 +20,7 @@
*/ */
/* /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/ */
#ifndef _SYS_DSL_SCAN_H #ifndef _SYS_DSL_SCAN_H
@ -62,7 +62,7 @@ typedef struct dsl_scan_phys {
uint64_t scn_errors; /* scan I/O error count */ uint64_t scn_errors; /* scan I/O error count */
uint64_t scn_ddt_class_max; uint64_t scn_ddt_class_max;
ddt_bookmark_t scn_ddt_bookmark; ddt_bookmark_t scn_ddt_bookmark;
zbookmark_t scn_bookmark; zbookmark_phys_t scn_bookmark;
uint64_t scn_flags; /* dsl_scan_flags_t */ uint64_t scn_flags; /* dsl_scan_flags_t */
} dsl_scan_phys_t; } dsl_scan_phys_t;

View File

@ -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) 2013 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/ */
@ -51,7 +51,7 @@ typedef struct zilog zilog_t;
typedef struct spa_aux_vdev spa_aux_vdev_t; typedef struct spa_aux_vdev spa_aux_vdev_t;
typedef struct ddt ddt_t; typedef struct ddt ddt_t;
typedef struct ddt_entry ddt_entry_t; typedef struct ddt_entry ddt_entry_t;
typedef struct zbookmark zbookmark_t; typedef struct zbookmark_phys zbookmark_phys_t;
struct dsl_pool; struct dsl_pool;
struct dsl_dataset; struct dsl_dataset;
@ -720,7 +720,7 @@ typedef enum txg_state {
extern void spa_stats_init(spa_t *spa); extern void spa_stats_init(spa_t *spa);
extern void spa_stats_destroy(spa_t *spa); extern void spa_stats_destroy(spa_t *spa);
extern void spa_read_history_add(spa_t *spa, const zbookmark_t *zb, extern void spa_read_history_add(spa_t *spa, const zbookmark_phys_t *zb,
uint32_t aflags); uint32_t aflags);
extern void spa_txg_history_add(spa_t *spa, uint64_t txg, hrtime_t birth_time); extern void spa_txg_history_add(spa_t *spa, uint64_t txg, hrtime_t birth_time);
extern int spa_txg_history_set(spa_t *spa, uint64_t txg, extern int spa_txg_history_set(spa_t *spa, uint64_t txg,
@ -842,7 +842,7 @@ extern void spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
dmu_tx_t *tx, const char *fmt, ...); dmu_tx_t *tx, const char *fmt, ...);
/* error handling */ /* error handling */
struct zbookmark; struct zbookmark_phys;
extern void spa_log_error(spa_t *spa, zio_t *zio); extern void spa_log_error(spa_t *spa, zio_t *zio);
extern void zfs_ereport_post(const char *class, spa_t *spa, vdev_t *vd, extern void zfs_ereport_post(const char *class, spa_t *spa, vdev_t *vd,
zio_t *zio, uint64_t stateoroffset, uint64_t length); zio_t *zio, uint64_t stateoroffset, uint64_t length);

View File

@ -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) 2013 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/ */
@ -46,7 +46,7 @@ extern "C" {
#endif #endif
typedef struct spa_error_entry { typedef struct spa_error_entry {
zbookmark_t se_bookmark; zbookmark_phys_t se_bookmark;
char *se_name; char *se_name;
avl_node_t se_avl; avl_node_t se_avl;
} spa_error_entry_t; } spa_error_entry_t;

View File

@ -22,7 +22,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 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
*/ */
@ -263,11 +263,11 @@ extern const char *zio_type_name[ZIO_TYPES];
* Note: this structure is called a bookmark because its original purpose * Note: this structure is called a bookmark because its original purpose
* was to remember where to resume a pool-wide traverse. * was to remember where to resume a pool-wide traverse.
* *
* Note: this structure is passed between userland and the kernel. * Note: this structure is passed between userland and the kernel, and is
* Therefore it must not change size or alignment between 32/64 bit * stored on disk (by virtue of being incorporated into other on-disk
* compilation options. * structures, e.g. dsl_scan_phys_t).
*/ */
struct zbookmark { struct zbookmark_phys {
uint64_t zb_objset; uint64_t zb_objset;
uint64_t zb_object; uint64_t zb_object;
int64_t zb_level; int64_t zb_level;
@ -383,7 +383,7 @@ typedef struct zio_link {
struct zio { struct zio {
/* Core information about this I/O */ /* Core information about this I/O */
zbookmark_t io_bookmark; zbookmark_phys_t io_bookmark;
zio_prop_t io_prop; zio_prop_t io_prop;
zio_type_t io_type; zio_type_t io_type;
enum zio_child io_child_type; enum zio_child io_child_type;
@ -464,17 +464,17 @@ extern zio_t *zio_root(spa_t *spa,
extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data, extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data,
uint64_t size, zio_done_func_t *done, void *private, uint64_t size, zio_done_func_t *done, void *private,
zio_priority_t priority, enum zio_flag flags, const zbookmark_t *zb); zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb);
extern zio_t *zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, extern zio_t *zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
void *data, uint64_t size, const zio_prop_t *zp, void *data, uint64_t size, const zio_prop_t *zp,
zio_done_func_t *ready, zio_done_func_t *physdone, zio_done_func_t *done, zio_done_func_t *ready, zio_done_func_t *physdone, zio_done_func_t *done,
void *private, void *private,
zio_priority_t priority, enum zio_flag flags, const zbookmark_t *zb); zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb);
extern zio_t *zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, extern zio_t *zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
void *data, uint64_t size, zio_done_func_t *done, void *private, void *data, uint64_t size, zio_done_func_t *done, void *private,
zio_priority_t priority, enum zio_flag flags, zbookmark_t *zb); zio_priority_t priority, enum zio_flag flags, zbookmark_phys_t *zb);
extern void zio_write_override(zio_t *zio, blkptr_t *bp, int copies, extern void zio_write_override(zio_t *zio, blkptr_t *bp, int copies,
boolean_t nopwrite); boolean_t nopwrite);
@ -595,9 +595,9 @@ extern void zfs_ereport_post_checksum(spa_t *spa, vdev_t *vd,
/* Called from spa_sync(), but primarily an injection handler */ /* Called from spa_sync(), but primarily an injection handler */
extern void spa_handle_ignored_writes(spa_t *spa); extern void spa_handle_ignored_writes(spa_t *spa);
/* zbookmark functions */ /* zbookmark_phys functions */
boolean_t zbookmark_is_before(const struct dnode_phys *dnp, boolean_t zbookmark_is_before(const struct dnode_phys *dnp,
const zbookmark_t *zb1, const zbookmark_t *zb2); const zbookmark_phys_t *zb1, const zbookmark_phys_t *zb2);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -22,7 +22,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 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/ */
#include <ctype.h> #include <ctype.h>
@ -3500,7 +3500,7 @@ zpool_vdev_name(libzfs_handle_t *hdl, zpool_handle_t *zhp, nvlist_t *nv,
static int static int
zbookmark_compare(const void *a, const void *b) zbookmark_compare(const void *a, const void *b)
{ {
return (memcmp(a, b, sizeof (zbookmark_t))); return (memcmp(a, b, sizeof (zbookmark_phys_t)));
} }
/* /*
@ -3512,7 +3512,7 @@ zpool_get_errlog(zpool_handle_t *zhp, nvlist_t **nverrlistp)
{ {
zfs_cmd_t zc = {"\0"}; zfs_cmd_t zc = {"\0"};
uint64_t count; uint64_t count;
zbookmark_t *zb = NULL; zbookmark_phys_t *zb = NULL;
int i; int i;
/* /*
@ -3525,7 +3525,7 @@ zpool_get_errlog(zpool_handle_t *zhp, nvlist_t **nverrlistp)
if (count == 0) if (count == 0)
return (0); return (0);
if ((zc.zc_nvlist_dst = (uintptr_t)zfs_alloc(zhp->zpool_hdl, if ((zc.zc_nvlist_dst = (uintptr_t)zfs_alloc(zhp->zpool_hdl,
count * sizeof (zbookmark_t))) == (uintptr_t)NULL) count * sizeof (zbookmark_phys_t))) == (uintptr_t)NULL)
return (-1); return (-1);
zc.zc_nvlist_dst_size = count; zc.zc_nvlist_dst_size = count;
(void) strcpy(zc.zc_name, zhp->zpool_name); (void) strcpy(zc.zc_name, zhp->zpool_name);
@ -3534,11 +3534,14 @@ zpool_get_errlog(zpool_handle_t *zhp, nvlist_t **nverrlistp)
&zc) != 0) { &zc) != 0) {
free((void *)(uintptr_t)zc.zc_nvlist_dst); free((void *)(uintptr_t)zc.zc_nvlist_dst);
if (errno == ENOMEM) { if (errno == ENOMEM) {
void *dst;
count = zc.zc_nvlist_dst_size; count = zc.zc_nvlist_dst_size;
if ((zc.zc_nvlist_dst = (uintptr_t) dst = zfs_alloc(zhp->zpool_hdl, count *
zfs_alloc(zhp->zpool_hdl, count * sizeof (zbookmark_phys_t));
sizeof (zbookmark_t))) == (uintptr_t)NULL) if (dst == NULL)
return (-1); return (-1);
zc.zc_nvlist_dst = (uintptr_t)dst;
} else { } else {
return (-1); return (-1);
} }
@ -3554,11 +3557,11 @@ zpool_get_errlog(zpool_handle_t *zhp, nvlist_t **nverrlistp)
* _not_ copied as part of the process. So we point the start of our * _not_ copied as part of the process. So we point the start of our
* array appropriate and decrement the total number of elements. * array appropriate and decrement the total number of elements.
*/ */
zb = ((zbookmark_t *)(uintptr_t)zc.zc_nvlist_dst) + zb = ((zbookmark_phys_t *)(uintptr_t)zc.zc_nvlist_dst) +
zc.zc_nvlist_dst_size; zc.zc_nvlist_dst_size;
count -= zc.zc_nvlist_dst_size; count -= zc.zc_nvlist_dst_size;
qsort(zb, count, sizeof (zbookmark_t), zbookmark_compare); qsort(zb, count, sizeof (zbookmark_phys_t), zbookmark_compare);
verify(nvlist_alloc(nverrlistp, 0, KM_SLEEP) == 0); verify(nvlist_alloc(nverrlistp, 0, KM_SLEEP) == 0);

View File

@ -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) 2013 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright 2014 Nexenta Systems, Inc. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/ */
@ -731,7 +731,7 @@ typedef struct l2arc_read_callback {
arc_buf_t *l2rcb_buf; /* read buffer */ arc_buf_t *l2rcb_buf; /* read buffer */
spa_t *l2rcb_spa; /* spa */ spa_t *l2rcb_spa; /* spa */
blkptr_t l2rcb_bp; /* original blkptr */ blkptr_t l2rcb_bp; /* original blkptr */
zbookmark_t l2rcb_zb; /* original bookmark */ zbookmark_phys_t l2rcb_zb; /* original bookmark */
int l2rcb_flags; /* original flags */ int l2rcb_flags; /* original flags */
enum zio_compress l2rcb_compress; /* applied compress */ enum zio_compress l2rcb_compress; /* applied compress */
} l2arc_read_callback_t; } l2arc_read_callback_t;
@ -3197,7 +3197,7 @@ arc_read_done(zio_t *zio)
int int
arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done,
void *private, zio_priority_t priority, int zio_flags, uint32_t *arc_flags, void *private, zio_priority_t priority, int zio_flags, uint32_t *arc_flags,
const zbookmark_t *zb) const zbookmark_phys_t *zb)
{ {
arc_buf_hdr_t *hdr = NULL; arc_buf_hdr_t *hdr = NULL;
arc_buf_t *buf = NULL; arc_buf_t *buf = NULL;
@ -3392,7 +3392,7 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done,
*/ */
ASSERT3U(hdr->b_size, ==, size); ASSERT3U(hdr->b_size, ==, size);
DTRACE_PROBE4(arc__miss, arc_buf_hdr_t *, hdr, blkptr_t *, bp, DTRACE_PROBE4(arc__miss, arc_buf_hdr_t *, hdr, blkptr_t *, bp,
uint64_t, size, zbookmark_t *, zb); uint64_t, size, zbookmark_phys_t *, zb);
ARCSTAT_BUMP(arcstat_misses); ARCSTAT_BUMP(arcstat_misses);
ARCSTAT_CONDSTAT(!(hdr->b_flags & ARC_PREFETCH), ARCSTAT_CONDSTAT(!(hdr->b_flags & ARC_PREFETCH),
demand, prefetch, hdr->b_type != ARC_BUFC_METADATA, demand, prefetch, hdr->b_type != ARC_BUFC_METADATA,
@ -3963,7 +3963,7 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg,
blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress, blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress,
const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *physdone, const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *physdone,
arc_done_func_t *done, void *private, zio_priority_t priority, arc_done_func_t *done, void *private, zio_priority_t priority,
int zio_flags, const zbookmark_t *zb) int zio_flags, const zbookmark_phys_t *zb)
{ {
arc_buf_hdr_t *hdr = buf->b_hdr; arc_buf_hdr_t *hdr = buf->b_hdr;
arc_write_callback_t *callback; arc_write_callback_t *callback;

View File

@ -20,7 +20,7 @@
*/ */
/* /*
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
*/ */
#include <sys/arc.h> #include <sys/arc.h>
@ -151,7 +151,7 @@ bptree_add(objset_t *os, uint64_t obj, blkptr_t *bp, uint64_t birth_txg,
/* ARGSUSED */ /* ARGSUSED */
static int static int
bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
int err; int err;
struct bptree_args *ba = arg; struct bptree_args *ba = arg;

View File

@ -577,7 +577,7 @@ static void
dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t *flags) dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t *flags)
{ {
dnode_t *dn; dnode_t *dn;
zbookmark_t zb; zbookmark_phys_t zb;
uint32_t aflags = ARC_NOWAIT; uint32_t aflags = ARC_NOWAIT;
DB_DNODE_ENTER(db); DB_DNODE_ENTER(db);
@ -1922,7 +1922,7 @@ dbuf_prefetch(dnode_t *dn, uint64_t blkid, zio_priority_t prio)
if (bp && !BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) { if (bp && !BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) {
dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset;
uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH;
zbookmark_t zb; zbookmark_phys_t zb;
SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET,
dn->dn_object, 0, blkid); dn->dn_object, 0, blkid);
@ -2845,7 +2845,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx)
objset_t *os; objset_t *os;
dmu_buf_impl_t *parent = db->db_parent; dmu_buf_impl_t *parent = db->db_parent;
uint64_t txg = tx->tx_txg; uint64_t txg = tx->tx_txg;
zbookmark_t zb; zbookmark_phys_t zb;
zio_prop_t zp; zio_prop_t zp;
zio_t *zio; zio_t *zio;
int wp_flag = 0; int wp_flag = 0;

View File

@ -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, 2014 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
*/ */
@ -1509,7 +1509,7 @@ dmu_sync_late_arrival_done(zio_t *zio)
static int static int
dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sync_cb_t *done, zgd_t *zgd, dmu_sync_late_arrival(zio_t *pio, objset_t *os, dmu_sync_cb_t *done, zgd_t *zgd,
zio_prop_t *zp, zbookmark_t *zb) zio_prop_t *zp, zbookmark_phys_t *zb)
{ {
dmu_sync_arg_t *dsa; dmu_sync_arg_t *dsa;
dmu_tx_t *tx; dmu_tx_t *tx;
@ -1570,7 +1570,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done, zgd_t *zgd)
dsl_dataset_t *ds = os->os_dsl_dataset; dsl_dataset_t *ds = os->os_dsl_dataset;
dbuf_dirty_record_t *dr; dbuf_dirty_record_t *dr;
dmu_sync_arg_t *dsa; dmu_sync_arg_t *dsa;
zbookmark_t zb; zbookmark_phys_t zb;
zio_prop_t zp; zio_prop_t zp;
dnode_t *dn; dnode_t *dn;

View File

@ -20,7 +20,7 @@
*/ */
/* /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/ */
#include <sys/dmu.h> #include <sys/dmu.h>
@ -107,7 +107,7 @@ report_dnode(struct diffarg *da, uint64_t object, dnode_phys_t *dnp)
/* ARGSUSED */ /* ARGSUSED */
static int static int
diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
struct diffarg *da = arg; struct diffarg *da = arg;
int err = 0; int err = 0;

View File

@ -285,7 +285,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp,
os->os_rootbp = bp; os->os_rootbp = bp;
if (!BP_IS_HOLE(os->os_rootbp)) { if (!BP_IS_HOLE(os->os_rootbp)) {
uint32_t aflags = ARC_WAIT; uint32_t aflags = ARC_WAIT;
zbookmark_t zb; zbookmark_phys_t zb;
SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET,
ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
@ -1018,7 +1018,7 @@ void
dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx) dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx)
{ {
int txgoff; int txgoff;
zbookmark_t zb; zbookmark_phys_t zb;
zio_prop_t zp; zio_prop_t zp;
zio_t *zio; zio_t *zio;
list_t *list; list_t *list;

View File

@ -23,7 +23,7 @@
* Copyright (c) 2011 by Delphix. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
*/ */
#include <sys/dmu.h> #include <sys/dmu.h>
@ -449,7 +449,7 @@ backup_do_embed(dmu_sendarg_t *dsp, const blkptr_t *bp)
/* ARGSUSED */ /* ARGSUSED */
static int static int
backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
dmu_sendarg_t *dsp = arg; dmu_sendarg_t *dsp = arg;
dmu_object_type_t type = bp ? BP_GET_TYPE(bp) : DMU_OT_NONE; dmu_object_type_t type = bp ? BP_GET_TYPE(bp) : DMU_OT_NONE;

View File

@ -55,7 +55,7 @@ typedef struct traverse_data {
uint64_t td_objset; uint64_t td_objset;
blkptr_t *td_rootbp; blkptr_t *td_rootbp;
uint64_t td_min_txg; uint64_t td_min_txg;
zbookmark_t *td_resume; zbookmark_phys_t *td_resume;
int td_flags; int td_flags;
prefetch_data_t *td_pfd; prefetch_data_t *td_pfd;
boolean_t td_paused; boolean_t td_paused;
@ -72,7 +72,7 @@ static int
traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg) traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
{ {
traverse_data_t *td = arg; traverse_data_t *td = arg;
zbookmark_t zb; zbookmark_phys_t zb;
if (BP_IS_HOLE(bp)) if (BP_IS_HOLE(bp))
return (0); return (0);
@ -96,7 +96,7 @@ traverse_zil_record(zilog_t *zilog, lr_t *lrc, void *arg, uint64_t claim_txg)
if (lrc->lrc_txtype == TX_WRITE) { if (lrc->lrc_txtype == TX_WRITE) {
lr_write_t *lr = (lr_write_t *)lrc; lr_write_t *lr = (lr_write_t *)lrc;
blkptr_t *bp = &lr->lr_blkptr; blkptr_t *bp = &lr->lr_blkptr;
zbookmark_t zb; zbookmark_phys_t zb;
if (BP_IS_HOLE(bp)) if (BP_IS_HOLE(bp))
return (0); return (0);
@ -150,7 +150,7 @@ typedef enum resume_skip {
*/ */
static resume_skip_t static resume_skip_t
resume_skip_check(traverse_data_t *td, const dnode_phys_t *dnp, resume_skip_check(traverse_data_t *td, const dnode_phys_t *dnp,
const zbookmark_t *zb) const zbookmark_phys_t *zb)
{ {
if (td->td_resume != NULL && !ZB_IS_ZERO(td->td_resume)) { if (td->td_resume != NULL && !ZB_IS_ZERO(td->td_resume)) {
/* /*
@ -175,7 +175,7 @@ resume_skip_check(traverse_data_t *td, const dnode_phys_t *dnp,
static void static void
traverse_prefetch_metadata(traverse_data_t *td, traverse_prefetch_metadata(traverse_data_t *td,
const blkptr_t *bp, const zbookmark_t *zb) const blkptr_t *bp, const zbookmark_phys_t *zb)
{ {
uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; uint32_t flags = ARC_NOWAIT | ARC_PREFETCH;
@ -209,7 +209,7 @@ prefetch_needed(prefetch_data_t *pfd, const blkptr_t *bp)
static int static int
traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp,
const blkptr_t *bp, const zbookmark_t *zb) const blkptr_t *bp, const zbookmark_phys_t *zb)
{ {
int err = 0; int err = 0;
arc_buf_t *buf = NULL; arc_buf_t *buf = NULL;
@ -281,14 +281,14 @@ traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp,
uint32_t flags = ARC_WAIT; uint32_t flags = ARC_WAIT;
int32_t i; int32_t i;
int32_t epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; int32_t epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT;
zbookmark_t *czb; zbookmark_phys_t *czb;
err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf,
ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb);
if (err != 0) if (err != 0)
goto post; goto post;
czb = kmem_alloc(sizeof (zbookmark_t), KM_PUSHPAGE); czb = kmem_alloc(sizeof (zbookmark_phys_t), KM_PUSHPAGE);
for (i = 0; i < epb; i++) { for (i = 0; i < epb; i++) {
SET_BOOKMARK(czb, zb->zb_objset, zb->zb_object, SET_BOOKMARK(czb, zb->zb_objset, zb->zb_object,
@ -309,7 +309,7 @@ traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp,
break; break;
} }
kmem_free(czb, sizeof (zbookmark_t)); kmem_free(czb, sizeof (zbookmark_phys_t));
} else if (BP_GET_TYPE(bp) == DMU_OT_DNODE) { } else if (BP_GET_TYPE(bp) == DMU_OT_DNODE) {
uint32_t flags = ARC_WAIT; uint32_t flags = ARC_WAIT;
@ -411,7 +411,7 @@ prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *dnp,
uint64_t objset, uint64_t object) uint64_t objset, uint64_t object)
{ {
int j; int j;
zbookmark_t czb; zbookmark_phys_t czb;
for (j = 0; j < dnp->dn_nblkptr; j++) { for (j = 0; j < dnp->dn_nblkptr; j++) {
SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j);
@ -429,7 +429,7 @@ traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp,
uint64_t objset, uint64_t object) uint64_t objset, uint64_t object)
{ {
int j, err = 0; int j, err = 0;
zbookmark_t czb; zbookmark_phys_t czb;
for (j = 0; j < dnp->dn_nblkptr; j++) { for (j = 0; j < dnp->dn_nblkptr; j++) {
SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j);
@ -448,7 +448,7 @@ traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp,
/* ARGSUSED */ /* ARGSUSED */
static int static int
traverse_prefetcher(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, traverse_prefetcher(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
prefetch_data_t *pfd = arg; prefetch_data_t *pfd = arg;
uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH;
@ -478,7 +478,7 @@ traverse_prefetch_thread(void *arg)
{ {
traverse_data_t *td_main = arg; traverse_data_t *td_main = arg;
traverse_data_t td = *td_main; traverse_data_t td = *td_main;
zbookmark_t czb; zbookmark_phys_t czb;
td.td_func = traverse_prefetcher; td.td_func = traverse_prefetcher;
td.td_arg = td_main->td_pfd; td.td_arg = td_main->td_pfd;
@ -500,12 +500,12 @@ traverse_prefetch_thread(void *arg)
*/ */
static int static int
traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp, traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp,
uint64_t txg_start, zbookmark_t *resume, int flags, uint64_t txg_start, zbookmark_phys_t *resume, int flags,
blkptr_cb_t func, void *arg) blkptr_cb_t func, void *arg)
{ {
traverse_data_t *td; traverse_data_t *td;
prefetch_data_t *pd; prefetch_data_t *pd;
zbookmark_t *czb; zbookmark_phys_t *czb;
int err; int err;
ASSERT(ds == NULL || objset == ds->ds_object); ASSERT(ds == NULL || objset == ds->ds_object);
@ -519,7 +519,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp,
td = kmem_alloc(sizeof (traverse_data_t), KM_PUSHPAGE); td = kmem_alloc(sizeof (traverse_data_t), KM_PUSHPAGE);
pd = kmem_zalloc(sizeof (prefetch_data_t), KM_PUSHPAGE); pd = kmem_zalloc(sizeof (prefetch_data_t), KM_PUSHPAGE);
czb = kmem_alloc(sizeof (zbookmark_t), KM_PUSHPAGE); czb = kmem_alloc(sizeof (zbookmark_phys_t), KM_PUSHPAGE);
td->td_spa = spa; td->td_spa = spa;
td->td_objset = objset; td->td_objset = objset;
@ -574,7 +574,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp,
mutex_destroy(&pd->pd_mtx); mutex_destroy(&pd->pd_mtx);
cv_destroy(&pd->pd_cv); cv_destroy(&pd->pd_cv);
kmem_free(czb, sizeof (zbookmark_t)); kmem_free(czb, sizeof (zbookmark_phys_t));
kmem_free(pd, sizeof (struct prefetch_data)); kmem_free(pd, sizeof (struct prefetch_data));
kmem_free(td, sizeof (struct traverse_data)); kmem_free(td, sizeof (struct traverse_data));
@ -595,7 +595,7 @@ traverse_dataset(dsl_dataset_t *ds, uint64_t txg_start, int flags,
int int
traverse_dataset_destroyed(spa_t *spa, blkptr_t *blkptr, traverse_dataset_destroyed(spa_t *spa, blkptr_t *blkptr,
uint64_t txg_start, zbookmark_t *resume, int flags, uint64_t txg_start, zbookmark_phys_t *resume, int flags,
blkptr_cb_t func, void *arg) blkptr_cb_t func, void *arg)
{ {
return (traverse_impl(spa, NULL, ZB_DESTROYED_OBJSET, return (traverse_impl(spa, NULL, ZB_DESTROYED_OBJSET,

View File

@ -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) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved.
*/ */
@ -541,7 +541,7 @@ struct killarg {
/* ARGSUSED */ /* ARGSUSED */
static int static int
kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
struct killarg *ka = arg; struct killarg *ka = arg;
dmu_tx_t *tx = ka->tx; dmu_tx_t *tx = ka->tx;

View File

@ -20,7 +20,7 @@
*/ */
/* /*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
*/ */
#include <sys/dsl_scan.h> #include <sys/dsl_scan.h>
@ -50,7 +50,8 @@
#include <sys/zfs_vfsops.h> #include <sys/zfs_vfsops.h>
#endif #endif
typedef int (scan_cb_t)(dsl_pool_t *, const blkptr_t *, const zbookmark_t *); typedef int (scan_cb_t)(dsl_pool_t *, const blkptr_t *,
const zbookmark_phys_t *);
static scan_cb_t dsl_scan_scrub_cb; static scan_cb_t dsl_scan_scrub_cb;
static void dsl_scan_cancel_sync(void *, dmu_tx_t *); static void dsl_scan_cancel_sync(void *, dmu_tx_t *);
@ -389,7 +390,7 @@ dsl_scan_cancel(dsl_pool_t *dp)
} }
static void dsl_scan_visitbp(blkptr_t *bp, static void dsl_scan_visitbp(blkptr_t *bp,
const zbookmark_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf, const zbookmark_phys_t *zb, dnode_phys_t *dnp, arc_buf_t *pbuf,
dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype, dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype,
dmu_tx_t *tx); dmu_tx_t *tx);
inline __attribute__((always_inline)) static void dsl_scan_visitdnode( inline __attribute__((always_inline)) static void dsl_scan_visitdnode(
@ -428,7 +429,7 @@ dsl_scan_sync_state(dsl_scan_t *scn, dmu_tx_t *tx)
} }
static boolean_t static boolean_t
dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_t *zb) dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_phys_t *zb)
{ {
uint64_t elapsed_nanosecs; uint64_t elapsed_nanosecs;
int mintime; int mintime;
@ -486,7 +487,7 @@ dsl_scan_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
dsl_pool_t *dp = zsa->zsa_dp; dsl_pool_t *dp = zsa->zsa_dp;
dsl_scan_t *scn = dp->dp_scan; dsl_scan_t *scn = dp->dp_scan;
zil_header_t *zh = zsa->zsa_zh; zil_header_t *zh = zsa->zsa_zh;
zbookmark_t zb; zbookmark_phys_t zb;
if (BP_IS_HOLE(bp) || bp->blk_birth <= scn->scn_phys.scn_cur_min_txg) if (BP_IS_HOLE(bp) || bp->blk_birth <= scn->scn_phys.scn_cur_min_txg)
return (0); return (0);
@ -518,7 +519,7 @@ dsl_scan_zil_record(zilog_t *zilog, lr_t *lrc, void *arg, uint64_t claim_txg)
zil_header_t *zh = zsa->zsa_zh; zil_header_t *zh = zsa->zsa_zh;
lr_write_t *lr = (lr_write_t *)lrc; lr_write_t *lr = (lr_write_t *)lrc;
blkptr_t *bp = &lr->lr_blkptr; blkptr_t *bp = &lr->lr_blkptr;
zbookmark_t zb; zbookmark_phys_t zb;
if (BP_IS_HOLE(bp) || if (BP_IS_HOLE(bp) ||
bp->blk_birth <= scn->scn_phys.scn_cur_min_txg) bp->blk_birth <= scn->scn_phys.scn_cur_min_txg)
@ -568,7 +569,7 @@ static void
dsl_scan_prefetch(dsl_scan_t *scn, arc_buf_t *buf, blkptr_t *bp, dsl_scan_prefetch(dsl_scan_t *scn, arc_buf_t *buf, blkptr_t *bp,
uint64_t objset, uint64_t object, uint64_t blkid) uint64_t objset, uint64_t object, uint64_t blkid)
{ {
zbookmark_t czb; zbookmark_phys_t czb;
uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; uint32_t flags = ARC_NOWAIT | ARC_PREFETCH;
if (zfs_no_scrub_prefetch) if (zfs_no_scrub_prefetch)
@ -587,7 +588,7 @@ dsl_scan_prefetch(dsl_scan_t *scn, arc_buf_t *buf, blkptr_t *bp,
static boolean_t static boolean_t
dsl_scan_check_resume(dsl_scan_t *scn, const dnode_phys_t *dnp, dsl_scan_check_resume(dsl_scan_t *scn, const dnode_phys_t *dnp,
const zbookmark_t *zb) const zbookmark_phys_t *zb)
{ {
/* /*
* We never skip over user/group accounting objects (obj<0) * We never skip over user/group accounting objects (obj<0)
@ -627,7 +628,7 @@ dsl_scan_check_resume(dsl_scan_t *scn, const dnode_phys_t *dnp,
inline __attribute__((always_inline)) static int inline __attribute__((always_inline)) static int
dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype, dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
dnode_phys_t *dnp, const blkptr_t *bp, dnode_phys_t *dnp, const blkptr_t *bp,
const zbookmark_t *zb, dmu_tx_t *tx, arc_buf_t **bufp) const zbookmark_phys_t *zb, dmu_tx_t *tx, arc_buf_t **bufp)
{ {
dsl_pool_t *dp = scn->scn_dp; dsl_pool_t *dp = scn->scn_dp;
int zio_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCAN_THREAD; int zio_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCAN_THREAD;
@ -650,7 +651,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
zb->zb_object, zb->zb_blkid * epb + i); zb->zb_object, zb->zb_blkid * epb + i);
} }
for (i = 0, cbp = (*bufp)->b_data; i < epb; i++, cbp++) { for (i = 0, cbp = (*bufp)->b_data; i < epb; i++, cbp++) {
zbookmark_t czb; zbookmark_phys_t czb;
SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object,
zb->zb_level - 1, zb->zb_level - 1,
@ -734,7 +735,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl_dataset_t *ds,
int j; int j;
for (j = 0; j < dnp->dn_nblkptr; j++) { for (j = 0; j < dnp->dn_nblkptr; j++) {
zbookmark_t czb; zbookmark_phys_t czb;
SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object, SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object,
dnp->dn_nlevels - 1, j); dnp->dn_nlevels - 1, j);
@ -743,7 +744,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl_dataset_t *ds,
} }
if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) {
zbookmark_t czb; zbookmark_phys_t czb;
SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object, SET_BOOKMARK(&czb, ds ? ds->ds_object : 0, object,
0, DMU_SPILL_BLKID); 0, DMU_SPILL_BLKID);
dsl_scan_visitbp(&dnp->dn_spill, dsl_scan_visitbp(&dnp->dn_spill,
@ -756,7 +757,7 @@ dsl_scan_visitdnode(dsl_scan_t *scn, dsl_dataset_t *ds,
* first 5; we want them to be useful. * first 5; we want them to be useful.
*/ */
static void static void
dsl_scan_visitbp(blkptr_t *bp, const zbookmark_t *zb, dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t *zb,
dnode_phys_t *dnp, arc_buf_t *pbuf, dnode_phys_t *dnp, arc_buf_t *pbuf,
dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype, dsl_dataset_t *ds, dsl_scan_t *scn, dmu_objset_type_t ostype,
dmu_tx_t *tx) dmu_tx_t *tx)
@ -832,7 +833,7 @@ static void
dsl_scan_visit_rootbp(dsl_scan_t *scn, dsl_dataset_t *ds, blkptr_t *bp, dsl_scan_visit_rootbp(dsl_scan_t *scn, dsl_dataset_t *ds, blkptr_t *bp,
dmu_tx_t *tx) dmu_tx_t *tx)
{ {
zbookmark_t zb; zbookmark_phys_t zb;
SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET,
ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
@ -1262,7 +1263,7 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum checksum,
const ddt_key_t *ddk = &dde->dde_key; const ddt_key_t *ddk = &dde->dde_key;
ddt_phys_t *ddp = dde->dde_phys; ddt_phys_t *ddp = dde->dde_phys;
blkptr_t bp; blkptr_t bp;
zbookmark_t zb = { 0 }; zbookmark_phys_t zb = { 0 };
int p; int p;
if (scn->scn_phys.scn_state != DSS_SCANNING) if (scn->scn_phys.scn_state != DSS_SCANNING)
@ -1331,7 +1332,7 @@ dsl_scan_visit(dsl_scan_t *scn, dmu_tx_t *tx)
* In case we were paused right at the end of the ds, zero the * In case we were paused right at the end of the ds, zero the
* bookmark so we don't think that we're still trying to resume. * bookmark so we don't think that we're still trying to resume.
*/ */
bzero(&scn->scn_phys.scn_bookmark, sizeof (zbookmark_t)); bzero(&scn->scn_phys.scn_bookmark, sizeof (zbookmark_phys_t));
zc = kmem_alloc(sizeof (zap_cursor_t), KM_PUSHPAGE); zc = kmem_alloc(sizeof (zap_cursor_t), KM_PUSHPAGE);
za = kmem_alloc(sizeof (zap_attribute_t), KM_PUSHPAGE); za = kmem_alloc(sizeof (zap_attribute_t), KM_PUSHPAGE);
@ -1735,7 +1736,7 @@ dsl_scan_scrub_done(zio_t *zio)
static int static int
dsl_scan_scrub_cb(dsl_pool_t *dp, dsl_scan_scrub_cb(dsl_pool_t *dp,
const blkptr_t *bp, const zbookmark_t *zb) const blkptr_t *bp, const zbookmark_phys_t *zb)
{ {
dsl_scan_t *scn = dp->dp_scan; dsl_scan_t *scn = dp->dp_scan;
size_t size = BP_GET_PSIZE(bp); size_t size = BP_GET_PSIZE(bp);

View File

@ -790,7 +790,7 @@ spa_error_entry_compare(const void *a, const void *b)
int ret; int ret;
ret = bcmp(&sa->se_bookmark, &sb->se_bookmark, ret = bcmp(&sa->se_bookmark, &sb->se_bookmark,
sizeof (zbookmark_t)); sizeof (zbookmark_phys_t));
if (ret < 0) if (ret < 0)
return (-1); return (-1);
@ -1876,7 +1876,7 @@ spa_load_verify_done(zio_t *zio)
/*ARGSUSED*/ /*ARGSUSED*/
static int static int
spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg)
{ {
if (!BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) { if (!BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) {
zio_t *rio = arg; zio_t *rio = arg;

View File

@ -20,7 +20,7 @@
*/ */
/* /*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/ */
/* /*
@ -35,7 +35,7 @@
* deleted from the log when the scrub completes. * deleted from the log when the scrub completes.
* *
* The log is stored using a ZAP object whose key is a string form of the * The log is stored using a ZAP object whose key is a string form of the
* zbookmark tuple (objset, object, level, blkid), and whose contents is an * zbookmark_phys tuple (objset, object, level, blkid), and whose contents is an
* optional 'objset:object' human-readable string describing the data. When an * optional 'objset:object' human-readable string describing the data. When an
* error is first logged, this string will be empty, indicating that no name is * error is first logged, this string will be empty, indicating that no name is
* known. This prevents us from having to issue a potentially large amount of * known. This prevents us from having to issue a potentially large amount of
@ -59,7 +59,7 @@
* Convert a bookmark to a string. * Convert a bookmark to a string.
*/ */
static void static void
bookmark_to_name(zbookmark_t *zb, char *buf, size_t len) bookmark_to_name(zbookmark_phys_t *zb, char *buf, size_t len)
{ {
(void) snprintf(buf, len, "%llx:%llx:%llx:%llx", (void) snprintf(buf, len, "%llx:%llx:%llx:%llx",
(u_longlong_t)zb->zb_objset, (u_longlong_t)zb->zb_object, (u_longlong_t)zb->zb_objset, (u_longlong_t)zb->zb_object,
@ -71,7 +71,7 @@ bookmark_to_name(zbookmark_t *zb, char *buf, size_t len)
*/ */
#ifdef _KERNEL #ifdef _KERNEL
static void static void
name_to_bookmark(char *buf, zbookmark_t *zb) name_to_bookmark(char *buf, zbookmark_phys_t *zb)
{ {
zb->zb_objset = strtonum(buf, &buf); zb->zb_objset = strtonum(buf, &buf);
ASSERT(*buf == ':'); ASSERT(*buf == ':');
@ -92,7 +92,7 @@ name_to_bookmark(char *buf, zbookmark_t *zb)
void void
spa_log_error(spa_t *spa, zio_t *zio) spa_log_error(spa_t *spa, zio_t *zio)
{ {
zbookmark_t *zb = &zio->io_logical->io_bookmark; zbookmark_phys_t *zb = &zio->io_logical->io_bookmark;
spa_error_entry_t search; spa_error_entry_t search;
spa_error_entry_t *new; spa_error_entry_t *new;
avl_tree_t *tree; avl_tree_t *tree;
@ -165,7 +165,7 @@ process_error_log(spa_t *spa, uint64_t obj, void *addr, size_t *count)
{ {
zap_cursor_t zc; zap_cursor_t zc;
zap_attribute_t za; zap_attribute_t za;
zbookmark_t zb; zbookmark_phys_t zb;
if (obj == 0) if (obj == 0)
return (0); return (0);
@ -182,8 +182,8 @@ process_error_log(spa_t *spa, uint64_t obj, void *addr, size_t *count)
name_to_bookmark(za.za_name, &zb); name_to_bookmark(za.za_name, &zb);
if (copyout(&zb, (char *)addr + if (copyout(&zb, (char *)addr +
(*count - 1) * sizeof (zbookmark_t), (*count - 1) * sizeof (zbookmark_phys_t),
sizeof (zbookmark_t)) != 0) { sizeof (zbookmark_phys_t)) != 0) {
zap_cursor_fini(&zc); zap_cursor_fini(&zc);
return (SET_ERROR(EFAULT)); return (SET_ERROR(EFAULT));
} }
@ -207,8 +207,8 @@ process_error_list(avl_tree_t *list, void *addr, size_t *count)
return (SET_ERROR(ENOMEM)); return (SET_ERROR(ENOMEM));
if (copyout(&se->se_bookmark, (char *)addr + if (copyout(&se->se_bookmark, (char *)addr +
(*count - 1) * sizeof (zbookmark_t), (*count - 1) * sizeof (zbookmark_phys_t),
sizeof (zbookmark_t)) != 0) sizeof (zbookmark_phys_t)) != 0)
return (SET_ERROR(EFAULT)); return (SET_ERROR(EFAULT));
*count -= 1; *count -= 1;

View File

@ -192,7 +192,7 @@ spa_read_history_destroy(spa_t *spa)
} }
void void
spa_read_history_add(spa_t *spa, const zbookmark_t *zb, uint32_t aflags) spa_read_history_add(spa_t *spa, const zbookmark_phys_t *zb, uint32_t aflags)
{ {
spa_stats_history_t *ssh = &spa->spa_stats.read_history; spa_stats_history_t *ssh = &spa->spa_stats.read_history;
spa_read_history_t *srh, *rm; spa_read_history_t *srh, *rm;

View File

@ -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) 2013 by Delphix. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
*/ */
/* Portions Copyright 2010 Robert Milkowski */ /* Portions Copyright 2010 Robert Milkowski */
@ -205,7 +205,7 @@ zil_read_log_block(zilog_t *zilog, const blkptr_t *bp, blkptr_t *nbp, void *dst,
enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; enum zio_flag zio_flags = ZIO_FLAG_CANFAIL;
uint32_t aflags = ARC_WAIT; uint32_t aflags = ARC_WAIT;
arc_buf_t *abuf = NULL; arc_buf_t *abuf = NULL;
zbookmark_t zb; zbookmark_phys_t zb;
int error; int error;
if (zilog->zl_header->zh_claim_txg == 0) if (zilog->zl_header->zh_claim_txg == 0)
@ -278,7 +278,7 @@ zil_read_log_data(zilog_t *zilog, const lr_write_t *lr, void *wbuf)
const blkptr_t *bp = &lr->lr_blkptr; const blkptr_t *bp = &lr->lr_blkptr;
uint32_t aflags = ARC_WAIT; uint32_t aflags = ARC_WAIT;
arc_buf_t *abuf = NULL; arc_buf_t *abuf = NULL;
zbookmark_t zb; zbookmark_phys_t zb;
int error; int error;
if (BP_IS_HOLE(bp)) { if (BP_IS_HOLE(bp)) {
@ -900,7 +900,7 @@ zil_lwb_write_done(zio_t *zio)
static void static void
zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb)
{ {
zbookmark_t zb; zbookmark_phys_t zb;
SET_BOOKMARK(&zb, lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_OBJSET], SET_BOOKMARK(&zb, lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_OBJSET],
ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, ZB_ZIL_OBJECT, ZB_ZIL_LEVEL,

View File

@ -539,7 +539,7 @@ static zio_t *
zio_create(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, zio_create(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp,
void *data, uint64_t size, zio_done_func_t *done, void *private, void *data, uint64_t size, zio_done_func_t *done, void *private,
zio_type_t type, zio_priority_t priority, enum zio_flag flags, zio_type_t type, zio_priority_t priority, enum zio_flag flags,
vdev_t *vd, uint64_t offset, const zbookmark_t *zb, vdev_t *vd, uint64_t offset, const zbookmark_phys_t *zb,
enum zio_stage stage, enum zio_stage pipeline) enum zio_stage stage, enum zio_stage pipeline)
{ {
zio_t *zio; zio_t *zio;
@ -623,7 +623,7 @@ zio_create(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp,
bzero(zio->io_child_error, sizeof (int) * ZIO_CHILD_TYPES); bzero(zio->io_child_error, sizeof (int) * ZIO_CHILD_TYPES);
bzero(zio->io_children, bzero(zio->io_children,
sizeof (uint64_t) * ZIO_CHILD_TYPES * ZIO_WAIT_TYPES); sizeof (uint64_t) * ZIO_CHILD_TYPES * ZIO_WAIT_TYPES);
bzero(&zio->io_bookmark, sizeof (zbookmark_t)); bzero(&zio->io_bookmark, sizeof (zbookmark_phys_t));
zio->io_state[ZIO_WAIT_READY] = (stage >= ZIO_STAGE_READY); zio->io_state[ZIO_WAIT_READY] = (stage >= ZIO_STAGE_READY);
zio->io_state[ZIO_WAIT_DONE] = (stage >= ZIO_STAGE_DONE); zio->io_state[ZIO_WAIT_DONE] = (stage >= ZIO_STAGE_DONE);
@ -672,7 +672,7 @@ zio_root(spa_t *spa, zio_done_func_t *done, void *private, enum zio_flag flags)
zio_t * zio_t *
zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
void *data, uint64_t size, zio_done_func_t *done, void *private, void *data, uint64_t size, zio_done_func_t *done, void *private,
zio_priority_t priority, enum zio_flag flags, const zbookmark_t *zb) zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb)
{ {
zio_t *zio; zio_t *zio;
@ -690,7 +690,7 @@ zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
void *data, uint64_t size, const zio_prop_t *zp, void *data, uint64_t size, const zio_prop_t *zp,
zio_done_func_t *ready, zio_done_func_t *physdone, zio_done_func_t *done, zio_done_func_t *ready, zio_done_func_t *physdone, zio_done_func_t *done,
void *private, void *private,
zio_priority_t priority, enum zio_flag flags, const zbookmark_t *zb) zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb)
{ {
zio_t *zio; zio_t *zio;
@ -728,7 +728,7 @@ zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
zio_t * zio_t *
zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, void *data, zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, void *data,
uint64_t size, zio_done_func_t *done, void *private, uint64_t size, zio_done_func_t *done, void *private,
zio_priority_t priority, enum zio_flag flags, zbookmark_t *zb) zio_priority_t priority, enum zio_flag flags, zbookmark_phys_t *zb)
{ {
zio_t *zio; zio_t *zio;
@ -3348,8 +3348,8 @@ static zio_pipe_stage_t *zio_pipeline[] = {
/* dnp is the dnode for zb1->zb_object */ /* dnp is the dnode for zb1->zb_object */
boolean_t boolean_t
zbookmark_is_before(const dnode_phys_t *dnp, const zbookmark_t *zb1, zbookmark_is_before(const dnode_phys_t *dnp, const zbookmark_phys_t *zb1,
const zbookmark_t *zb2) const zbookmark_phys_t *zb2)
{ {
uint64_t zb1nextL0, zb2thisobj; uint64_t zb1nextL0, zb2thisobj;

View File

@ -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) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/ */
/* /*
@ -64,7 +64,7 @@ static int inject_next_id = 1;
* Returns true if the given record matches the I/O in progress. * Returns true if the given record matches the I/O in progress.
*/ */
static boolean_t static boolean_t
zio_match_handler(zbookmark_t *zb, uint64_t type, zio_match_handler(zbookmark_phys_t *zb, uint64_t type,
zinject_record_t *record, int error) zinject_record_t *record, int error)
{ {
/* /*