mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Illumos 4958 zdb trips assert on pools with ashift >= 0xe
4958 zdb trips assert on pools with ashift >= 0xe Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Max Grossman <max.grossman@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org> 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 <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2697
This commit is contained in:
committed by
Brian Behlendorf
parent
adc90e9d94
commit
b02fe35d37
@@ -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) \
|
||||
|
||||
+24
-23
@@ -167,19 +167,20 @@ enum zio_flag {
|
||||
ZIO_FLAG_RESILVER = 1 << 3,
|
||||
ZIO_FLAG_SCRUB = 1 << 4,
|
||||
ZIO_FLAG_SCAN_THREAD = 1 << 5,
|
||||
ZIO_FLAG_PHYSICAL = 1 << 6,
|
||||
|
||||
#define ZIO_FLAG_AGG_INHERIT (ZIO_FLAG_CANFAIL - 1)
|
||||
|
||||
/*
|
||||
* Flags inherited by ddt, gang, and vdev children.
|
||||
*/
|
||||
ZIO_FLAG_CANFAIL = 1 << 6, /* must be first for INHERIT */
|
||||
ZIO_FLAG_SPECULATIVE = 1 << 7,
|
||||
ZIO_FLAG_CONFIG_WRITER = 1 << 8,
|
||||
ZIO_FLAG_DONT_RETRY = 1 << 9,
|
||||
ZIO_FLAG_DONT_CACHE = 1 << 10,
|
||||
ZIO_FLAG_NODATA = 1 << 11,
|
||||
ZIO_FLAG_INDUCE_DAMAGE = 1 << 12,
|
||||
ZIO_FLAG_CANFAIL = 1 << 7, /* must be first for INHERIT */
|
||||
ZIO_FLAG_SPECULATIVE = 1 << 8,
|
||||
ZIO_FLAG_CONFIG_WRITER = 1 << 9,
|
||||
ZIO_FLAG_DONT_RETRY = 1 << 10,
|
||||
ZIO_FLAG_DONT_CACHE = 1 << 11,
|
||||
ZIO_FLAG_NODATA = 1 << 12,
|
||||
ZIO_FLAG_INDUCE_DAMAGE = 1 << 13,
|
||||
|
||||
#define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1)
|
||||
#define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1)
|
||||
@@ -187,28 +188,28 @@ enum zio_flag {
|
||||
/*
|
||||
* Flags inherited by vdev children.
|
||||
*/
|
||||
ZIO_FLAG_IO_RETRY = 1 << 13, /* must be first for INHERIT */
|
||||
ZIO_FLAG_PROBE = 1 << 14,
|
||||
ZIO_FLAG_TRYHARD = 1 << 15,
|
||||
ZIO_FLAG_OPTIONAL = 1 << 16,
|
||||
ZIO_FLAG_IO_RETRY = 1 << 14, /* must be first for INHERIT */
|
||||
ZIO_FLAG_PROBE = 1 << 15,
|
||||
ZIO_FLAG_TRYHARD = 1 << 16,
|
||||
ZIO_FLAG_OPTIONAL = 1 << 17,
|
||||
|
||||
#define ZIO_FLAG_VDEV_INHERIT (ZIO_FLAG_DONT_QUEUE - 1)
|
||||
|
||||
/*
|
||||
* Flags not inherited by any children.
|
||||
*/
|
||||
ZIO_FLAG_DONT_QUEUE = 1 << 17, /* must be first for INHERIT */
|
||||
ZIO_FLAG_DONT_PROPAGATE = 1 << 18,
|
||||
ZIO_FLAG_IO_BYPASS = 1 << 19,
|
||||
ZIO_FLAG_IO_REWRITE = 1 << 20,
|
||||
ZIO_FLAG_RAW = 1 << 21,
|
||||
ZIO_FLAG_GANG_CHILD = 1 << 22,
|
||||
ZIO_FLAG_DDT_CHILD = 1 << 23,
|
||||
ZIO_FLAG_GODFATHER = 1 << 24,
|
||||
ZIO_FLAG_NOPWRITE = 1 << 25,
|
||||
ZIO_FLAG_REEXECUTED = 1 << 26,
|
||||
ZIO_FLAG_DELEGATED = 1 << 27,
|
||||
ZIO_FLAG_FASTWRITE = 1 << 28
|
||||
ZIO_FLAG_DONT_QUEUE = 1 << 18, /* must be first for INHERIT */
|
||||
ZIO_FLAG_DONT_PROPAGATE = 1 << 19,
|
||||
ZIO_FLAG_IO_BYPASS = 1 << 20,
|
||||
ZIO_FLAG_IO_REWRITE = 1 << 21,
|
||||
ZIO_FLAG_RAW = 1 << 22,
|
||||
ZIO_FLAG_GANG_CHILD = 1 << 23,
|
||||
ZIO_FLAG_DDT_CHILD = 1 << 24,
|
||||
ZIO_FLAG_GODFATHER = 1 << 25,
|
||||
ZIO_FLAG_NOPWRITE = 1 << 26,
|
||||
ZIO_FLAG_REEXECUTED = 1 << 27,
|
||||
ZIO_FLAG_DELEGATED = 1 << 28,
|
||||
ZIO_FLAG_FASTWRITE = 1 << 29,
|
||||
};
|
||||
|
||||
#define ZIO_FLAG_MUSTSUCCEED 0
|
||||
|
||||
Reference in New Issue
Block a user