Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot//simgrid/simgrid
[simgrid.git] / src / surf / storage_private.h
1 /*
2  * storage_private.h
3  *
4  *  Created on: 2 mars 2012
5  *      Author: navarro
6  */
7
8 #ifndef STORAGE_PRIVATE_H_
9 #define STORAGE_PRIVATE_H_
10
11 typedef struct s_storage_type {
12   char *model;
13   xbt_dict_t content; /* char * -> s_surf_stat_t */
14   char *type_id;
15   xbt_dict_t properties;
16   unsigned long size;
17   unsigned long used_size;
18 } s_storage_type_t, *storage_type_t;
19
20 typedef struct s_mount {
21   void *id;
22   char *name;
23 } s_mount_t, *mount_t;
24
25 typedef struct surf_stat { /* file status structure */
26   s_file_stat_t stat;
27   /* possible additionnal fields (e.g., popularity, last access time to know whether the file is in cache, ...) */
28 } s_surf_stat_t;
29
30 typedef struct surf_file {
31   char *name;
32   surf_stat_t content;
33 } s_surf_file_t;
34
35 typedef struct storage {
36   s_surf_resource_t generic_resource;   /*< Structure with generic data. Needed at begin to interate with SURF */
37   e_surf_resource_state_t state_current;        /*< STORAGE current state (ON or OFF) */
38   lmm_constraint_t constraint;          /* Constraint for maximum bandwidth from connexion */
39   lmm_constraint_t constraint_write;    /* Constraint for maximum write bandwidth*/
40   lmm_constraint_t constraint_read;     /* Constraint for maximum write bandwidth*/
41 } s_storage_t, *storage_t;
42
43 typedef enum {
44   READ, WRITE, STAT, OPEN, CLOSE
45 } e_surf_action_storage_type_t;
46
47 typedef struct surf_action_storage {
48   s_surf_action_lmm_t generic_lmm_action;
49   e_surf_action_storage_type_t type;
50 } s_surf_action_storage_t, *surf_action_storage_t;
51
52 #endif /* STORAGE_PRIVATE_H_ */