aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zvol.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-11-20 19:09:39 -0500
committerBrian Behlendorf <[email protected]>2015-01-16 14:41:26 -0800
commit79c76d5b65b19a602d4c7a340da7bf90d4a0c4f8 (patch)
tree4a8b04dd1657e396d4a04f72364d9157dec0b178 /module/zfs/zvol.c
parentefcd79a883caddea4a20bfc771da31ecc6ce4ca2 (diff)
Change KM_PUSHPAGE -> KM_SLEEP
By marking DMU transaction processing contexts with PF_FSTRANS we can revert the KM_PUSHPAGE -> KM_SLEEP changes. This brings us back in line with upstream. In some cases this means simply swapping the flags back. For others fnvlist_alloc() was replaced by nvlist_alloc(..., KM_PUSHPAGE) and must be reverted back to fnvlist_alloc() which assumes KM_SLEEP. The one place KM_PUSHPAGE is kept is when allocating ARC buffers which allows us to dip in to reserved memory. This is again the same as upstream. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/zvol.c')
-rw-r--r--module/zfs/zvol.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index ddaf520a2..6a84c8ad9 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -825,7 +825,7 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
ASSERT(zio != NULL);
ASSERT(size != 0);
- zgd = (zgd_t *)kmem_zalloc(sizeof (zgd_t), KM_PUSHPAGE);
+ zgd = (zgd_t *)kmem_zalloc(sizeof (zgd_t), KM_SLEEP);
zgd->zgd_zilog = zv->zv_zilog;
zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, RL_READER);
@@ -1234,7 +1234,7 @@ zvol_alloc(dev_t dev, const char *name)
zvol_state_t *zv;
int error = 0;
- zv = kmem_zalloc(sizeof (zvol_state_t), KM_PUSHPAGE);
+ zv = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP);
spin_lock_init(&zv->zv_lock);
list_link_init(&zv->zv_next);
@@ -1314,7 +1314,7 @@ __zvol_snapdev_hidden(const char *name)
char *atp;
int error = 0;
- parent = kmem_alloc(MAXPATHLEN, KM_PUSHPAGE);
+ parent = kmem_alloc(MAXPATHLEN, KM_SLEEP);
(void) strlcpy(parent, name, MAXPATHLEN);
if ((atp = strrchr(parent, '@')) != NULL) {
@@ -1353,7 +1353,7 @@ __zvol_create_minor(const char *name, boolean_t ignore_snapdev)
goto out;
}
- doi = kmem_alloc(sizeof (dmu_object_info_t), KM_PUSHPAGE);
+ doi = kmem_alloc(sizeof (dmu_object_info_t), KM_SLEEP);
error = dmu_objset_own(name, DMU_OST_ZVOL, B_TRUE, zvol_tag, &os);
if (error)
@@ -1565,7 +1565,7 @@ zvol_rename_minors(const char *oldname, const char *newname)
oldnamelen = strlen(oldname);
newnamelen = strlen(newname);
- name = kmem_alloc(MAXNAMELEN, KM_PUSHPAGE);
+ name = kmem_alloc(MAXNAMELEN, KM_SLEEP);
mutex_enter(&zvol_state_lock);