Re: Inodes and bufferheads

Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Fri, 21 Aug 1998 01:01:06 +0200


> Is there any limit on the size of the buffer ? My machine has 48megs
The size of buffer is equal to the size of block on the device.
> What if the data was read thru buffer and later requested
> to be mmaped ? Would this incur access to disk ? Will the data be
> moved from the buffer to the page ?
OK. I haven't read the mmap code but as far as I know the data won't be read from disk...
They will be copied from buffer.
> And - is there an easy way(read kernel function) to find out the blocks
> the page contains ? I have the size, the inode and the offset.
I'm not sure if it's what you want, but there is a bmap function in linux/fs/inode.c
which will return a block number for block-offset in file...

Have a nice day (and hacking)

Honza

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html