aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/boot/zfs/zfsimpl.h10
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c11
2 files changed, 14 insertions, 7 deletions
diff --git a/sys/cddl/boot/zfs/zfsimpl.h b/sys/cddl/boot/zfs/zfsimpl.h
index 83d964360343..c9de1fe4c391 100644
--- a/sys/cddl/boot/zfs/zfsimpl.h
+++ b/sys/cddl/boot/zfs/zfsimpl.h
@@ -536,6 +536,12 @@ typedef struct zio_gbh {
offsetof(vdev_label_t, vl_uberblock[(n) << VDEV_UBERBLOCK_SHIFT(vd)])
#define VDEV_UBERBLOCK_SIZE(vd) (1ULL << VDEV_UBERBLOCK_SHIFT(vd))
+#define ASHIFT_UBERBLOCK_SHIFT(ashift) \
+ MIN(MAX(ashift, UBERBLOCK_SHIFT), \
+ MAX_UBERBLOCK_SHIFT)
+#define ASHIFT_UBERBLOCK_SIZE(ashift) \
+ (1ULL << ASHIFT_UBERBLOCK_SHIFT(ashift))
+
typedef struct vdev_phys {
char vp_nvlist[VDEV_PHYS_SIZE - sizeof (zio_eck_t)];
zio_eck_t vp_zbt;
@@ -2015,11 +2021,11 @@ typedef struct vdev_indirect_config {
typedef struct vdev {
STAILQ_ENTRY(vdev) v_childlink; /* link in parent's child list */
- STAILQ_ENTRY(vdev) v_alllink; /* link in global vdev list */
vdev_list_t v_children; /* children of this vdev */
const char *v_name; /* vdev name */
uint64_t v_guid; /* vdev guid */
- uint64_t v_txg; /* most recent transaction */
+ uint64_t v_label; /* label instantiated from (top vdev) */
+ uint64_t v_txg; /* most recent transaction (top vdev) */
uint64_t v_id; /* index in parent */
uint64_t v_psize; /* physical device capacity */
int v_ashift; /* offset to block shift */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index 7192df200ae2..8078f3f6d4b1 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -7761,7 +7761,8 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
uintptr_t *memref = (uintptr_t *)(uintptr_t) val;
if (!DTRACE_INSCRATCHPTR(&mstate,
- (uintptr_t)memref, 2 * sizeof(uintptr_t))) {
+ (uintptr_t) memref,
+ sizeof (uintptr_t) + sizeof (size_t))) {
*flags |= CPU_DTRACE_BADADDR;
continue;
}
@@ -7773,21 +7774,21 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
* Check if the size exceeds the allocated
* buffer size.
*/
- if (size + sizeof(uintptr_t) > dp->dtdo_rtype.dtdt_size) {
+ if (size + sizeof (size_t) >
+ dp->dtdo_rtype.dtdt_size) {
/* Flag a drop! */
*flags |= CPU_DTRACE_DROP;
continue;
}
/* Store the size in the buffer first. */
- DTRACE_STORE(uintptr_t, tomax,
- valoffs, size);
+ DTRACE_STORE(size_t, tomax, valoffs, size);
/*
* Offset the buffer address to the start
* of the data.
*/
- valoffs += sizeof(uintptr_t);
+ valoffs += sizeof(size_t);
/*
* Reset to the memory address rather than