#include "kv/KeyValueDB.h"
#include "common/ceph_crypto.h"
-using ceph::crypto::SHA1;
#include "include/ceph_assert.h"
#define XATTR_SPILL_OUT "1"
#define __FUNC__ __func__ << "(" << __LINE__ << ")"
+using std::cerr;
+using std::list;
+using std::make_pair;
+using std::map;
+using std::ostream;
+using std::ostringstream;
+using std::set;
+using std::string;
+using std::stringstream;
+using std::vector;
+
+using ceph::crypto::SHA1;
+using ceph::BackTrace;
+using ceph::bufferlist;
+using ceph::bufferptr;
+using ceph::decode;
+using ceph::encode;
+using ceph::Formatter;
+using ceph::JSONFormatter;
+
//Initial features in new superblock.
static CompatSet get_fs_initial_compat_set() {
CompatSet::FeatureSet ceph_osd_feature_compat;
m_ondisk_finisher_num(cct->_conf->filestore_ondisk_finisher_threads),
m_apply_finisher_num(cct->_conf->filestore_apply_finisher_threads),
op_tp(cct, "FileStore::op_tp", "tp_fstore_op", cct->_conf->filestore_op_threads, "filestore_op_threads"),
- op_wq(this, cct->_conf->filestore_op_thread_timeout,
- cct->_conf->filestore_op_thread_suicide_timeout, &op_tp),
+ op_wq(this,
+ ceph::make_timespan(cct->_conf->filestore_op_thread_timeout),
+ ceph::make_timespan(cct->_conf->filestore_op_thread_suicide_timeout),
+ &op_tp),
logger(nullptr),
trace_endpoint("0.0.0.0", 0, "FileStore"),
m_filestore_commit_timeout(cct->_conf->filestore_commit_timeout),
FileStore::~FileStore()
{
- for (vector<Finisher*>::iterator it = ondisk_finishers.begin(); it != ondisk_finishers.end(); ++it) {
+ for (auto it = ondisk_finishers.begin(); it != ondisk_finishers.end(); ++it) {
delete *it;
*it = nullptr;
}
- for (vector<Finisher*>::iterator it = apply_finishers.begin(); it != apply_finishers.end(); ++it) {
+ for (auto it = apply_finishers.begin(); it != apply_finishers.end(); ++it) {
delete *it;
*it = nullptr;
}
case Transaction::OP_COLL_HINT:
{
const coll_t &cid = i.get_cid(op->cid);
- uint32_t type = op->hint_type;
+ uint32_t type = op->hint;
bufferlist hint;
i.decode_bl(hint);
auto hiter = hint.cbegin();
char val[CHAIN_XATTR_MAX_BLOCK_LEN];
int l = chain_fgetxattr(fd, name, val, sizeof(val));
if (l >= 0) {
- bp = buffer::create(l);
+ bp = ceph::buffer::create(l);
memcpy(bp.c_str(), val, l);
} else if (l == -ERANGE) {
l = chain_fgetxattr(fd, name, 0, 0);
if (l > 0) {
- bp = buffer::create(l);
+ bp = ceph::buffer::create(l);
l = chain_fgetxattr(fd, name, bp.c_str(), l);
}
}