Prevent snapshot_check to initiate I/O during memory allocation.
Signed-off-by: Massimo Maggi <massimo@mmmm.it>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1023
if (strlen(sn->htag) + MAX_TAG_PREFIX_LEN >= MAXNAMELEN)
return (E2BIG);
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;
}
sn->ha->temphold = B_TRUE;
sn->ha->htag = sn->htag;
}