2011/11/20 Ingo Weinhold <ingo_weinhold@xxxxxx>: > The data must be decompressed before adding them to the file cache. That has > to happen in the FS's io() hook. The short story is that you need to manually > satisfy the io_request with data using the write_to_io_request() function > (<drivers/io_request.h>) instead of just letting do_iterative_fd_io() do that. > > For an example you can have a look at packagefs. There the control flow > eventually ends up in PackageFile::Read(io_request*) which in turn lets the > inner classes DataWriter and IORequestOutput do the work. Due to the plugable > reader and output classes it might not be the easiest to follow, but AFAIK > it's the only FS actually doing such a thing. Virtual FSs would have to do > that too, but I believe none is using the file cache yet. Thanks for the pointer. AFAICT the btrfs module doesn't use the io() hook at the moment, while using the file cache. Should I get rid of VM file access hooks? I understand file_map is useless for compressed files because it only knows the disk length. Could it be extended to differenciate disk length and extent length? Bye, Jérôme