From: Massimo Maggi Date: Sun, 7 Oct 2012 19:54:06 +0000 (+0200) Subject: Switch KM_SLEEP to KM_PUSHPAGE X-Git-Tag: zfs-0.6.0-rc12~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=beb999445adaa6d794f0d706ca8a0c835cb1468c;p=zfs Switch KM_SLEEP to KM_PUSHPAGE Prevent snapshot_check to initiate I/O during memory allocation. Signed-off-by: Massimo Maggi Signed-off-by: Brian Behlendorf Closes #1023 --- diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index c1bc1de7b..628b23be1 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -848,7 +848,7 @@ snapshot_check(void *arg1, void *arg2, dmu_tx_t *tx) if (strlen(sn->htag) + MAX_TAG_PREFIX_LEN >= MAXNAMELEN) return (E2BIG); - sn->ha = kmem_alloc(sizeof (struct dsl_ds_holdarg), KM_SLEEP); + sn->ha = kmem_alloc(sizeof(struct dsl_ds_holdarg), KM_PUSHPAGE); sn->ha->temphold = B_TRUE; sn->ha->htag = sn->htag; }