#define CEPH_CLS_JOURNAL_TYPES_H
#include "include/int_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/encoding.h"
#include <iosfwd>
#include <list>
#define __CEPH_CLS_RBD_H
#include "include/types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "common/Formatter.h"
#include "librbd/parent_types.h"
#include <set>
#include <string>
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
/*
* Ceph configuration file support.
#include "assert.h"
#include "Formatter.h"
#include "common/escape.h"
+#include "include/buffer.h"
#include <iostream>
#include <sstream>
return (Formatter *) NULL;
}
+
+void Formatter::flush(bufferlist &bl)
+{
+ std::stringstream os;
+ flush(os);
+ bl.append(os.str());
+}
+
void Formatter::dump_format(const char *name, const char *fmt, ...)
{
va_list ap;
#include <string>
#include <map>
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
namespace ceph {
virtual ~Formatter();
virtual void flush(std::ostream& os) = 0;
- void flush(bufferlist &bl)
- {
- std::stringstream os;
- flush(os);
- bl.append(os.str());
- }
+ void flush(bufferlist &bl);
virtual void reset() = 0;
virtual void open_array_section(const char *name) = 0;
#include <string>
#include <map>
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "common/cmdparse.h"
class AdminSocket;
#include <set>
#include "include/assert.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/atomic.h"
#include "common/cmdparse.h"
#include "include/Spinlock.h"
#ifndef CEPH_CRYPTO_CMS_H
#define CEPH_CRYPTO_CMS_H
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
class CephContext;
#include <string>
#include "include/encoding.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "msg/msg_types.h"
/* Represents a Ceph entity name.
#include "common/config_obs.h"
#include "common/Mutex.h"
-#include "include/buffer.h"
#include "include/utime.h"
#include <stdint.h>
#include "common/strtol.h"
#include "ErasureCode.h"
+#include "include/buffer.h"
const unsigned ErasureCode::SIMD_ALIGN = 32;
#include <vector>
#include <iostream>
#include "include/memory.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
class CrushWrapper;
#define CEPH_JOURNAL_JOURNALER_H
#include "include/int_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/Context.h"
#include "include/rados/librados.hpp"
#include "journal/Future.h"
#define KINETIC_STORE_H
#include "include/types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "KeyValueDB.h"
#include <set>
#include <map>
#define LEVEL_DB_STORE_H
#include "include/types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "KeyValueDB.h"
#include <set>
#include <map>
#define ROCKS_DB_STORE_H
#include "include/types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "KeyValueDB.h"
#include <set>
#include <map>
#define CEPH_LIBRBD_AIO_IMAGE_REQUEST_H
#include "include/int_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "common/snap_types.h"
#include "osd/osd_types.h"
#include "librbd/AioCompletion.h"
#include "common/RWLock.h"
#include "common/snap_types.h"
#include "include/atomic.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/rbd/librbd.hpp"
#include "include/rbd_types.h"
#include "include/types.h"
#define CEPH_LIBRBD_JOURNAL_REPLAY_H
#include "include/int_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/rbd/librbd.hpp"
#include "common/Cond.h"
#include "common/Mutex.h"
#define LIBRBD_WATCH_NOTIFY_TYPES_H
#include "include/int_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/encoding.h"
#include <iosfwd>
#include <list>
#include <string>
#include <vector>
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/rbd/librbd.hpp"
#include "include/rbd_types.h"
#include <set>
#include "include/types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/lru.h"
#include "include/elist.h"
#include "include/filepath.h"
#define CEPH_CDIR_H
#include "include/types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "mdstypes.h"
#include "common/config.h"
#include "common/DecayCounter.h"
#ifndef CEPH_CAPABILITY_H
#define CEPH_CAPABILITY_H
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/xlist.h"
#include "common/config.h"
#define EVENT_NOOP 51
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/Context.h"
#include "include/utime.h"
#include "mdstypes.h"
#include "mds_table_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
class MDSRank;
class Context;
#ifndef DBOBJECTMAP_DB_H
#define DBOBJECTMAP_DB_H
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include <set>
#include <map>
#include <string>
#ifndef CEPH_HASHINDEX_H
#define CEPH_HASHINDEX_H
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/encoding.h"
#include "LFNIndex.h"
#include <errno.h>
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/Context.h"
#include "common/Finisher.h"
#include "common/TrackedOp.h"
#include "include/unordered_map.h"
#include <boost/tuple/tuple.hpp>
#include "include/memory.h"
-#include "include/buffer.h"
#include "common/Formatter.h"
#include "common/hobject.h"
#include "include/interval_set.h"
return 0;
}
+void ECUtil::HashInfo::append(uint64_t old_size,
+ map<int, bufferlist> &to_append) {
+ assert(to_append.size() == cumulative_shard_hashes.size());
+ assert(old_size == total_chunk_size);
+ uint64_t size_to_append = to_append.begin()->second.length();
+ for (map<int, bufferlist>::iterator i = to_append.begin();
+ i != to_append.end();
+ ++i) {
+ assert(size_to_append == i->second.length());
+ assert((unsigned)i->first < cumulative_shard_hashes.size());
+ uint32_t new_hash = i->second.crc32c(cumulative_shard_hashes[i->first]);
+ cumulative_shard_hashes[i->first] = new_hash;
+ }
+ total_chunk_size += size_to_append;
+}
+
void ECUtil::HashInfo::encode(bufferlist &bl) const
{
ENCODE_START(1, 1, bl);
#include "include/memory.h"
#include "erasure-code/ErasureCodeInterface.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/assert.h"
#include "include/encoding.h"
#include "common/Formatter.h"
HashInfo(unsigned num_chunks)
: total_chunk_size(0),
cumulative_shard_hashes(num_chunks, -1) {}
- void append(uint64_t old_size, map<int, bufferlist> &to_append) {
- assert(to_append.size() == cumulative_shard_hashes.size());
- assert(old_size == total_chunk_size);
- uint64_t size_to_append = to_append.begin()->second.length();
- for (map<int, bufferlist>::iterator i = to_append.begin();
- i != to_append.end();
- ++i) {
- assert(size_to_append == i->second.length());
- assert((unsigned)i->first < cumulative_shard_hashes.size());
- uint32_t new_hash = i->second.crc32c(cumulative_shard_hashes[i->first]);
- cumulative_shard_hashes[i->first] = new_hash;
- }
- total_chunk_size += size_to_append;
- }
+ void append(uint64_t old_size, map<int, bufferlist> &to_append);
void clear() {
total_chunk_size = 0;
cumulative_shard_hashes = vector<uint32_t>(
#include "include/types.h"
#include "include/stringify.h"
#include "osd_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/xlist.h"
#include "include/atomic.h"
#include "SnapMapper.h"
#define CEPH_RBD_REPLAY_ACTION_TYPES_H
#include "include/int_types.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "include/encoding.h"
#include <iosfwd>
#include <list>
// This code assumes that IO IDs and timestamps are related monotonically.
// In other words, (a.id < b.id) == (a.timestamp < b.timestamp) for all IOs a and b.
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include <boost/enable_shared_from_this.hpp>
#include <boost/shared_ptr.hpp>
#include <iostream>
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
#include "include/interval_set.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include <map>
#ifndef COMMON_OBJECT_H
#include <sstream>
#include <string>
+using namespace ceph;
+
TEST(tableformatter, singleline)
{
std::stringstream sout;
#include "common/Cond.h"
#include "common/Mutex.h"
#include "include/atomic.h"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "test/librados_test_stub/TestWatchNotify.h"
#include <boost/function.hpp>
#include <boost/functional/hash.hpp>
#include <string>
#include "include/rados/librados.hpp"
-#include "include/buffer.h"
+#include "include/buffer_fwd.h"
#include "tools/RadosDump.h"