Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
9979e033f788f936a37dd2f07d4761b0a4475360
[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 *content_type;
14   char *type_id;
15   xbt_dict_t properties;
16   size_t size;
17   size_t used_size;
18 } s_storage_type_t, *storage_type_t;
19
20 typedef struct s_mount {
21   void *storage;
22   char *name;
23 } s_mount_t, *mount_t;
24
25 typedef struct surf_file {
26   char *name;
27   char *mount;
28   size_t size;
29 } s_surf_file_t;
30
31 typedef struct surf_storage {
32   s_surf_resource_t generic_resource;   /*< Structure with generic data. Needed at begin to interact with SURF */
33   e_surf_resource_state_t state_current;        /*< STORAGE current state (ON or OFF) */
34   lmm_constraint_t constraint;          /* Constraint for maximum bandwidth from connection */
35   lmm_constraint_t constraint_write;    /* Constraint for maximum write bandwidth*/
36   lmm_constraint_t constraint_read;     /* Constraint for maximum write bandwidth*/
37   xbt_dict_t content; /* char * -> s_surf_file_t */
38   size_t size;
39   size_t used_size;
40   char *type_id;
41   char *content_type;
42   xbt_dynar_t write_actions;
43 } s_storage_t, *storage_t;
44
45 typedef enum {
46   READ=0, WRITE, STAT, OPEN, CLOSE, LS
47 } e_surf_action_storage_type_t;
48
49 typedef struct surf_action_storage {
50   s_surf_action_lmm_t generic_lmm_action;
51   e_surf_action_storage_type_t type;
52   void *storage;
53 } s_surf_action_storage_t, *surf_action_storage_t;
54
55 #endif /* STORAGE_PRIVATE_H_ */