Print this page
Go ahead and destroy the NFSv4 database tables


1500 
1501         if (nsrv4->nfs4_server_state == NULL) {
1502                 mutex_exit(&nsrv4->state_lock);
1503                 return;
1504         }
1505 
1506         /* destroy server instances and current instance ptr */
1507         rfs4_servinst_destroy_all(nsrv4);
1508 
1509         /* reset the "first NFSv4 request" status */
1510         nsrv4->seen_first_compound = 0;
1511 
1512         dbp = nsrv4->nfs4_server_state;
1513         nsrv4->nfs4_server_state = NULL;
1514 
1515         rw_destroy(&nsrv4->rfs4_findclient_lock);
1516 
1517         /* First stop all of the reaper threads in the database */
1518         rfs4_database_shutdown(dbp);
1519         /*
1520          * XXX workaround
1521          * Skip destrying the state database yet just in case there
1522          * are unfinished operations depending on it.


1523          */
1524         /* Now destroy/release the database tables */
1525         /* rfs4_database_destroy(dbp); */
1526 
1527         /* Reset the cache timers for next time */
1528         nsrv4->rfs4_client_cache_time = 0;
1529         nsrv4->rfs4_openowner_cache_time = 0;
1530         nsrv4->rfs4_state_cache_time = 0;
1531         nsrv4->rfs4_lo_state_cache_time = 0;
1532         nsrv4->rfs4_lockowner_cache_time = 0;
1533         nsrv4->rfs4_file_cache_time = 0;
1534         nsrv4->rfs4_deleg_state_cache_time = 0;
1535 
1536         mutex_exit(&nsrv4->state_lock);
1537 
1538         /* clean up any dangling stable storage structures */
1539         rfs4_ss_fini(nsrv4);
1540 }
1541 
1542 typedef union {
1543         struct {
1544                 uint32_t start_time;
1545                 uint32_t c_id;




1500 
1501         if (nsrv4->nfs4_server_state == NULL) {
1502                 mutex_exit(&nsrv4->state_lock);
1503                 return;
1504         }
1505 
1506         /* destroy server instances and current instance ptr */
1507         rfs4_servinst_destroy_all(nsrv4);
1508 
1509         /* reset the "first NFSv4 request" status */
1510         nsrv4->seen_first_compound = 0;
1511 
1512         dbp = nsrv4->nfs4_server_state;
1513         nsrv4->nfs4_server_state = NULL;
1514 
1515         rw_destroy(&nsrv4->rfs4_findclient_lock);
1516 
1517         /* First stop all of the reaper threads in the database */
1518         rfs4_database_shutdown(dbp);
1519         /*
1520          * WARNING: There may be consumers of the rfs4 database still
1521          * active as we destroy these.  IF that's the case, consider putting
1522          * some of their _zone_fini()-like functions into the zsd key as
1523          * ~~SHUTDOWN~~ functions instead of ~~DESTROY~~ functions.  We can
1524          * maintain some ordering guarantees better that way.
1525          */
1526         /* Now destroy/release the database tables */
1527         rfs4_database_destroy(dbp);
1528 
1529         /* Reset the cache timers for next time */
1530         nsrv4->rfs4_client_cache_time = 0;
1531         nsrv4->rfs4_openowner_cache_time = 0;
1532         nsrv4->rfs4_state_cache_time = 0;
1533         nsrv4->rfs4_lo_state_cache_time = 0;
1534         nsrv4->rfs4_lockowner_cache_time = 0;
1535         nsrv4->rfs4_file_cache_time = 0;
1536         nsrv4->rfs4_deleg_state_cache_time = 0;
1537 
1538         mutex_exit(&nsrv4->state_lock);
1539 
1540         /* clean up any dangling stable storage structures */
1541         rfs4_ss_fini(nsrv4);
1542 }
1543 
1544 typedef union {
1545         struct {
1546                 uint32_t start_time;
1547                 uint32_t c_id;