summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorCampbell Suter <campbell@snapit.group>2020-11-23 05:40:03 +0300
committerTom Rini <trini@konsulko.com>2021-01-20 22:01:44 +0300
commit9dba07f14304612ed4ee6d827898aa0cb55d4e26 (patch)
tree993e262d50a903b112a025f4e5d169407476fa81 /fs/btrfs/disk-io.c
parent3b72612ad191cad29aad3982221ff3355bec798d (diff)
downloadu-boot-9dba07f14304612ed4ee6d827898aa0cb55d4e26.tar.xz
Fix squashfs failing to load sparse files
SquashFS supports sprase blocks in files - that is, if a given block is composed only of zeros, it's not written to the output file to save space and it's on-disk length field is set to zero to indicate that. Previously the squashfs driver did not recognise that, and would attempt to read and decompress a zero-sized block, which obviously failed. The following command may be used to create a file for testing: cat <(dd if=/dev/urandom of=/dev/stdout bs=1M count=1) \ <(dd if=/dev/zero of=/dev/stdout bs=1M count=1) \ <(dd if=/dev/urandom of=/dev/stdout bs=1k count=200) >test_file Signed-off-by: Campbell Suter <campbell@snapit.group>
Diffstat (limited to 'fs/btrfs/disk-io.c')
0 files changed, 0 insertions, 0 deletions