From b02fe35d3743c92e26f4158938e94093a2309a92 Mon Sep 17 00:00:00 2001 From: Alex Reece Date: Tue, 23 Sep 2014 01:42:03 +0200 Subject: Illumos 4958 zdb trips assert on pools with ashift >= 0xe 4958 zdb trips assert on pools with ashift >= 0xe Reviewed by: Matthew Ahrens Reviewed by: Max Grossman Reviewed by: George Wilson Reviewed by: Christopher Siden Approved by: Garrett D'Amore References: https://www.illumos.org/issues/4958 https://github.com/illumos/illumos-gate/commit/2a104a5 Porting notes: Keep the ZIO_FLAG_FASTWRITE define. This is for a feature present in Linux but not yet in *BSD. Ported by: Turbo Fredriksson Signed-off-by: Brian Behlendorf Closes #2697 --- include/sys/vdev_impl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/sys/vdev_impl.h') diff --git a/include/sys/vdev_impl.h b/include/sys/vdev_impl.h index 16fcaa042..c0c8f5287 100644 --- a/include/sys/vdev_impl.h +++ b/include/sys/vdev_impl.h @@ -20,7 +20,7 @@ */ /* * 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. */ #ifndef _SYS_VDEV_IMPL_H @@ -239,8 +239,11 @@ struct vdev { #define VDEV_PHYS_SIZE (112 << 10) #define VDEV_UBERBLOCK_RING (128 << 10) +/* The largest uberblock we support is 8k. */ +#define MAX_UBERBLOCK_SHIFT (13) #define VDEV_UBERBLOCK_SHIFT(vd) \ - MAX((vd)->vdev_top->vdev_ashift, UBERBLOCK_SHIFT) + MIN(MAX((vd)->vdev_top->vdev_ashift, UBERBLOCK_SHIFT), \ + MAX_UBERBLOCK_SHIFT) #define VDEV_UBERBLOCK_COUNT(vd) \ (VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT(vd)) #define VDEV_UBERBLOCK_OFFSET(vd, n) \ -- cgit v1.2.3