[Virtualacorn-list] ShareFS producing triplicate unusable files on VRPC

David J. Ruck druck at druck.org.uk
Tue Sep 23 11:46:03 BST 2008


Jeremy Nicoll - virtualacorn <jn.ml.vac.83 at wingsandbeaks.org.uk> wrote:
> It strikes me as interesting that the files showing date/time "DEADDEAD
> E1CA496E" etc are the ones with non-zero size.  I have no idea how this
> works, but I wonder if ShareFS when copying files first creates a dummy
> file, then transfers data into it, then if it all worked, renames it to
> the required target name and sets its filetype.  

No ShareFS doesn't do this. Any copy via the RISC OS filer, regardless of
which filing system is involved, is performed using the following steps:-

1) A destination file of the same size as the orginal file is created
   (using the SWI equivelent of *Create). The load and execution addresses
   of this file are set to &DEADDEAD to indicate it is a temporary file
   and its contents can't be relied upon.

2) The destination file is opened for random access, and the contents
   of the source file is writen in to it in chunks, until completed.

3) The file's attributes are altered so it has an appropriate datestamp
   and the filetype of the orginal.

> Possibly what you're seeing might suggest the dummy files have failed to
> have a subsequent rename/settype work ok.
> 
> Also in RO the date/time fields are the same ones as used for load and
> execute address for files that contain some forms of program.  Because
> those addresses are commonly represented as hexadecimal values, dummy
> files etc sometimes take advantage of that to store what looks like
> sensible words (eg DEAD).  Really you're seeing hex DE AD DE AD E1 CA 49
> 6E (etc).

VA's HostFS uses the native OS's filing system which does not support RISC
OS attibutes of load & exec addresses / file type & date stamp, and has to
store this information by adding extra characters to the file name, then
hiding these from RISC OS.

It is likely some problem in HostFS when driven by ShareFS background
operations has resulted in a file being created for each of the 3 stages
described above.

Cheers
---Dave

-- 
Email: druck at druck.org.uk
Phone: +44- (0)7974 108301





More information about the Virtualacorn-list mailing list