Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] test is obviously redundant here.
[simgrid.git] / src / surf / storage.c
index 4101147..acf02e6 100644 (file)
@@ -50,7 +50,7 @@ static surf_action_t storage_action_stat(void *storage, surf_file_t stream)
   return action;
 }
 
-static surf_action_t storage_action_open(void *storage, const char* path, const char* mode)
+static surf_action_t storage_action_open(void *storage, const char* mount, const char* path, const char* mode)
 {
   XBT_DEBUG("\tOpen file '%s'",path);
   char *storage_type_id = xbt_lib_get_or_null(
@@ -64,6 +64,7 @@ static surf_action_t storage_action_open(void *storage, const char* path, const
   surf_file_t file = xbt_new0(s_surf_file_t,1);
   file->name = xbt_strdup(path);
   file->content = content;
+  file->storage = mount;
 
   surf_action_t action = storage_action_execute(storage,0, OPEN);
   action->file = (void *)file;
@@ -155,10 +156,10 @@ static void* storage_create_resource(const char* id, const char* model,const cha
   storage->state_current = SURF_RESOURCE_ON;
 
   storage_type_t storage_type = xbt_lib_get_or_null(storage_type_lib, type_id,ROUTING_STORAGE_TYPE_LEVEL);
-  XBT_INFO("Create resource with Bconnection '%zu' Bread '%zu' Bwrite '%zu'",Bconnection,Bread,Bwrite);
   double Bread  = atof(xbt_dict_get(storage_type->properties,"Bread"));
   double Bwrite = atof(xbt_dict_get(storage_type->properties,"Bwrite"));
   double Bconnection   = atof(xbt_dict_get(storage_type->properties,"Bconnection"));
+  XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%ld'",Bconnection,Bread,Bwrite,storage_type->size);
   storage->constraint       = lmm_constraint_new(storage_maxmin_system, storage, Bconnection);
   storage->constraint_read  = lmm_constraint_new(storage_maxmin_system, storage, Bread);
   storage->constraint_write = lmm_constraint_new(storage_maxmin_system, storage, Bwrite);