Re: Ext2 fs
Mon, 1 Apr 96 23:12 BST


On Sun, 31 Mar 1996 23:22:54 +4200 (CST), balaji
<> said:

> Hi I have a few doubts regarding reading and writing to disk...
> When we use fread/fwrite (or read/write) does it automatically use DMA.

That is completely unconnected with the filesystem. The filesystem
just passes the requests down to the appropriate device driver, which
will indeed use DMA if appropriate. DMA is used for triton-chipset
EIDE transfers and for SCSI disk, and also for floppies; it is not
used for normal [E]IDE interfaces.

> Another question is that in kernels 1.3.24 the read for the ext2
> file system is a specific routine ext2_read where as in 1.3.62
> onwards it just says generic_file_read . why this change?? and where
> is the source for generic_file_read??

The kernel was changed so that there is a new way of accessing
filesystem data optimised for better performance. The code is in
linux/mm/filemap.c. Now, most filesystems share the same generic file
read code. This general function simply dispatches a series of
block device transfer requests based on the appropriate filesystem
block numbers, as returned by inode->i_op->bmap().


Stephen Tweedie <>
Department of Computer Science, Edinburgh University, Scotland.