filehash/ffdb_hash.c
static int
_ffdb_hash_sync (const FFDB_DB *dbp, unsigned int flags)
{
  ffdb_htab_t* hashp;
  
  if (!dbp) 
    return -1;
  hashp = (ffdb_htab_t *)dbp->internal;

  FFDB_LOCK(hashp->lock);

  /* flush meta information header to disk */
  if (_ffdb_flush_meta (hashp) != 0) {
    FFDB_UNLOCK(hashp->lock);
    return -1;
  }

  ffdb_pagepool_sync (hashp->mp);

  FFDB_UNLOCK(hashp->lock);
  return 0;
}
/**
 * Sync the database to file (disk)
 */
Sync the database to file (disk)
Sync the database to file ( disk )
static int
_ffdb_hash_sync (const FFDB_DB *dbp, unsigned int flags)
{
  ffdb_htab_t* hashp;
  if (!dbp) 
    return -1;
  hashp = (ffdb_htab_t *)dbp->internal;
  FFDB_LOCK(hashp->lock);
  if (_ffdb_flush_meta (hashp) != 0) {
    FFDB_UNLOCK(hashp->lock);
    return -1;
  }
  ffdb_pagepool_sync (hashp->mp);
  FFDB_UNLOCK(hashp->lock);
  return 0;
}
static int _ffdb_hash_sync ( const FFDB_DB * dbp , unsigned int flags ) { ffdb_htab_t * hashp ; if ( ! dbp ) return -1 ; hashp = ( ffdb_htab_t * ) dbp -> internal ; FFDB_LOCK ( hashp -> lock ) ; if ( _ffdb_flush_meta ( hashp ) != 0 ) { FFDB_UNLOCK ( hashp -> lock ) ; return -1 ; } ffdb_pagepool_sync ( hashp -> mp ) ; FFDB_UNLOCK ( hashp -> lock ) ; return 0 ; }
Sync the database to file (disk)
Sync the database to file ( disk )
/* flush meta information header to disk */