chore(model): slightly improve handling of pulling empty blocks (#10679)

In the common case (sparse files enabled, not reusing old data) we'd
optimise away pulling & writing zero blocks. However in the corner cases
we'd go through the whole processing of pulling the block over the
network which is of course entirely unnecessary.

Now, instead, always take an optimised path for all-zeroes blocks. In
the clean case we do nothing, otherwise we materialise a block of zeroes
and write it directly.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-05-09 12:15:18 +02:00
committed by GitHub
parent 3709174a86
commit f538b47070
3 changed files with 102 additions and 7 deletions
+3
View File
@@ -76,6 +76,9 @@ linters:
# Don't necessarily rewrite !(foo || bar) to !foo && !bar
- linters: [staticcheck]
text: QF1001
# Don't necessarily pass the context just for the sake of the logger
- linters: [contextcheck]
text: "->log`"
settings:
sloglint:
context: "scope"