Add variable timeouts.

After mounting or unmounting a filesystem, flush cache, so we don't keep
stale cache around.

RageFileDriverDirect::Remount could (and should) flush its own cache when
changing root (since the cache represents the old root).  However, calling
Remount doesn't indicate that the filesystem has actually changed, so if
the root isn't actually changing (Remount("/mnt") on a filesystem already
pointing to /mnt), the driver can't be expected to flush.  (Remount also
currently doesn't go through Timeout, and we need to flush on unmount,
too.)  So, take the cheap way out and just flush through FILEMAN.
This commit is contained in:
Glenn Maynard
2005-05-22 01:36:08 +00:00
parent b850a8ea50
commit 4c8c5bea37
2 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -22,11 +22,11 @@ public:
void LockCards(); // prevent removing or changing of memory cards
void UnlockCards();
void MountCard( PlayerNumber pn );
void MountCard( PlayerNumber pn, int iTimeout = 10 );
void UnmountCard( PlayerNumber pn );
/* When paused, no changes in memory card state will be noticed until unpaused. */
void PauseMountingThread();
void PauseMountingThread( int iTimeout = 10 );
void UnPauseMountingThread();
void FlushAndReset(); // force all files to be flushed to mounted memory cards