mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
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
b9aa32ff39
commit
7698503dca
@ -1212,7 +1212,7 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
||||
gid = KGID_TO_SGID(ZTOGID(outzp));
|
||||
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
|
||||
@ -1330,7 +1330,7 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
||||
done += size;
|
||||
}
|
||||
|
||||
kmem_free(bps, sizeof (bps[0]) * maxblocks);
|
||||
vmem_free(bps, sizeof (bps[0]) * maxblocks);
|
||||
zfs_znode_update_vfs(outzp);
|
||||
|
||||
unlock:
|
||||
|
Loading…
Reference in New Issue
Block a user