zio: align use of "no dump" flag between use_uma and !use_uma cases

At the moment no ZFS buffers are included into a crash dump unless
ZFS_DEBUG (or INVARIANTS) kernel option is enabled.  That's not very
helpful for debugging of ZFS problems, because important information
often resides in metadata buffers.
This change switches the dumping behavior when UMA is used from the
illumos behavior to a more useful behavior that we have on FreeBSD
when ZFS buffers are allocated via malloc.

Reviewed by:	smh, mav
MFC after:	3 weeks
Differential Revision: https://reviews.freebsd.org/D5892
This commit is contained in:
Andriy Gapon 2016-04-11 07:11:20 +00:00
parent e331206e0f
commit 1da2e1e353

View File

@ -128,11 +128,13 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, sync_pass_rewrite, CTLFLAG_RDTUN,
boolean_t zio_requeue_io_start_cut_in_line = B_TRUE;
#ifdef illumos
#ifdef ZFS_DEBUG
int zio_buf_debug_limit = 16384;
#else
int zio_buf_debug_limit = 0;
#endif
#endif
void
zio_init(void)
@ -154,7 +156,7 @@ zio_init(void)
size_t size = (c + 1) << SPA_MINBLOCKSHIFT;
size_t p2 = size;
size_t align = 0;
size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0;
int cflags = zio_exclude_metadata ? KMC_NODEBUG : 0;
while (!ISP2(p2))
p2 &= p2 - 1;