svn commit: r268119 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb vendor/illumos/dist/lib/libzfs/common
Xin LI
delphij at FreeBSD.org
Tue Jul 1 21:14:37 UTC 2014
Author: delphij
Date: Tue Jul 1 21:14:35 2014
New Revision: 268119
URL: http://svnweb.freebsd.org/changeset/base/268119
Log:
4914 zfs on-disk bookmark structure should be named *_phys_t
Reviewed by: George Wilson <george.wilson at delphix.com>
Reviewed by: Christopher Siden <christopher.siden at delphix.com>
Reviewed by: Richard Lowe <richlowe at richlowe.net>
Reviewed by: Saso Kiselkov <skiselkov.ml at gmail.com>
Approved by: Robert Mustacchi <rm at joyent.com>
illumos/illumos-gate at 7802d7bf98dec568dadf72286893b1fe5abd8602
Modified:
vendor/illumos/dist/cmd/zdb/zdb.c
vendor/illumos/dist/cmd/zdb/zdb_il.c
vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c
Changes in other areas also in this revision:
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
vendor-sys/illumos/dist/uts/common/fs/zfs/spa_errlog.c
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/bptree.h
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_traverse.h
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_scan.h
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h
vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c
vendor-sys/illumos/dist/uts/common/fs/zfs/zio_inject.c
vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c
Modified: vendor/illumos/dist/cmd/zdb/zdb.c
==============================================================================
--- vendor/illumos/dist/cmd/zdb/zdb.c Tue Jul 1 21:12:48 2014 (r268118)
+++ vendor/illumos/dist/cmd/zdb/zdb.c Tue Jul 1 21:14:35 2014 (r268119)
@@ -21,7 +21,7 @@
/*
* 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>
@@ -1008,7 +1008,8 @@ dump_dnode(objset_t *os, uint64_t object
}
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) {
ASSERT(zb->zb_level < 0);
@@ -1070,7 +1071,7 @@ snprintf_blkptr_compact(char *blkbuf, si
}
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)
{
char blkbuf[BP_SPRINTF_LEN];
@@ -1099,7 +1100,7 @@ print_indirect(blkptr_t *bp, const zbook
static int
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;
@@ -1125,7 +1126,7 @@ visit_indirect(spa_t *spa, const dnode_p
/* recursively visit blocks below this */
cbp = buf->b_data;
for (i = 0; i < epb; i++, cbp++) {
- zbookmark_t czb;
+ zbookmark_phys_t czb;
SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object,
zb->zb_level - 1,
@@ -1149,7 +1150,7 @@ dump_indirect(dnode_t *dn)
{
dnode_phys_t *dnp = dn->dn_phys;
int j;
- zbookmark_t czb;
+ zbookmark_phys_t czb;
(void) printf("Indirect blocks:\n");
@@ -2220,7 +2221,7 @@ zdb_blkptr_done(zio_t *zio)
blkptr_t *bp = zio->io_bp;
int ioerr = zio->io_error;
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);
@@ -2254,7 +2255,7 @@ zdb_blkptr_done(zio_t *zio)
static int
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;
dmu_object_type_t type;
@@ -2718,7 +2719,7 @@ typedef struct zdb_ddt_entry {
/* ARGSUSED */
static int
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_index_t where;
Modified: vendor/illumos/dist/cmd/zdb/zdb_il.c
==============================================================================
--- vendor/illumos/dist/cmd/zdb/zdb_il.c Tue Jul 1 21:12:48 2014 (r268118)
+++ vendor/illumos/dist/cmd/zdb/zdb_il.c Tue Jul 1 21:14:35 2014 (r268119)
@@ -24,7 +24,7 @@
*/
/*
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/
/*
@@ -122,7 +122,7 @@ zil_prt_rec_write(zilog_t *zilog, int tx
{
char *data, *dlimit;
blkptr_t *bp = &lr->lr_blkptr;
- zbookmark_t zb;
+ zbookmark_phys_t zb;
char buf[SPA_MAXBLOCKSIZE];
int verbose = MAX(dump_opt['d'], dump_opt['i']);
int error;
Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c
==============================================================================
--- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Tue Jul 1 21:12:48 2014 (r268118)
+++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Tue Jul 1 21:14:35 2014 (r268119)
@@ -22,7 +22,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. 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, Joyent, Inc. All rights reserved.
*/
@@ -3451,7 +3451,7 @@ zpool_vdev_name(libzfs_handle_t *hdl, zp
static int
zbookmark_compare(const void *a, const void *b)
{
- return (memcmp(a, b, sizeof (zbookmark_t)));
+ return (memcmp(a, b, sizeof (zbookmark_phys_t)));
}
/*
@@ -3463,7 +3463,7 @@ zpool_get_errlog(zpool_handle_t *zhp, nv
{
zfs_cmd_t zc = { 0 };
uint64_t count;
- zbookmark_t *zb = NULL;
+ zbookmark_phys_t *zb = NULL;
int i;
/*
@@ -3476,7 +3476,7 @@ zpool_get_errlog(zpool_handle_t *zhp, nv
if (count == 0)
return (0);
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);
zc.zc_nvlist_dst_size = count;
(void) strcpy(zc.zc_name, zhp->zpool_name);
@@ -3485,11 +3485,14 @@ zpool_get_errlog(zpool_handle_t *zhp, nv
&zc) != 0) {
free((void *)(uintptr_t)zc.zc_nvlist_dst);
if (errno == ENOMEM) {
+ void *dst;
+
count = zc.zc_nvlist_dst_size;
- if ((zc.zc_nvlist_dst = (uintptr_t)
- zfs_alloc(zhp->zpool_hdl, count *
- sizeof (zbookmark_t))) == (uintptr_t)NULL)
+ dst = zfs_alloc(zhp->zpool_hdl, count *
+ sizeof (zbookmark_phys_t));
+ if (dst == NULL)
return (-1);
+ zc.zc_nvlist_dst = (uintptr_t)dst;
} else {
return (-1);
}
@@ -3505,11 +3508,11 @@ zpool_get_errlog(zpool_handle_t *zhp, nv
* _not_ copied as part of the process. So we point the start of our
* 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;
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);
More information about the svn-src-vendor
mailing list