QNX 4.24 and DOS files

I have written an application that logs data to a DOS formatted IBM
Microdrive. I have tried several methods of periodically updating the FAT on
the drive to ensure data is not lost if there is a power fault.
Unfortunately I have not been able to find a reliable method. I have tried
opening / closing the files, calling fsync, fflush etc. I’m not sure if its
a factor or not but my logging system creates two files that are updated
asynchronously.

Does anyone know how to force a FAT update on demand?

Philip Miles <pmiles@cgocable.net> wrote:

I have written an application that logs data to a DOS formatted IBM
Microdrive. I have tried several methods of periodically updating the FAT
on the drive to ensure data is not lost if there is a power fault.
Unfortunately I have not been able to find a reliable method. I have tried
opening / closing the files, calling fsync, fflush etc. I’m not sure if
its a factor or not but my logging system creates two files that are
updated asynchronously.
Does anyone know how to force a FAT update on demand?

It is not possible with the 4.24 product Dosfsys (it maintains an internal
FAT cache without regard to fsync/O_SYNC/etc). The new Fatfsys (available
with 4.25, but can be used by itself on a 4.24 system) does honour all such
attempts to force data physically to disk (as well as providing FAT32 and
non-8.3 / long file name support) … however, if possible you should
consider upgrading fully to 4.25 as Fsys itself also has some bug fixes
for robustness and removable media …

My thanks.

Philip.

“John Garvey” <jgarvey@qnx.com> wrote in message
news:a4ur6u$kv2$1@nntp.qnx.com

Philip Miles <> pmiles@cgocable.net> > wrote:
I have written an application that logs data to a DOS formatted IBM
Microdrive. I have tried several methods of periodically updating the
FAT
on the drive to ensure data is not lost if there is a power fault.
Unfortunately I have not been able to find a reliable method. I have
tried
opening / closing the files, calling fsync, fflush etc. I’m not sure if
its a factor or not but my logging system creates two files that are
updated asynchronously.
Does anyone know how to force a FAT update on demand?

It is not possible with the 4.24 product Dosfsys (it maintains an internal
FAT cache without regard to fsync/O_SYNC/etc). The new Fatfsys (available
with 4.25, but can be used by itself on a 4.24 system) does honour all
such
attempts to force data physically to disk (as well as providing FAT32 and
non-8.3 / long file name support) … however, if possible you should
consider upgrading fully to 4.25 as Fsys itself also has some bug fixes
for robustness and removable media …