Currently when snapshots occur, the VMX calls the HGFS server
manager synchronization callback to notify the Hgfs server to
freeze or thaw the Hgfs file IO activity. First, this Hgfs
server synchronization callback is called regardless of the
Hgfs Shared folders feature and server is enabled or not.
Consequently, the Hgfs server callback lamely uses a global
variable to track the server state just for this call and
returns without doing anything if not initialized.
Second, the HGFS server now requires the transport connection
in order to extract the Hgfs session as the file notification
component requires the session to allow its event generating
thread to callback to the server to register and unregister
through the transport which uses the PhysMem APIs.
This change fixes:
- call the Hgfs server only if Shared Folders and the server
are enabled
- call through the channel manager and channel transport to
the Hgfs server
- Hgfs server session callback table is extehded with a server
quiesce callback.
- HgfsServerSessionQuiesce callback now replaces the old
HgfsServer_Quiesce exported API.
- Make the quiesce callback use an enum to the thaw-freeze op
instead of a bool
- remove the Hgfs server initialized global now it is not required
The tools implementation of the Hgfs server code does not use this
API and thus the guest Hgfs manager and transport channel do not
implement any code which will use the session quiesce callback.
HgfsServerResEnumCallbacks enumResources;
} HgfsServerMgrCallbacks;
+typedef enum {
+ HGFS_QUIESCE_FREEZE,
+ HGFS_QUIESCE_THAW,
+} HgfsQuiesceOp;
+
/*
* Function used for invalidating nodes and searches that fall outside of a
* share when the list of shares changes.
void (*invalidateObjects)(void *, DblLnkLst_Links *);
uint32 (*invalidateInactiveSessions)(void *);
void (*sendComplete)(HgfsPacket *, void *);
+ void (*quiesce)(void *, HgfsQuiesceOp);
} HgfsServerSessionCallbacks;
/* XXX: TODO delete this layer if no other non-session callbacks are required. */