From fe3cca82ae88f7bd49fccea5296a8bb1b7d3f4cb Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 14:35:02 -0700 Subject: [PATCH] Support KM_NODEBUG kmem flag. It turns out the zil allocates quite large buffers. This isn't all the surprising but we need to suppress the warnings until it's clear what to do about it. --- lib/libzpool/include/sys/zfs_context.h | 1 + module/zfs/zil.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libzpool/include/sys/zfs_context.h b/lib/libzpool/include/sys/zfs_context.h index 5662255875..a8291872cd 100644 --- a/lib/libzpool/include/sys/zfs_context.h +++ b/lib/libzpool/include/sys/zfs_context.h @@ -321,6 +321,7 @@ extern void kstat_delete(kstat_t *); #define KM_SLEEP UMEM_NOFAIL #define KM_PUSHPAGE KM_SLEEP #define KM_NOSLEEP UMEM_DEFAULT +#define KM_NODEBUG 0x0 #define KMC_NODEBUG UMC_NODEBUG #define kmem_alloc(_s, _f) umem_alloc(_s, _f) #define kmem_zalloc(_s, _f) umem_zalloc(_s, _f) diff --git a/module/zfs/zil.c b/module/zfs/zil.c index db3822f5a8..605a981e86 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -953,7 +953,7 @@ zil_itx_create(uint64_t txtype, size_t lrsize) lrsize = P2ROUNDUP_TYPED(lrsize, sizeof (uint64_t), size_t); - itx = kmem_alloc(offsetof(itx_t, itx_lr) + lrsize, KM_SLEEP); + itx = kmem_alloc(offsetof(itx_t, itx_lr)+lrsize, KM_SLEEP|KM_NODEBUG); itx->itx_lr.lrc_txtype = txtype; itx->itx_lr.lrc_reclen = lrsize; itx->itx_sod = lrsize; /* if write & WR_NEED_COPY will be increased */