nfs-ganesha 1.4

posixdb_flush.c

Go to the documentation of this file.
00001 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil; -*-
00002  * vim:expandtab:shiftwidth=4:tabstop=4:
00003  */
00004 #ifdef HAVE_CONFIG_H
00005 #include "config.h"
00006 #endif
00007 #include "posixdb_internal.h"
00008 
00009 fsal_posixdb_status_t fsal_posixdb_flush(fsal_posixdb_conn * p_conn)
00010 {
00011   fsal_posixdb_status_t rc;
00012 
00013   rc = db_exec_sql(p_conn, "DELETE FROM Parent", NULL);
00014   if(FSAL_POSIXDB_IS_ERROR(rc))
00015     return rc;
00016 
00017   rc = db_exec_sql(p_conn, "DELETE FROM Handle", NULL);
00018   if(FSAL_POSIXDB_IS_ERROR(rc))
00019     return rc;
00020 
00021   ReturnCodeDB(ERR_FSAL_POSIXDB_NOERR, 0);
00022 }