]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Restrict short block cloning requests
authorAlexander Motin <mav@FreeBSD.org>
Fri, 29 Sep 2023 15:22:46 +0000 (11:22 -0400)
committerGitHub <noreply@github.com>
Fri, 29 Sep 2023 15:22:46 +0000 (08:22 -0700)
commite13538856479ff79ca6642e53dddf8a593deb2c9
tree47a505537533bc019bdbd56e48916d50067eb268
parentf9c39dc862768df4891a4437dcba5dc26d3b1e5f
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