mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-08 03:30:46 +00:00
The current code here only works if the passed in start block is exactly the start of an offline extent. On top of that, it only will punch a single extent, ever, due to the test used after finding an extent. The reason is that we break the loop if the start isn't exactly the first block of the extent, even if the last block of the extent is within the wanted hole. With this change, it doesn't matter if the start is either part of an offline extent, or a hole, and, we can punch holes that encompass multiple extents separated by holes, punching all of them away. Signed-off-by: Auke Kok <auke.kok@versity.com>