]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
punch-alternating: prevent punching all extents
authorCarlos Maiolino <cem@kernel.org>
Sun, 21 Dec 2025 10:24:50 +0000 (11:24 +0100)
committerZorro Lang <zlang@kernel.org>
Wed, 31 Dec 2025 18:47:37 +0000 (02:47 +0800)
commitffd562ecf44aff10b74c35c6f961614db5198ca9
treeb843fdd8d22af91a26a227c0ec72cc30b310fb96
parentdf16c93a89d3a2f47cacf75c52c3d46a4fb06b93
punch-alternating: prevent punching all extents

If by any chance the punch size is >= the interval, we end up punching
everything, zeroing out the file.

As this is not a tool to dealloc the whole file, so force the user to
pass a configuration that won't cause it to happen.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
src/punch-alternating.c