mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 19:57:43 +03:00
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 <behlendorf1@llnl.gov>
This commit is contained in:
@@ -97,7 +97,7 @@ dsl_dir_hold_obj(dsl_pool_t *dp, uint64_t ddobj,
|
||||
if (dd == NULL) {
|
||||
dsl_dir_t *winner;
|
||||
|
||||
dd = kmem_zalloc(sizeof (dsl_dir_t), KM_PUSHPAGE);
|
||||
dd = kmem_zalloc(sizeof (dsl_dir_t), KM_SLEEP);
|
||||
dd->dd_object = ddobj;
|
||||
dd->dd_dbuf = dbuf;
|
||||
dd->dd_pool = dp;
|
||||
@@ -313,7 +313,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag,
|
||||
dsl_dir_t *dd;
|
||||
uint64_t ddobj;
|
||||
|
||||
buf = kmem_alloc(MAXNAMELEN, KM_PUSHPAGE);
|
||||
buf = kmem_alloc(MAXNAMELEN, KM_SLEEP);
|
||||
err = getcomponent(name, buf, &next);
|
||||
if (err != 0)
|
||||
goto error;
|
||||
@@ -696,7 +696,7 @@ dsl_dir_tempreserve_impl(dsl_dir_t *dd, uint64_t asize, boolean_t netfree,
|
||||
asize - ref_rsrv);
|
||||
mutex_exit(&dd->dd_lock);
|
||||
|
||||
tr = kmem_zalloc(sizeof (struct tempreserve), KM_PUSHPAGE);
|
||||
tr = kmem_zalloc(sizeof (struct tempreserve), KM_SLEEP);
|
||||
tr->tr_ds = dd;
|
||||
tr->tr_size = asize;
|
||||
list_insert_tail(tr_list, tr);
|
||||
@@ -730,7 +730,7 @@ dsl_dir_tempreserve_space(dsl_dir_t *dd, uint64_t lsize, uint64_t asize,
|
||||
return (0);
|
||||
}
|
||||
|
||||
tr_list = kmem_alloc(sizeof (list_t), KM_PUSHPAGE);
|
||||
tr_list = kmem_alloc(sizeof (list_t), KM_SLEEP);
|
||||
list_create(tr_list, sizeof (struct tempreserve),
|
||||
offsetof(struct tempreserve, tr_node));
|
||||
ASSERT3S(asize, >, 0);
|
||||
@@ -740,7 +740,7 @@ dsl_dir_tempreserve_space(dsl_dir_t *dd, uint64_t lsize, uint64_t asize,
|
||||
if (err == 0) {
|
||||
struct tempreserve *tr;
|
||||
|
||||
tr = kmem_zalloc(sizeof (struct tempreserve), KM_PUSHPAGE);
|
||||
tr = kmem_zalloc(sizeof (struct tempreserve), KM_SLEEP);
|
||||
tr->tr_size = lsize;
|
||||
list_insert_tail(tr_list, tr);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user