Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start to simplify the stack of structures for files. Get rid of stats
[simgrid.git] / src / surf / storage_private.h
1 /* Copyright (c) 2009, 2013. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #ifndef STORAGE_PRIVATE_H_
8 #define STORAGE_PRIVATE_H_
9
10 typedef struct s_storage_type {
11   char *model;
12   char *content;
13   char *type_id;
14   xbt_dict_t properties;
15   unsigned long size;
16 } s_storage_type_t, *storage_type_t;
17
18 typedef struct s_mount {
19   void *id;
20   char *name;
21 } s_mount_t, *mount_t;
22
23 typedef struct surf_file {
24   char *name;
25   const char* storage;
26   double size;
27 } s_surf_file_t;
28
29 typedef struct storage {
30   s_surf_resource_t generic_resource;   /*< Structure with generic data. Needed at begin to interact with SURF */
31   e_surf_resource_state_t state_current;        /*< STORAGE current state (ON or OFF) */
32   lmm_constraint_t constraint;          /* Constraint for maximum bandwidth from connection */
33   lmm_constraint_t constraint_write;    /* Constraint for maximum write bandwidth*/
34   lmm_constraint_t constraint_read;     /* Constraint for maximum write bandwidth*/
35   xbt_dict_t content; /* char * -> s_surf_stat_t */
36   unsigned long size;
37   unsigned long used_size;
38   xbt_dynar_t write_actions;
39 } s_storage_t, *storage_t;
40
41 typedef enum {
42   READ=0, WRITE, STAT, OPEN, CLOSE, UNLINK, LS
43 } e_surf_action_storage_type_t;
44
45 typedef struct surf_action_storage {
46   s_surf_action_lmm_t generic_lmm_action;
47   e_surf_action_storage_type_t type;
48   void *storage;
49 } s_surf_action_storage_t, *surf_action_storage_t;
50
51 #endif /* STORAGE_PRIVATE_H_ */