From: Brian Behlendorf Date: Wed, 5 Sep 2012 02:54:20 +0000 (-0700) Subject: Switch KM_SLEEP to KM_PUSHPAGE X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=cafa9709f3271fe345b571c2feff8d2dc034ed49;p=zfs.git Switch KM_SLEEP to KM_PUSHPAGE This warning indicates the incorrect use of KM_SLEEP in a call path which must use KM_PUSHPAGE to avoid deadlocking in direct reclaim. See commit b8d06fca089fae4680c3a552fc55c512bfb02202 for additional details. SPL: Fixing allocation for task txg_sync (6093) which used GFP flags 0x297bda7c with PF_NOFS set Signed-off-by: Brian Behlendorf Issue #917 --- diff --git a/module/zfs/zap_leaf.c b/module/zfs/zap_leaf.c index b867ac4..ad21882 100644 --- a/module/zfs/zap_leaf.c +++ b/module/zfs/zap_leaf.c @@ -341,7 +341,7 @@ zap_leaf_array_match(zap_leaf_t *l, zap_name_t *zn, ASSERT(zn->zn_key_intlen == sizeof (*thiskey)); thiskey = kmem_alloc(array_numints * sizeof (*thiskey), - KM_SLEEP); + KM_PUSHPAGE); zap_leaf_array_read(l, chunk, sizeof (*thiskey), array_numints, sizeof (*thiskey), array_numints, thiskey); @@ -353,7 +353,7 @@ zap_leaf_array_match(zap_leaf_t *l, zap_name_t *zn, ASSERT(zn->zn_key_intlen == 1); if (zn->zn_matchtype == MT_FIRST) { - char *thisname = kmem_alloc(array_numints, KM_SLEEP); + char *thisname = kmem_alloc(array_numints, KM_PUSHPAGE); boolean_t match; zap_leaf_array_read(l, chunk, sizeof (char), array_numints, diff --git a/module/zfs/zap_micro.c b/module/zfs/zap_micro.c index 178ab02..d5b97da 100644 --- a/module/zfs/zap_micro.c +++ b/module/zfs/zap_micro.c @@ -202,7 +202,7 @@ zap_name_alloc(zap_t *zap, const char *key, matchtype_t mt) zap_name_t * zap_name_alloc_uint64(zap_t *zap, const uint64_t *key, int numints) { - zap_name_t *zn = kmem_alloc(sizeof (zap_name_t), KM_SLEEP); + zap_name_t *zn = kmem_alloc(sizeof (zap_name_t), KM_PUSHPAGE); ASSERT(zap->zap_normflags == 0); zn->zn_zap = zap;