Re: [hatari-devel] Using device files as drive images?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

I added advisory locking for HD image files (for systems
with BSD flock() call, like Linux).  This prevents accidental
opening of same image files in multiple Hatari instances
at the same time.

Documentation changes mentioned below are still to do.


	- Eero

On tiistai 14 lokakuu 2014, Eero Tamminen wrote:
> On tiistai 14 lokakuu 2014, Uwe Seimet wrote:
> > Thank you for checking the locking APIs.
> > 
> > > Don't use automount for things which you access also directly.
> > > Or at least make sure to unmount them before that.
> > 
> > Sure, but I was just wondering whether there might be a way to
> > technically address this issue.
> 
> I guess I'll just need to state this in the Hatari manual...
> 
> > > > And not to use device files with partitions that are mounted.
> > > 
> > > How do you propose detecting that, by parsing /proc/mounts?
> > 
> > It was not my intention to propose anything. I was just wondering
> > whether this issue can be addressed.
> 
> I think that in most cases it could, but I think it's OS specific,
> maybe even OS version specific code i.e. probably requires quite
> q bit of both ifdefs & run-time version checks in addition to
> code.
> 
> Contributions for these OS specific things are welcome! :-)
> 
> > > > With file images there is the same problem, but in practice
> > > > auto-mounting file images is much less common than auto-mounting
> > > > removable media.
> > > 
> > > Are you suggesting using advisory locking to prevent
> > > multiple Hatari processes accidentally using the same
> > > image files?
> > 
> > ;-) No, just for completeness sake I mentioned that not only device
> > files but also image files are affected.
> 
> Ok.  It might not be a bad idea although it only handles
> the least of the problems with this.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/