filehash/ffdb_page.c
static void _ffdb_remove_pages (ffdb_htab_t* hashp, 
				pgno_t first, pgno_t last)
{
  unsigned int numpages, i;
  pgno_t page, tp;
  void *pagep;

  /* total number of pages to be removed */
  numpages = last - first + 1;

  page = first;
  for (i = 0; i < numpages; i++) {
    pagep = ffdb_get_page (hashp, page, HASH_RAW_PAGE, 0, &tp);
    if (!pagep) {
      fprintf (stderr, "Warning: cannot find moved old page %d \n",
	       page);
      page++;
      continue;
    }
    if (ffdb_pagepool_delete (hashp->mp, pagep) != 0) 
      fprintf (stderr, "Cannot delete a moved page %d\n", page);
    page++;
  }
}
/**
 * Clean out range of pages from pagepool cache
 * @param hashp hashtable pointer
 * @param first the first page to be removed
 * @param last the last page to be removed
 */
Clean out range of pages from pagepool cache
@param hashp hashtable pointer
@param first the first page to be removed
@param last the last page to be removed
Clean out range of pages from pagepool cache @param hashp hashtable pointer @param first the first page to be removed @param last the last page to be removed
static void _ffdb_remove_pages (ffdb_htab_t* hashp, 
				pgno_t first, pgno_t last)
{
  unsigned int numpages, i;
  pgno_t page, tp;
  void *pagep;
  numpages = last - first + 1;
  page = first;
  for (i = 0; i < numpages; i++) {
    pagep = ffdb_get_page (hashp, page, HASH_RAW_PAGE, 0, &tp);
    if (!pagep) {
      fprintf (stderr, "Warning: cannot find moved old page %d \n",
	       page);
      page++;
      continue;
    }
    if (ffdb_pagepool_delete (hashp->mp, pagep) != 0) 
      fprintf (stderr, "Cannot delete a moved page %d\n", page);
    page++;
  }
}
static void _ffdb_remove_pages ( ffdb_htab_t * hashp , pgno_t first , pgno_t last ) { unsigned int numpages , i ; pgno_t page , tp ; void * pagep ; numpages = last - first + 1 ; page = first ; for ( i = 0 ; i < numpages ; i ++ ) { pagep = ffdb_get_page ( hashp , page , HASH_RAW_PAGE , 0 , & tp ) ; if ( ! pagep ) { fprintf ( stderr , " \n " , page ) ; page ++ ; continue ; } if ( ffdb_pagepool_delete ( hashp -> mp , pagep ) != 0 ) fprintf ( stderr , " \n " , page ) ; page ++ ; } }
Clean out range of pages from pagepool cache
 @param hashp hashtable pointer
 @param first the first page to be removed
 @param last the last page to be removed
Clean out range of pages from pagepool cache @param hashp hashtable pointer @param first the first page to be removed @param last the last page to be removed
/* total number of pages to be removed */