zfs_clone_range: use vmem_malloc for large allocation
Just silencing the warning about large allocations. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Kay Pedersen <mail@mkwg.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Sponsored-By: OpenDrives Inc. Sponsored-By: Klara Inc. Closes #15050
This commit is contained in:
parent
2cb992a99c
commit
8d21c002c6
|
@ -1212,7 +1212,7 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
||||||
gid = KGID_TO_SGID(ZTOGID(outzp));
|
gid = KGID_TO_SGID(ZTOGID(outzp));
|
||||||
projid = outzp->z_projid;
|
projid = outzp->z_projid;
|
||||||
|
|
||||||
bps = kmem_alloc(sizeof (bps[0]) * maxblocks, KM_SLEEP);
|
bps = vmem_alloc(sizeof (bps[0]) * maxblocks, KM_SLEEP);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clone the file in reasonable size chunks. Each chunk is cloned
|
* Clone the file in reasonable size chunks. Each chunk is cloned
|
||||||
|
@ -1330,7 +1330,7 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
||||||
done += size;
|
done += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
kmem_free(bps, sizeof (bps[0]) * maxblocks);
|
vmem_free(bps, sizeof (bps[0]) * maxblocks);
|
||||||
zfs_znode_update_vfs(outzp);
|
zfs_znode_update_vfs(outzp);
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
|
|
Loading…
Reference in New Issue