Re: bmap() and return(0)

Miquel van Smoorenburg (miquels@cistron.nl)
11 Apr 1998 18:06:24 +0200


Follow-up to myself:

In article <6gm0s6$e95$1@defiant.cistron.nl>,
Miquel van Smoorenburg <miquels@cistron.nl> wrote:
>The bmap() function in any fs returns zero to indicate a block was not
>present (i.e. map the zero page instead).
>
>I am writing a small filesystem that maps partitions on a disk directly
>to files (so I can let inn-cnfs mmap() partitions directly..). It works
>fine, but I cannot read block 0.

I fixed it by implementing the readpage function in the FS instead of
using generic_readpage, and now it actually works fine. Only problem is
that a standard kernel doesn't export brw_page() in ksyms.c, but I can
live with that..

Now off to implementing mmap() on block devices directly just for fun :)

Mike.

-- 
 Miquel van Smoorenburg | Our vision is to speed up time,
    miquels@cistron.nl  |   eventually eliminating it.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu