]>
git.proxmox.com Git - ceph.git/blob - ceph/src/crimson/os/cyan_object.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
6 #include <boost/intrusive_ptr.hpp>
7 #include <boost/smart_ptr/intrusive_ref_counter.hpp>
8 #include "include/buffer.h"
12 struct Object
: public boost::intrusive_ref_counter
<
14 boost::thread_unsafe_counter
>
16 using bufferlist
= ceph::bufferlist
;
19 std::map
<std::string
,bufferptr
> xattr
;
20 bufferlist omap_header
;
21 std::map
<std::string
,bufferlist
> omap
;
23 typedef boost::intrusive_ptr
<Object
> Ref
;
27 // interface for object data
28 size_t get_size() const;
29 int read(uint64_t offset
, uint64_t len
, bufferlist
&bl
);
30 int write(uint64_t offset
, const bufferlist
&bl
);
31 int clone(Object
*src
, uint64_t srcoff
, uint64_t len
,
33 int truncate(uint64_t offset
);
35 void encode(bufferlist
& bl
) const;
36 void decode(bufferlist::const_iterator
& p
);