home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!jato!jdickson
- From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
- Subject: Re: A few Handler/FileSys Q's (Mod.Long.)
- Message-ID: <1992Dec17.220150.23832@jato.jpl.nasa.gov>
- Keywords: handler filesystem packets Amiga DOS AmigaDOS lock FileLock
- Organization: Jet Propulsion Laboratory
- References: <1992Dec17.051905.1@economics.adelaide.edu.au>
- Date: Thu, 17 Dec 1992 22:01:50 GMT
- Lines: 58
-
- In article <1992Dec17.051905.1@economics.adelaide.edu.au> djung@economics.adelaide.edu.au (David Jung) writes:
- >I am in the process (well beginning anyway) of writing a filesystem. I have a
- >few questions.
- >
- >First here's what I have discovered ... a scenario ...
- >
- >(to carry this out you need two floppy drives and a disk with a moderately
- >long text file)
- >
- >If I place a disk containing a text file into one drive - say df0, then open
- >up a shell and type 'cd more' & 'more file' the file is displayed and the
- >more program obtains a lock on the file (and the root dir incidently).
- >
- >If I then remove the disk - the locks the FFS filesystem issued to More
- >appear on the dol_LockList of the disk's volume node in the DosList.
- >
- >If I then open a second shell and type 'ls diskname:' (where diskname: is the
- >disk I just ejected) - I get the usual "please insert volume diskname in any
- >drive". This is because DOS has discovered the volume node's dol_Task is NULL.
- >
- >OK - so far so good.
- >
- >Cancel the requester. Now - with the disk still ejected - press the space bar
- >in the more window until more runs out of buffered file and has to read more
- >from the disk. Now I get a "Please insert volume diskname in device df0:".
- >(Note this also happens if the disk has been inserted into the other drive!!)
- >(i.e. is wants me to remove it from df1 and insert it into df0!)
-
- Locks cannot be used accross file systems as I would imagine applies to other
- objects as well (e.g. filehandles). DF0: and DF1: are distinct FS.
-
- >
- >Note that it wants df0 not any drive. I ASSUME the following has happened.
- >
- >More has asked DOS to read more of the file, and DOS has used the FileLock's
- >fl_Task field to decide which handler to send the packet to. (only place
- >it can get it from since the volume node's dol_Task is NULL).
-
- The file handle itself contains the address of the handler message port in
- the field fh_Port or fh_Type. I had read somewhere that the meaning of these
- two fields were reversed. I think it was the article by John Tobes which
- appeared in the long since defunct Transactor magazine.
-
- >
- >The handler has recieved a packet containing a lock that it is no longer
- >managing (no matching key or whatever) - and has put up the requester asking
- >for the volume. My questions are (finally)
-
- MORE would simply issue another ACTION_READ DOS packet. The file handle
- contains the address of the handler message port. MORE would have only
- obtained a lock on the file to ensure its existance and find out how large
- it was.
-
- Hope this helps.
-
- Jeff
-
-
-