CtreeFlushFile Force c-tree Plus and system file buffers to disk. Short Name CTFLUSH() Type Low level function Declaration COUNT CtreeFlushFile(COUNT filno) Description CtreeFlushFile() writes cache to disk. If filno is -1, the buffers for all open files are flushed. Otherwise, the buffers for the file number specified are flushed. CtreeFlushFile() attempts to flush the system’s file buffers after the c-tree Plus buffers are flushed. CtreeFlushFile() does not guarantee that the data on disk is consistent because other users could be updating the file at the time of the flush. Cache pages that are in the middle of an update, signified by an inability of CtreeFlushFile() to acquire the update semaphore for the cache, are not flushed. The contents of the cache remain valid so subsequent I/O requests do NOT need to repopulate the cache pages. Superfiles must be flushed as a unit. Individual members cannot be flushed separately. To flush a member of a superfile, you must flush the superfile host, which flushes ALL members. A call to CtreeFlushFile() for a member of a superfile returns FMOD_ERR (48). A call to CtreeFlushFile() for an index member, instead of the host index, returns KMEM_ERR (23). That is, if an index file is opened with file number keyno, and if the index file contains two additional members, CtreeFlushFile() should only be called with keyno as the argument. This will flush all the index members. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Limitations Superfiles and index host/member files must be flushed as a unit. Individual members cannot be flushed separately. Flush the host file to flush all hosted files. |
|||||||||||||||