1 /* Copyright (c) 2009, 2013. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef STORAGE_PRIVATE_H_
8 #define STORAGE_PRIVATE_H_
10 typedef struct s_storage_type {
14 xbt_dict_t properties;
16 } s_storage_type_t, *storage_type_t;
18 typedef struct s_mount {
21 } s_mount_t, *mount_t;
23 typedef struct surf_stat { /* file status structure */
25 /* possible additionnal fields (e.g., popularity, last access time to know whether the file is in cache, ...) */
28 typedef struct surf_file {
34 typedef struct storage {
35 s_surf_resource_t generic_resource; /*< Structure with generic data. Needed at begin to interate with SURF */
36 e_surf_resource_state_t state_current; /*< STORAGE current state (ON or OFF) */
37 lmm_constraint_t constraint; /* Constraint for maximum bandwidth from connexion */
38 lmm_constraint_t constraint_write; /* Constraint for maximum write bandwidth*/
39 lmm_constraint_t constraint_read; /* Constraint for maximum write bandwidth*/
40 xbt_dict_t content; /* char * -> s_surf_stat_t */
42 unsigned long used_size;
43 xbt_dynar_t write_actions;
44 } s_storage_t, *storage_t;
47 READ=0, WRITE, STAT, OPEN, CLOSE, UNLINK, LS
48 } e_surf_action_storage_type_t;
50 typedef struct surf_action_storage {
51 s_surf_action_lmm_t generic_lmm_action;
52 e_surf_action_storage_type_t type;
54 } s_surf_action_storage_t, *surf_action_storage_t;
56 #endif /* STORAGE_PRIVATE_H_ */