Subject: Re: mfs read operations.
To: =?iso-8859-1?Q?P=E5l_Halvorsen?= <email@example.com>
From: Wojciech Puchar <firstname.lastname@example.org>
Date: 07/22/2001 09:57:35
> Where can I find the code for mfs?
/usr/src/sys/ufs & /usr/sys/sys/ufs/mfs
if you like to improve it don't forget to add memory freeing when file is
> > Basically, MFS is really just FFS (seriously, it uses all of the FFS
> > file system code), but merely provides a different backing store for
> > that FFS -- instead of a disk, it uses the address space of a process.
> OK, I knew this, but where is the code that calls the mfs to copy data
> into the buf structure's data area - i have a monitor in bio_read() called
> from ffs_read (READ() in ufs_readwite.c) --??? I'm sitting remote and
> cant check the code-- and it looks like VOP_STRATEGY is not called.
> I might put another monitor here...
> > When I/O to that backing store is to be done, it queues the buffer, wakes
> > up the process holding the MFS backing store, which then performs a copyin/
> > copyout from the process's user address space to the buffer, and biodone's
> > that buffer.
> > It was done this way to allow the space used by the file system to be
> > pageable -- it just gets put in swap space.
> > There are arguably much better ways to write a memory-based file system.
> > But as I understand it, MFS was written this way originally for a couple
> > of reasons:
> > - As a way to demonstrate how alternate backing store
> > for FFS worked.
> > - It was quick and easy.
> --- . o o . o . o .. o .. o .. o oo . o . o o o
> _n_n_n____i_i _++++++_ _______ ________ _+++++++++++_
> *>(____________I I______I I_____I I______I I___________I
> __^__ /ooOOOO OOOOoo oo ooo oo oo oo oo ooo ooo __^__
> ( ___ )--------------------------------------------------------( ___ )
> | / | Paal Halvorsen UniK - Center for technology at Kjeller | \ |
> | / | University of Oslo | \ |
> | / | Phone: +47 64844731 PB. 70 | \ |
> | / | Phone: +47 64844700 (switchboard) N - 2027 KJELLER | \ |
> |_/_| Fax: +47 63818146 Norway |_\_|
> (_____)-- E-mail: email@example.com -- http://www.unik.no/~paalh --(_____)