Opened 16 years ago

Closed 15 years ago

#2889 closed bug (fixed)

ext3: can read first megabyte only

Reported by: Adek336 Owned by: axeld
Priority: high Milestone: R1/alpha1
Component: File Systems/ext2 Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I have an ext3 partition. Linux can access all files. On Haiku I can access most of the files. However there are files, which I can access only the first megabyte - at least when I'm trying to copy the mentioned file, it copies only 1 MiB.

Even if use Linux to copy the file to the root directory of the mentioned partition and give it some simple filename, under Haiku I still can only access the first 1 MiB.

If I create a new file of more than 1 MiB size on the partition, create an empty or a small file, they all can be fully read under Haiku. If I copy a large file which was accessible under Haiku all the time to the root dir of the partition, it can be read under Haiku as well.

Change History (6)

comment:1 by Adek336, 15 years ago

All the affected files are sparse.

Under Linux, given a not-all-zeroes file "some-file", one can create an all-zeroes sparse file "test-file-1", a file "test-file-2" with non-zero data at the end and "sparse-file" with some non-zero data in the middle and at the end with

dd if=/dev/zero of=test-file-1 bs=1 count=0 seek=5M

dd if=some-file of=test-file-2 bs=1 count=123 seek=2030G

dd if=some-file of=sparse-file bs=1 count=4421 seek=100k
dd if=some-file of=sparse-file bs=1 count=764 seek=300k

Haiku's ext2/3 module doesn't properly treat sparse files at the moment.

comment:2 by axeld, 15 years ago

Component: - GeneralFile Systems/ext2
Milestone: R1R1/alpha1
Priority: normalhigh

That's very helpful, thanks!

comment:3 by Adek336, 15 years ago

Actually I found out that my sparse files do not bring any valuable content, I think giving an error message (and doing it before having copyied 1 MiB of trash - which is how it works atm; I was even able to produce a KDL when viewing 200Gb sparse file in diskprobe) would suffice.

comment:4 by axeld, 15 years ago

Status: newassigned

This should be fixed in hrev28648 which adds sparse file support, please confirm.

comment:5 by Adek336, 15 years ago

It doesn't work: I can see my whole ext3 partition through a sparse file :-)

comment:6 by axeld, 15 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev29339, this time for real (I've filled my test image with random data before to make sure I'm not fooled this time) :-)

Note: See TracTickets for help on using tickets.