]> git.proxmox.com Git - mirror_zfs.git/commit
Restrict short block cloning requests
authorAlexander Motin <mav@FreeBSD.org>
Fri, 29 Sep 2023 15:22:46 +0000 (11:22 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 3 Oct 2023 16:06:07 +0000 (09:06 -0700)
commit3079bf2e6c0733b9bccac573324871f49dd6d503
treef0532a2838e0eb176e9d069ce1d8ab03e3399763
parentb34bf2d5f6158c8ebeb47687a3fb7a2d3cc3aea7
Restrict short block cloning requests

If we are copying only one block and it is smaller than recordsize
property, do not allow destination to grow beyond one block if it
is not there yet.  Otherwise the destination will get stuck with
that block size forever, that can be as small as 512 bytes, no
matter how big the destination grow later.

Reviewed-by: Kay Pedersen <mail@mkwg.de>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15321
module/zfs/zfs_vnops.c