예제 #1
0
파일: filesys.c 프로젝트: kcm1700/ChoPintOS
/* 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
파일: filesys.c 프로젝트: IVY-bug/pintos4-1
/* 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
파일: filesys.c 프로젝트: bahulkar/cs140_p4
/* 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
파일: filesys.c 프로젝트: bahulkar/cs140_p4
/* 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
파일: filesys.c 프로젝트: DrailDragon/sem5
/* 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 ();
}