mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 04:07:45 +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:
@@ -365,7 +365,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uint64_t dsobj, void *tag,
|
||||
if (ds == NULL) {
|
||||
dsl_dataset_t *winner = NULL;
|
||||
|
||||
ds = kmem_zalloc(sizeof (dsl_dataset_t), KM_PUSHPAGE);
|
||||
ds = kmem_zalloc(sizeof (dsl_dataset_t), KM_SLEEP);
|
||||
ds->ds_dbuf = dbuf;
|
||||
ds->ds_object = dsobj;
|
||||
ds->ds_phys = dbuf->db_data;
|
||||
@@ -1772,9 +1772,9 @@ dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx)
|
||||
}
|
||||
|
||||
/* must not have any bookmarks after the most recent snapshot */
|
||||
VERIFY0(nvlist_alloc(&proprequest, NV_UNIQUE_NAME, KM_PUSHPAGE));
|
||||
proprequest = fnvlist_alloc();
|
||||
fnvlist_add_boolean(proprequest, zfs_prop_to_name(ZFS_PROP_CREATETXG));
|
||||
VERIFY0(nvlist_alloc(&bookmarks, NV_UNIQUE_NAME, KM_PUSHPAGE));
|
||||
bookmarks = fnvlist_alloc();
|
||||
error = dsl_get_bookmarks_impl(ds, proprequest, bookmarks);
|
||||
fnvlist_free(proprequest);
|
||||
if (error != 0)
|
||||
@@ -2262,7 +2262,7 @@ snaplist_make(dsl_pool_t *dp,
|
||||
if (first_obj == 0)
|
||||
first_obj = ds->ds_dir->dd_phys->dd_origin_obj;
|
||||
|
||||
snap = kmem_alloc(sizeof (*snap), KM_PUSHPAGE);
|
||||
snap = kmem_alloc(sizeof (*snap), KM_SLEEP);
|
||||
snap->ds = ds;
|
||||
list_insert_tail(l, snap);
|
||||
obj = ds->ds_phys->ds_prev_snap_obj;
|
||||
|
||||
Reference in New Issue
Block a user