Skip to contentSkip to conversation

PROBLEM: kernel 2.6.22 do_generic_mapping_read() hangs for no apparent reason

DISCUSSION Klaus Knopper 1 participant 1 message Jul 25, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

Sorry about the quite poor subject. I just got stuck in the debugging and cannot point to the exact location of the problem, though I am quite sure it's a kernel 2.6.22 problem, and not a "third-party-module" problem.

cloop-2.06 (block device module similar to loop.c) uses do_generic_file_read(), which is translated to do_generic_mapping_read() in mm/filemap.c, which worked fine up to and including Kernel 2.6.21.6. In Kernel 2.6.22, do_generic_file_read() blocks indefinitely with no log message at all, whenever data is read from the file and the read_actor is NOT called (i.e. parts of the file-to-be-read are probably already cached somewhere).

Unfortunately, apart from cloop, there seem to be not many drivers that still use do_generic_file_read, so maybe it's time for a rewrite anyways.

If anybody would volunteer to help debugging or rewriting cloop to work with Kernels >= 2.6.22, a lot of people developing live CDs would be very happy (including me. ;-)

cloop source code is at
http://debian-knoppix.alioth.debian.org/sources/cloop_2.06-2.tar.gz
(make cloop.ko KERNEL_DIR=/path/to/kernel/source)

With kind regards
-Klaus Knopper