示例#1
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void)
{
  free_map_close ();
  cache_destroy (fs_cache);
  fs_cache = NULL;
}
示例#2
0
文件: filesys.c 项目: gypintos/np4
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  free_map_close ();
  /** NEW ADDED HERE **/
  all_cache_to_disk (true);
}
示例#3
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  cache_flush_to_disk(true);
  free_map_close ();

}
示例#4
0
/*! Formats the file system. */
static void do_format(void) {
    printf("Formatting file system...");
    free_map_create();
    if (!dir_create(ROOT_DIR_SECTOR, 16))
        PANIC("root directory creation failed");
    free_map_close();
    printf("done.\n");
}
示例#5
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  /* Start of Project 4 */
  cache_flush ();
  /* End of Project 4 */
  free_map_close ();
}
示例#6
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  free_map_close ();
  /* KAI Implementation */
  inode_free_all();
/* == KAI Implementation */
}
示例#7
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  free_map_close ();

#ifdef BUFFCACHE
  buffcache_write_all_dirty_blocks (true, true);
#endif
}
示例#8
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  //Write everything in the cache that is still dirty back to disk
  int i;
  for(i = 0; i < CACHE_SIZE; i++){
    if(!cache[i]->empty && (cache[i]->dirty)){
      block_write (fs_device, cache[i]->sector, cache[i]->data);
      //Free the cache elems
      free(cache[i]);
    }
  } 
  //Close the free map
  free_map_close ();
}
示例#9
0
文件: filesys.c 项目: gypintos/np4
/* Formats the file system. */
static void do_format (void)
{
  printf ("Formatting file system...");
  free_map_create ();
  if (!dir_create (ROOT_DIR_SECTOR, 2))
    PANIC ("root directory creation failed");

  if (dir_add(dir_open_root (), ".", ROOT_DIR_SECTOR, true) ==  NULL ||
      dir_add(dir_open_root (), "..", ROOT_DIR_SECTOR, true) == NULL ){
    PANIC ("root directory added . or .. failed");
  }
  
  free_map_close ();
  printf ("done.\n");
}
示例#10
0
文件: filesys.c 项目: GunjuKo/Pintos
/* Formats the file system. */
static void
do_format (void)
{
  struct dir *root_dir = dir_open_root();
  struct inode *root_inode = dir_get_inode(root_dir); 
  printf ("Formatting file system...");
  free_map_create ();
  if (!dir_create (ROOT_DIR_SECTOR, 16))
    PANIC ("root directory creation failed");
  /* add . and .. entry to root directory */
  dir_add(root_dir, ".", inode_get_inumber(root_inode));
  dir_add(root_dir,"..", inode_get_inumber(root_inode));
  free_map_close ();
  printf ("done.\n");
}
示例#11
0
/* Formats the file system. */
static void
do_format (void)
{
  printf ("Formatting file system...");
  free_map_create ();
  if (!dir_create (ROOT_DIR_SECTOR, 16))
    PANIC ("root directory creation failed");
  free_map_close ();

  struct dir *root = dir_open_root ();
  dir_add (root, ".", ROOT_DIR_SECTOR);
  dir_add (root, "..", ROOT_DIR_SECTOR);
  dir_close (root);

  printf ("done.\n");
}
示例#12
0
/* Formats the file system. */
static void
do_format (void)
{
    struct dir *current_dir;
    printf ("Formatting file system...");
    free_map_create ();
    /*Create directory with 2 entries - for . and .. */
    if (!dir_create (ROOT_DIR_SECTOR, 2))
        PANIC ("root directory creation failed");
    free_map_close ();
    /* Create . and .. entries. */
    current_dir = dir_open_root ();
    dir_add (current_dir, ".", ROOT_DIR_SECTOR, false);
    dir_add (current_dir, "..", ROOT_DIR_SECTOR, false);
    dir_close (current_dir);
    printf ("done.\n");
}
示例#13
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void)
{
    free_map_close ();
    block_cache_synchronize ();
}
示例#14
0
文件: filesys.c 项目: GunjuKo/Pintos
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  bc_term ();	
  free_map_close ();
}
示例#15
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  cache_done();
  free_map_close ();
}
示例#16
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void)
{
    cache_flush_all ();
    free_map_close ();
}
示例#17
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  cache_write_back_on_shutdown();
  free_map_close ();
}
示例#18
0
文件: filesys.c 项目: anoopjs/pintos
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  write_back_cache_blocks ();
  free_map_close ();
}
示例#19
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  filesys_cache_write_to_disk(true);
  free_map_close ();
}
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  free_map_close ();
}
示例#21
0
/* Shuts down the file system module, writing any unwritten data
   to disk. */
void
filesys_done (void) 
{
  save_cachetable();
  free_map_close ();
}