bmap() and return(0)

Miquel van Smoorenburg (miquels@cistron.nl)
10 Apr 1998 22:53:26 +0200


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.

As bmap() returns an int, would it be reasonable to fix the various
filesystems etc. to return the following instead:

#define BMAP_ZEROPAGE (-1)
#define BMAP_ERROR (-2)

Or is there a better solution (extra argument?)

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