summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorChris Dunlop <[email protected]>2012-09-01 14:44:13 +1000
committerBrian Behlendorf <[email protected]>2012-09-02 10:15:49 -0700
commit20a083cbe29b5eb082c577e9c0194d036effaa59 (patch)
tree3135ce4f281b44c019bfeac7601836c7e1c6bbae /module
parentb404a3f07f430710b92a380cd24dd2d48443d2f4 (diff)
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: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #917
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dsl_scan.c10
-rw-r--r--module/zfs/fm.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c
index 07e3dec1e..453431def 100644
--- a/module/zfs/dsl_scan.c
+++ b/module/zfs/dsl_scan.c
@@ -212,7 +212,7 @@ dsl_scan_setup_sync(void *arg1, void *arg2, dmu_tx_t *tx)
if (dp->dp_blkstats == NULL) {
dp->dp_blkstats = kmem_alloc(sizeof (zfs_all_blkstats_t),
- KM_SLEEP | KM_NODEBUG);
+ KM_PUSHPAGE | KM_NODEBUG);
}
bzero(dp->dp_blkstats, sizeof (zfs_all_blkstats_t));
@@ -793,7 +793,7 @@ dsl_scan_visitbp(blkptr_t *bp, const zbookmark_t *zb,
arc_buf_t *buf = NULL;
blkptr_t *bp_toread;
- bp_toread = kmem_alloc(sizeof (blkptr_t), KM_SLEEP);
+ bp_toread = kmem_alloc(sizeof (blkptr_t), KM_PUSHPAGE);
*bp_toread = *bp;
/* ASSERT(pbuf == NULL || arc_released(pbuf)); */
@@ -1110,7 +1110,7 @@ dsl_scan_visitds(dsl_scan_t *scn, uint64_t dsobj, dmu_tx_t *tx)
dmu_buf_will_dirty(ds->ds_dbuf, tx);
dsl_scan_visit_rootbp(scn, ds, &ds->ds_phys->ds_bp, tx);
- dsname = kmem_alloc(ZFS_MAXNAMELEN, KM_SLEEP);
+ dsname = kmem_alloc(ZFS_MAXNAMELEN, KM_PUSHPAGE);
dsl_dataset_name(ds, dsname);
zfs_dbgmsg("scanned dataset %llu (%s) with min=%llu max=%llu; "
"pausing=%u",
@@ -1377,8 +1377,8 @@ dsl_scan_visit(dsl_scan_t *scn, dmu_tx_t *tx)
* bookmark so we don't think that we're still trying to resume.
*/
bzero(&scn->scn_phys.scn_bookmark, sizeof (zbookmark_t));
- zc = kmem_alloc(sizeof(zap_cursor_t), KM_SLEEP);
- za = kmem_alloc(sizeof(zap_attribute_t), KM_SLEEP);
+ zc = kmem_alloc(sizeof(zap_cursor_t), KM_PUSHPAGE);
+ za = kmem_alloc(sizeof(zap_attribute_t), KM_PUSHPAGE);
/* keep pulling things out of the zap-object-as-queue */
while (zap_cursor_init(zc, dp->dp_meta_objset,
diff --git a/module/zfs/fm.c b/module/zfs/fm.c
index b91516e7a..ce0ebe0c1 100644
--- a/module/zfs/fm.c
+++ b/module/zfs/fm.c
@@ -418,7 +418,7 @@ zfs_zevent_alloc(void)
{
zevent_t *ev;
- ev = kmem_zalloc(sizeof(zevent_t), KM_SLEEP);
+ ev = kmem_zalloc(sizeof(zevent_t), KM_PUSHPAGE);
if (ev == NULL)
return NULL;