Problems with loopback device

Hans-Joachim Widmaier (hjw@zvw.de)
Thu, 02 Jan 1997 20:44:03 +0100


In order to test my newly written mkaffs, I decided to
create a 'filesystem' using the loopback device. This
way nothing much could happen and it would be easy and
fast to look at the result by just hex-dumping it.
So I created an empty image with 'dd if=/dev/zero
of=fs.img count=1760'. Attaching this to /dev/loop0
worked, but it wasn't usable:

Dec 27 13:40:42 savong kernel: loop: block 513 not present
Dec 27 13:40:42 savong kernel: end_request: I/O error, dev 07:00, sector
1027
Dec 27 13:40:42 savong kernel: loop: block 4 not present
Dec 27 13:40:42 savong kernel: end_request: I/O error, dev 07:00, sector
8
Dec 27 13:40:42 savong kernel: loop: block 4 not present
Dec 27 13:40:42 savong kernel: end_request: I/O error, dev 07:00, sector
9
[...]

It seems as if the loopback device didn't like sparse
files. When I took 1760 blocks from a non-empty file
everything worked. Is this intended behaviour?

jbhr