XBT_DEBUG("\tOpen file '%s'",path);
xbt_dict_t content_dict = ((storage_t)storage)->content;
size_t size = (size_t) xbt_dict_get_or_null(content_dict,path);
XBT_DEBUG("\tOpen file '%s'",path);
xbt_dict_t content_dict = ((storage_t)storage)->content;
size_t size = (size_t) xbt_dict_get_or_null(content_dict,path);
xbt_dict_set(content_dict,path,&size,NULL);
XBT_DEBUG("File '%s' was not found, file created.",path);
}
xbt_dict_set(content_dict,path,&size,NULL);
XBT_DEBUG("File '%s' was not found, file created.",path);
}
surf_action_storage_t next_action = NULL;
xbt_swag_t running_actions = surf_storage_model->states.running_action_set;
surf_action_storage_t next_action = NULL;
xbt_swag_t running_actions = surf_storage_model->states.running_action_set;
xbt_swag_foreach_safe(action, next_action, running_actions) {
if(action->type == WRITE)
{
xbt_swag_foreach_safe(action, next_action, running_actions) {
if(action->type == WRITE)
{
double rate = lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable);
/* Hack to avoid rounding differences between x86 and x86_64
* (note that the next sizes are of type size_t). */
long incr = delta * rate + MAXMIN_PRECISION;
((storage_t)(action->storage))->used_size += incr; // disk usage
((surf_action_t)action)->file->size += incr; // file size
double rate = lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable);
/* Hack to avoid rounding differences between x86 and x86_64
* (note that the next sizes are of type size_t). */
long incr = delta * rate + MAXMIN_PRECISION;
((storage_t)(action->storage))->used_size += incr; // disk usage
((surf_action_t)action)->file->size += incr; // file size
- xbt_swag_foreach_safe(action, next_action, running_actions) {
+ xbt_dict_t content_dict = ((storage_t)(action->storage))->content;
+ xbt_dict_set(content_dict,((surf_action_t)action)->file->name,(void*)(((surf_action_t)action)->file->size),NULL);
+ }
double_update(&(GENERIC_ACTION(action).remains),
lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable) * delta);
double_update(&(GENERIC_ACTION(action).remains),
lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable) * delta);