Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add more debugging info there. Nice to know what is the new value
[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   char *content;
14   char *type_id;
15   xbt_dict_t properties;
16   unsigned long size;
17 } s_storage_type_t, *storage_type_t;
18
19 typedef struct s_mount {
20   void *id;
21   char *name;
22 } s_mount_t, *mount_t;
23
24 typedef struct surf_stat { /* file status structure */
25   s_file_stat_t stat;
26   /* possible additionnal fields (e.g., popularity, last access time to know whether the file is in cache, ...) */
27 } s_surf_stat_t;
28
29 typedef struct surf_file {
30   char *name;
31   surf_stat_t content;
32   const char* storage;
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   xbt_dict_t content; /* char * -> s_surf_stat_t */
42   unsigned long size;
43   unsigned long used_size;
44   xbt_dynar_t write_actions;
45 } s_storage_t, *storage_t;
46
47 typedef enum {
48   READ=0, WRITE, STAT, OPEN, CLOSE, UNLINK, LS
49 } e_surf_action_storage_type_t;
50
51 typedef struct surf_action_storage {
52   s_surf_action_lmm_t generic_lmm_action;
53   e_surf_action_storage_type_t type;
54   void *storage;
55 } s_surf_action_storage_t, *surf_action_storage_t;
56
57 #endif /* STORAGE_PRIVATE_H_ */