Skip to content

Commit

Permalink
Fix several new KM_SLEEP warnings
Browse files Browse the repository at this point in the history
A handful of allocations now occur in the sync path and need
to use KM_PUSHPAGE.  These were introduced by commit 13fe019.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#1746
Issue openzfs#1737
  • Loading branch information
dweeezil authored and ryao committed Oct 2, 2013
1 parent 42bd5c6 commit dea9dfe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions module/zfs/dsl_userhold.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void
dsl_register_onexit_hold_cleanup(dsl_dataset_t *ds, const char *htag,
minor_t minor)
{
zfs_hold_cleanup_arg_t *ca = kmem_alloc(sizeof (*ca), KM_SLEEP);
zfs_hold_cleanup_arg_t *ca = kmem_alloc(sizeof (*ca), KM_PUSHPAGE);
spa_t *spa = dsl_dataset_get_spa(ds);
(void) strlcpy(ca->zhca_spaname, spa_name(spa),
sizeof (ca->zhca_spaname));
Expand Down Expand Up @@ -520,7 +520,7 @@ dsl_dataset_get_holds(const char *dsname, nvlist_t *nvl)
zap_attribute_t *za;
zap_cursor_t zc;

za = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP);
za = kmem_alloc(sizeof (zap_attribute_t), KM_PUSHPAGE);
for (zap_cursor_init(&zc, ds->ds_dir->dd_pool->dp_meta_objset,
ds->ds_phys->ds_userrefs_obj);
zap_cursor_retrieve(&zc, za) == 0;
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/rrwlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ rrn_add(rrwlock_t *rrl, void *tag)
{
rrw_node_t *rn;

rn = kmem_alloc(sizeof (*rn), KM_SLEEP);
rn = kmem_alloc(sizeof (*rn), KM_PUSHPAGE);
rn->rn_rrl = rrl;
rn->rn_next = tsd_get(rrw_tsd_key);
rn->rn_tag = tag;
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/zfs_onexit.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ zfs_onexit_add_cb(minor_t minor, void (*func)(void *), void *data,
if (error)
return (error);

ap = kmem_alloc(sizeof (zfs_onexit_action_node_t), KM_SLEEP);
ap = kmem_alloc(sizeof (zfs_onexit_action_node_t), KM_PUSHPAGE);
list_link_init(&ap->za_link);
ap->za_func = func;
ap->za_data = data;
Expand Down

0 comments on commit dea9dfe

Please sign in to comment.