-
Notifications
You must be signed in to change notification settings - Fork 0
/
extent_server.h
33 lines (26 loc) · 831 Bytes
/
extent_server.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// this is the extent server
#ifndef extent_server_h
#define extent_server_h
#include <string>
#include <map>
#include "extent_protocol.h"
#include "inode_manager.h"
class extent_server {
protected:
#if 0
typedef struct extent {
std::string data;
struct extent_protocol::attr attr;
} extent_t;
std::map <extent_protocol::extentid_t, extent_t> extents;
#endif
inode_manager *im;
public:
extent_server();
int create(uint32_t type, extent_protocol::extentid_t &id);
int put(extent_protocol::extentid_t id, std::string, int &);
int get(extent_protocol::extentid_t id, std::string &);
int getattr(extent_protocol::extentid_t id, extent_protocol::attr &);
int remove(extent_protocol::extentid_t id, int &);
};
#endif