~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/include/librados.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum, Clint Byrum, Micah Gersten
  • Date: 2011-02-12 22:50:26 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110212225026-yyyw4tk0msgql3ul
Tags: 0.24.2-0ubuntu1
[ Clint Byrum <clint@ubuntu.com> ]
* New upstream release. (LP: #658670, LP: #684011)
* debian/patches/fix-mkcephfs.patch: dropped (applied upstream)
* Removed .la files from libceph1-dev, libcrush1-dev and 
  librados1-dev (per Debian policy v3.9.1 10.2).
* debian/control: adding pkg-config as a build dependency
* debian/control: depend on libcrypto++-dev instead of libssl-dev
* debian/watch: added watch file

[ Micah Gersten <micahg@ubuntu.com> ]
* debian/control: add Homepage

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#include <vector>
9
9
#include "buffer.h"
10
10
 
 
11
class RadosClient;
 
12
 
11
13
namespace librados {
12
14
 
13
15
  using ceph::bufferlist;
29
31
    uint64_t num_object_clones;
30
32
    uint64_t num_object_copies;  // num_objects * num_replicas
31
33
    uint64_t num_objects_missing_on_primary;
 
34
    uint64_t num_objects_unfound;
32
35
    uint64_t num_objects_degraded;
33
36
    uint64_t num_rd, num_rd_kb, num_wr, num_wr_kb;
34
37
  };
38
41
 
39
42
  struct SnapContext {
40
43
    snap_t seq;
41
 
    vector<snap_t> snaps;
 
44
    std::vector<snap_t> snaps;
42
45
  };
43
46
 
44
47
 
45
48
 
46
49
class Rados
47
50
{
48
 
  void *client;
 
51
  RadosClient *client;
49
52
public:
50
53
  Rados();
51
54
  ~Rados();
 
55
 
 
56
  /* We don't allow assignment or copying */
 
57
  Rados(const Rados& rhs);
 
58
  const Rados& operator=(const Rados& rhs);
 
59
 
52
60
  int initialize(int argc, const char *argv[]);
53
61
  void shutdown();
54
62
 
57
65
  int lookup_pool(const char *name);
58
66
 
59
67
  void set_snap(pool_t pool, snap_t seq);
60
 
  int set_snap_context(pool_t pool, snap_t seq, vector<snap_t>& snaps);
 
68
  int set_snap_context(pool_t pool, snap_t seq, std::vector<snap_t>& snaps);
61
69
 
62
70
 
63
71
  int create(pool_t pool, const std::string& oid, bool exclusive);
67
75
  int read(pool_t pool, const std::string& oid, off_t off, bufferlist& bl, size_t len);
68
76
  int remove(pool_t pool, const std::string& oid);
69
77
  int trunc(pool_t pool, const std::string& oid, size_t size);
70
 
 
 
78
  int mapext(pool_t pool, const string& o, off_t off, size_t len, std::map<off_t, size_t>& m);
 
79
  int sparse_read(pool_t pool, const string& o, off_t off, size_t len, std::map<off_t, size_t>& m, bufferlist& bl);
71
80
  int getxattr(pool_t pool, const std::string& oid, const char *name, bufferlist& bl);
72
81
  int setxattr(pool_t pool, const std::string& oid, const char *name, bufferlist& bl);
 
82
  int rmxattr(pool_t pool, const std::string& oid, const char *name);
73
83
  int getxattrs(pool_t pool, const std::string& oid, std::map<std::string, bufferlist>& attrset);
74
84
  int stat(pool_t pool, const std::string& oid, uint64_t *psize, time_t *pmtime);
75
85