mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04: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:
@@ -182,7 +182,7 @@ zfs_create_share_dir(zfs_sb_t *zsb, dmu_tx_t *tx)
|
||||
vattr.va_uid = crgetuid(kcred);
|
||||
vattr.va_gid = crgetgid(kcred);
|
||||
|
||||
sharezp = kmem_cache_alloc(znode_cache, KM_PUSHPAGE);
|
||||
sharezp = kmem_cache_alloc(znode_cache, KM_SLEEP);
|
||||
sharezp->z_moved = 0;
|
||||
sharezp->z_unlinked = 0;
|
||||
sharezp->z_atime_dirty = 0;
|
||||
@@ -256,7 +256,7 @@ zfs_inode_alloc(struct super_block *sb, struct inode **ip)
|
||||
{
|
||||
znode_t *zp;
|
||||
|
||||
zp = kmem_cache_alloc(znode_cache, KM_PUSHPAGE);
|
||||
zp = kmem_cache_alloc(znode_cache, KM_SLEEP);
|
||||
*ip = ZTOI(zp);
|
||||
|
||||
return (0);
|
||||
@@ -682,7 +682,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr,
|
||||
* order for DMU_OT_ZNODE is critical since it needs to be constructed
|
||||
* in the old znode_phys_t format. Don't change this ordering
|
||||
*/
|
||||
sa_attrs = kmem_alloc(sizeof (sa_bulk_attr_t) * ZPL_END, KM_PUSHPAGE);
|
||||
sa_attrs = kmem_alloc(sizeof (sa_bulk_attr_t) * ZPL_END, KM_SLEEP);
|
||||
|
||||
if (obj_type == DMU_OT_ZNODE) {
|
||||
SA_ADD_BULK_ATTR(sa_attrs, cnt, SA_ZPL_ATIME(zsb),
|
||||
@@ -1696,13 +1696,13 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
|
||||
vattr.va_uid = crgetuid(cr);
|
||||
vattr.va_gid = crgetgid(cr);
|
||||
|
||||
rootzp = kmem_cache_alloc(znode_cache, KM_PUSHPAGE);
|
||||
rootzp = kmem_cache_alloc(znode_cache, KM_SLEEP);
|
||||
rootzp->z_moved = 0;
|
||||
rootzp->z_unlinked = 0;
|
||||
rootzp->z_atime_dirty = 0;
|
||||
rootzp->z_is_sa = USE_SA(version, os);
|
||||
|
||||
zsb = kmem_zalloc(sizeof (zfs_sb_t), KM_PUSHPAGE);
|
||||
zsb = kmem_zalloc(sizeof (zfs_sb_t), KM_SLEEP);
|
||||
zsb->z_os = os;
|
||||
zsb->z_parent = zsb;
|
||||
zsb->z_version = version;
|
||||
@@ -1710,7 +1710,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
|
||||
zsb->z_use_sa = USE_SA(version, os);
|
||||
zsb->z_norm = norm;
|
||||
|
||||
sb = kmem_zalloc(sizeof (struct super_block), KM_PUSHPAGE);
|
||||
sb = kmem_zalloc(sizeof (struct super_block), KM_SLEEP);
|
||||
sb->s_fs_info = zsb;
|
||||
|
||||
ZTOI(rootzp)->i_sb = sb;
|
||||
|
||||
Reference in New Issue
Block a user