repo stringlengths 1 152 ⌀ | file stringlengths 15 205 | code stringlengths 0 41.6M | file_length int64 0 41.6M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 90
values |
|---|---|---|---|---|---|---|
null | ceph-main/src/cls/timeindex/cls_timeindex_client.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <errno.h>
#include "cls/timeindex/cls_timeindex_ops.h"
#include "cls/timeindex/cls_timeindex_client.h"
#include "include/compat.h"
void cls_timeindex_add(
librados::ObjectWriteOperation& op,
std::list<cls_t... | 2,730 | 21.570248 | 71 | cc |
null | ceph-main/src/cls/timeindex/cls_timeindex_client.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_TIMEINDEX_CLIENT_H
#define CEPH_CLS_TIMEINDEX_CLIENT_H
#include "include/rados/librados.hpp"
#include "cls_timeindex_ops.h"
/**
* timeindex objclass
*/
class TimeindexListCtx : public librados::Objec... | 2,571 | 24.979798 | 89 | h |
null | ceph-main/src/cls/timeindex/cls_timeindex_ops.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_TIMEINDEX_OPS_H
#define CEPH_CLS_TIMEINDEX_OPS_H
#include "cls_timeindex_types.h"
struct cls_timeindex_add_op {
std::list<cls_timeindex_entry> entries;
cls_timeindex_add_op() {}
void encode(ceph... | 2,832 | 23.422414 | 78 | h |
null | ceph-main/src/cls/timeindex/cls_timeindex_types.cc | #include "cls_timeindex_types.h"
#include "common/Formatter.h"
void cls_timeindex_entry::dump(Formatter *f) const
{
f->dump_stream("key_ts") << key_ts;
f->dump_string("key_ext", key_ext);
f->dump_string("value", value.to_str());
}
void cls_timeindex_entry::generate_test_instances(std::list<cls_timeindex_entry*>... | 543 | 23.727273 | 85 | cc |
null | ceph-main/src/cls/timeindex/cls_timeindex_types.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_TIMEINDEX_TYPES_H
#define CEPH_CLS_TIMEINDEX_TYPES_H
#include "include/encoding.h"
#include "include/types.h"
#include "include/utime.h"
class JSONObj;
struct cls_timeindex_entry {
/* Mandatory time... | 1,147 | 23.425532 | 74 | h |
null | ceph-main/src/cls/user/cls_user.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <errno.h>
#include "include/utime.h"
#include "objclass/objclass.h"
#include "cls_user_ops.h"
using std::map;
using std::string;
using ceph::bufferlist;
using ceph::decode;
using ceph::encode;
CLS_VER(1,0)
C... | 13,953 | 25.229323 | 132 | cc |
null | ceph-main/src/cls/user/cls_user_client.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <errno.h>
#include "cls/user/cls_user_client.h"
#include "include/rados/librados.hpp"
using std::list;
using std::string;
using ceph::bufferlist;
using ceph::real_clock;
using librados::IoCtx;
using librados:... | 4,490 | 26.218182 | 162 | cc |
null | ceph-main/src/cls/user/cls_user_client.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_USER_CLIENT_H
#define CEPH_CLS_USER_CLIENT_H
#include "include/rados/librados_fwd.hpp"
#include "cls_user_ops.h"
#include "common/RefCountedObj.h"
class RGWGetUserHeader_CB : public RefCountedObject {
p... | 1,284 | 33.72973 | 115 | h |
null | ceph-main/src/cls/user/cls_user_ops.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "cls/user/cls_user_ops.h"
#include "common/Formatter.h"
#include "common/ceph_json.h"
using std::list;
using ceph::Formatter;
void cls_user_set_buckets_op::dump(Formatter *f) const
{
encode_json("entries", e... | 3,204 | 25.932773 | 105 | cc |
null | ceph-main/src/cls/user/cls_user_ops.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_USER_OPS_H
#define CEPH_CLS_USER_OPS_H
#include "cls_user_types.h"
struct cls_user_set_buckets_op {
std::list<cls_user_bucket_entry> entries;
bool add;
ceph::real_time time; /* op time */
cls_u... | 6,495 | 23.238806 | 87 | h |
null | ceph-main/src/cls/user/cls_user_types.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "cls/user/cls_user_types.h"
#include "common/Formatter.h"
#include "common/ceph_json.h"
#include "include/utime.h"
using std::list;
using std::string;
using ceph::Formatter;
using ceph::bufferlist;
using ceph::... | 2,995 | 25.75 | 85 | cc |
null | ceph-main/src/cls/user/cls_user_types.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_USER_TYPES_H
#define CEPH_CLS_USER_TYPES_H
#include "include/encoding.h"
#include "include/types.h"
#include "include/utime.h"
#include "common/ceph_time.h"
/*
* this needs to be compatible with rgw_bu... | 6,382 | 27.368889 | 94 | h |
null | ceph-main/src/cls/version/cls_version.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <errno.h>
#include "objclass/objclass.h"
#include "cls/version/cls_version_ops.h"
#include "include/compat.h"
using std::list;
using ceph::bufferlist;
CLS_VER(1,0)
CLS_NAME(version)
#define VERSION_ATTR "... | 5,503 | 22.029289 | 128 | cc |
null | ceph-main/src/cls/version/cls_version_client.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <errno.h>
#include "cls/version/cls_version_client.h"
#include "include/rados/librados.hpp"
using namespace librados;
void cls_version_set(librados::ObjectWriteOperation& op, obj_version& objv)
{
bufferlis... | 2,202 | 19.980952 | 93 | cc |
null | ceph-main/src/cls/version/cls_version_client.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_VERSION_CLIENT_H
#define CEPH_CLS_VERSION_CLIENT_H
#include "include/rados/librados_fwd.hpp"
#include "cls_version_ops.h"
/*
* version objclass
*/
void cls_version_set(librados::ObjectWriteOperation&... | 1,075 | 31.606061 | 96 | h |
null | ceph-main/src/cls/version/cls_version_ops.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_VERSION_OPS_H
#define CEPH_CLS_VERSION_OPS_H
#include "cls_version_types.h"
struct cls_version_set_op {
obj_version objv;
cls_version_set_op() {}
void encode(ceph::buffer::list& bl) const {
... | 1,876 | 19.182796 | 70 | h |
null | ceph-main/src/cls/version/cls_version_types.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "cls/version/cls_version_types.h"
#include "common/Formatter.h"
#include "common/ceph_json.h"
void obj_version::dump(ceph::Formatter *f) const
{
f->dump_int("ver", ver);
f->dump_string("tag", tag);
}
void ... | 453 | 21.7 | 70 | cc |
null | ceph-main/src/cls/version/cls_version_types.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_CLS_VERSION_TYPES_H
#define CEPH_CLS_VERSION_TYPES_H
#include "include/encoding.h"
#include "include/types.h"
class JSONObj;
struct obj_version {
uint64_t ver;
std::string tag;
obj_version() : ver(... | 1,926 | 18.464646 | 70 | h |
null | ceph-main/src/common/AsyncOpTracker.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "common/AsyncOpTracker.h"
#include "include/Context.h"
AsyncOpTracker::AsyncOpTracker()
{
}
AsyncOpTracker::~AsyncOpTracker() {
std::lock_guard locker(m_lock);
ceph_assert(m_pending_ops == 0);
}
void Async... | 1,041 | 18.660377 | 70 | cc |
null | ceph-main/src/common/AsyncOpTracker.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_ASYNC_OP_TRACKER_H
#define CEPH_ASYNC_OP_TRACKER_H
#include "common/ceph_mutex.h"
#include "include/Context.h"
class AsyncOpTracker {
public:
AsyncOpTracker();
~AsyncOpTracker();
void start_op();
v... | 1,018 | 19.795918 | 70 | h |
null | ceph-main/src/common/AsyncReserver.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 9,780 | 29.470405 | 93 | h |
null | ceph-main/src/common/BackTrace.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <ostream>
#include <cxxabi.h>
#include <string.h>
#include "BackTrace.h"
#include "common/version.h"
#include "common/Formatter.h"
namespace ceph {
void ClibBackTrace::print(std::ostream& out) const
{
out <<... | 2,248 | 23.714286 | 88 | cc |
null | ceph-main/src/common/BackTrace.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_BACKTRACE_H
#define CEPH_BACKTRACE_H
#include "acconfig.h"
#include <iosfwd>
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
#include <stdlib.h>
#include <list>
#include <string>
namespace ceph {
clas... | 1,492 | 17.898734 | 73 | h |
null | ceph-main/src/common/CDC.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <random>
#include "CDC.h"
#include "FastCDC.h"
#include "FixedCDC.h"
std::unique_ptr<CDC> CDC::create(
const std::string& type,
int bits,
int windowbits)
{
if (type == "fastcdc") {
return std::uniqu... | 1,010 | 20.978261 | 70 | cc |
null | ceph-main/src/common/CDC.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include <vector>
#include <string>
#include "include/types.h"
#include "include/buffer.h"
class CDC {
public:
virtual ~CDC() = default;
/// calculate chunk boundaries as vector of (offset, length) pa... | 776 | 24.064516 | 80 | h |
null | ceph-main/src/common/Checksummer.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_OS_BLUESTORE_CHECKSUMMER
#define CEPH_OS_BLUESTORE_CHECKSUMMER
#include "include/buffer.h"
#include "include/byteorder.h"
#include "include/ceph_assert.h"
#include "xxHash/xxhash.h"
class Checksummer {
pub... | 6,958 | 24.305455 | 168 | h |
null | ceph-main/src/common/Clock.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 761 | 19.594595 | 70 | h |
null | ceph-main/src/common/CommandTable.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2016 Red Hat Inc
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License versi... | 2,151 | 18.044248 | 76 | h |
null | ceph-main/src/common/Cond.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 3,193 | 24.96748 | 84 | h |
null | ceph-main/src/common/ConfUtils.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 10,243 | 29.041056 | 86 | cc |
null | ceph-main/src/common/ConfUtils.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 2,911 | 31.719101 | 78 | h |
null | ceph-main/src/common/ContextCompletion.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "common/ContextCompletion.h"
namespace ceph
{
ContextCompletion::ContextCompletion(Context *ctx, bool ignore_enoent)
: m_ctx(ctx),
m_ignore_enoent(ignore_enoent), m_ret(0), m_building(true), m_current_ops(... | 1,009 | 19.2 | 80 | cc |
null | ceph-main/src/common/ContextCompletion.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_ASYNC_COMPLETION_H
#define CEPH_ASYNC_COMPLETION_H
#include "include/Context.h"
namespace ceph {
class ContextCompletion {
public:
ContextCompletion(Context *ctx, bool ignore_enoent);
void finish_addin... | 957 | 19.382979 | 70 | h |
null | ceph-main/src/common/Continuation.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2014 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 5,470 | 30.262857 | 79 | h |
null | ceph-main/src/common/Cycles.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2014 UnitedStack <haomai@unitedstack.com>
*
* Author: Haomai Wang <haomaiwang@gmail.com>
*
* This is free software; you can redistribute it and/or
* m... | 7,888 | 34.696833 | 79 | cc |
null | ceph-main/src/common/Cycles.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2014 UnitedStack <haomai@unitedstack.com>
*
* Author: Haomai Wang <haomaiwang@gmail.com>
*
* This is free software; you can redistribute it and/or
* m... | 3,877 | 31.864407 | 108 | h |
null | ceph-main/src/common/DecayCounter.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 1,755 | 20.95 | 72 | cc |
null | ceph-main/src/common/DecayCounter.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 2,902 | 20.189781 | 88 | h |
null | ceph-main/src/common/EventTrace.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) Intel Corporation.
* All rights reserved.
*
* Author: Anjaneya Chagam <anjaneya.chagam@intel.com>
*
* This is free software; you can redistribute it an... | 3,808 | 28.757813 | 101 | cc |
null | ceph-main/src/common/EventTrace.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2016 Intel Corporation.
* All rights reserved.
*
* Author: Anjaneya Chagam <anjaneya.chagam@intel.com>
*
* This is free software; you can redistribute ... | 2,594 | 31.4375 | 105 | h |
null | ceph-main/src/common/FastCDC.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <random>
#include "FastCDC.h"
// Unlike FastCDC described in the paper, if we are close to the
// target, use the target mask. If we are very small or very large,
// use an adjusted mask--like the paper. Thi... | 4,705 | 25.587571 | 74 | cc |
null | ceph-main/src/common/FastCDC.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include "CDC.h"
// Based on this paper:
// https://www.usenix.org/system/files/conference/atc16/atc16-paper-xia.pdf
//
// Changes:
// - window size fixed at 64 bytes (to match our word size)
// - use... | 1,803 | 31.8 | 79 | h |
null | ceph-main/src/common/Finisher.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "Finisher.h"
#define dout_subsys ceph_subsys_finisher
#undef dout_prefix
#define dout_prefix *_dout << "finisher(" << this << ") "
void Finisher::start()
{
ldout(cct, 10) << __func__ << dendl;
finisher_thre... | 2,808 | 27.958763 | 79 | cc |
null | ceph-main/src/common/Finisher.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 6,719 | 27 | 108 | h |
null | ceph-main/src/common/FixedCDC.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma
#include "FixedCDC.h"
void FixedCDC::calc_chunks(
const bufferlist& bl,
std::vector<std::pair<uint64_t, uint64_t>> *chunks) const
{
size_t len = bl.length();
if (!len) {
return;
}
for (size_t pos... | 464 | 21.142857 | 76 | cc |
null | ceph-main/src/common/FixedCDC.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include "CDC.h"
class FixedCDC : public CDC {
private:
size_t chunk_size;
public:
FixedCDC(int target = 18, int window_bits = 0) {
set_target_bits(target, window_bits);
};
void set_target_bit... | 519 | 20.666667 | 71 | h |
null | ceph-main/src/common/Formatter.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 22,116 | 22.086639 | 121 | cc |
null | ceph-main/src/common/Formatter.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_FORMATTER_H
#define CEPH_FORMATTER_H
#include "include/int_types.h"
#include "include/buffer_fwd.h"
#include <deque>
#include <list>
#include <memory>
#include <vector>
#include <stdarg.h>
#include <sstream>... | 12,259 | 37.074534 | 117 | h |
null | ceph-main/src/common/Graylog.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "Graylog.h"
#include "common/Formatter.h"
#include "common/LogEntry.h"
#include "log/Entry.h"
#include "log/SubsystemMap.h"
using std::cerr;
namespace ceph::logging {
Graylog::Graylog(const SubsystemMap * cons... | 4,802 | 29.207547 | 89 | cc |
null | ceph-main/src/common/Graylog.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef __CEPH_LOG_GRAYLOG_H
#define __CEPH_LOG_GRAYLOG_H
#include <boost/asio.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include "include/ceph_assert.h" // boost c... | 2,008 | 22.916667 | 76 | h |
null | ceph-main/src/common/HBHandle.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
class HBHandle {
public:
virtual void reset_tp_timeout() = 0;
virtual void suspend_tp_timeout() = 0;
virtual ~HBHandle() {}
};
| 246 | 19.583333 | 70 | h |
null | ceph-main/src/common/HTMLFormatter.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 3,603 | 21.666667 | 115 | cc |
null | ceph-main/src/common/HTMLFormatter.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_HTML_FORMATTER_H
#define CEPH_HTML_FORMATTER_H
#include "Formatter.h"
namespace ceph {
class HTMLFormatter : public XMLFormatter {
public:
explicit HTMLFormatter(bool pretty = false);
~HTMLFormat... | 1,201 | 31.486486 | 114 | h |
null | ceph-main/src/common/HeartbeatMap.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Publi... | 5,379 | 28.081081 | 129 | cc |
null | ceph-main/src/common/HeartbeatMap.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Publi... | 2,828 | 27.29 | 83 | h |
null | ceph-main/src/common/Initialize.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2014 UnitedStack <haomai@unitedstack.com>
*
* Author: Haomai Wang <haomaiwang@gmail.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of... | 4,046 | 40.721649 | 78 | h |
null | ceph-main/src/common/Journald.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "Journald.h"
#include <endian.h>
#include <fcntl.h>
#include <iterator>
#include <memory>
#include <string>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <syslog... | 8,058 | 24.184375 | 112 | cc |
null | ceph-main/src/common/Journald.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_COMMON_JOURNALD_H
#define CEPH_COMMON_JOURNALD_H
#include "acconfig.h"
#include <memory>
#include <sys/types.h>
#include <sys/socket.h>
struct LogEntry;
namespace ceph::logging {
class Entry;
class Subsys... | 1,881 | 15.954955 | 70 | h |
null | ceph-main/src/common/LRUSet.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include <functional>
#include <boost/intrusive/list.hpp>
#include <boost/intrusive/unordered_set.hpp>
#include "include/encoding.h"
/// Combination of an LRU with fast hash-based membership lookup
template... | 3,133 | 20.465753 | 88 | h |
null | ceph-main/src/common/LogClient.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 9,363 | 27.204819 | 112 | cc |
null | ceph-main/src/common/LogClient.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 6,440 | 24.160156 | 75 | h |
null | ceph-main/src/common/LogEntry.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
//
#include <syslog.h>
#include <boost/algorithm/string/predicate.hpp>
#include "LogEntry.h"
#include "Formatter.h"
#include "include/stringify.h"
using std::list;
using std::map;
using std::make_pair;
using std::pair;
u... | 8,459 | 22.434903 | 78 | cc |
null | ceph-main/src/common/LogEntry.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 5,587 | 25.234742 | 94 | h |
null | ceph-main/src/common/MemoryModel.cc | #include "MemoryModel.h"
#include "include/compat.h"
#include "debug.h"
#if defined(__linux__)
#include <malloc.h>
#endif
#include <fstream>
#define dout_subsys ceph_subsys_
using namespace std;
MemoryModel::MemoryModel(CephContext *cct_)
: cct(cct_)
{
}
void MemoryModel::_sample(snap *psnap)
{
ifstream f;
... | 2,380 | 23.546392 | 102 | cc |
null | ceph-main/src/common/MemoryModel.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 1,073 | 18.527273 | 71 | h |
null | ceph-main/src/common/OpQueue.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 2,063 | 26.891892 | 77 | h |
null | ceph-main/src/common/OutputDataSocket.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License... | 10,488 | 24.708333 | 84 | cc |
null | ceph-main/src/common/OutputDataSocket.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License... | 1,586 | 22.338235 | 71 | h |
null | ceph-main/src/common/PluginRegistry.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph distributed storage system
*
* Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>
* Copyright (C) 2014 Red Hat <contact@redhat.com>
*
* Author: Loic Dachary <loic@dachary.org>
*
* This li... | 6,167 | 25.472103 | 102 | cc |
null | ceph-main/src/common/PluginRegistry.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph distributed storage system
*
* Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>
* Copyright (C) 2014 Red Hat <contact@redhat.com>
*
* Author: Loic Dachary <loic@dachary.org>
*
* This li... | 1,844 | 25.73913 | 76 | h |
null | ceph-main/src/common/Preforker.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_COMMON_PREFORKER_H
#define CEPH_COMMON_PREFORKER_H
#include <signal.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sstream>
#include "common/errno.h"
#include "common/safe_io.... | 3,578 | 23.682759 | 88 | h |
null | ceph-main/src/common/PrioritizedQueue.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 9,370 | 25.546742 | 78 | h |
null | ceph-main/src/common/PriorityCache.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2018 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 14,280 | 34.088452 | 89 | cc |
null | ceph-main/src/common/PriorityCache.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2018 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 4,692 | 27.969136 | 101 | h |
null | ceph-main/src/common/QueueRing.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef QUEUE_RING_H
#define QUEUE_RING_H
#include "common/ceph_mutex.h"
#include <list>
#include <atomic>
#include <vector>
template <class T>
class QueueRing {
struct QueueBucket {
ceph::mutex lock = ceph::make... | 1,362 | 19.969231 | 72 | h |
null | ceph-main/src/common/RWLock.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 6,180 | 21.476364 | 95 | h |
null | ceph-main/src/common/Readahead.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "common/Readahead.h"
#include "common/Cond.h"
using std::vector;
Readahead::Readahead()
: m_trigger_requests(10),
m_readahead_min_bytes(0),
m_readahead_max_bytes(NO_LIMIT),
m_alignments(),
m_n... | 5,508 | 26.964467 | 95 | cc |
null | ceph-main/src/common/Readahead.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_READAHEAD_H
#define CEPH_READAHEAD_H
#include <list>
#include <vector>
#include "include/Context.h"
#include "common/ceph_mutex.h"
/**
This class provides common state and logic for code that needs to p... | 5,113 | 29.440476 | 104 | h |
null | ceph-main/src/common/RefCountedObj.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
//
#include "include/ceph_assert.h"
#include "common/RefCountedObj.h"
#include "common/ceph_context.h"
#include "common/dout.h"
#include "common/valgrind.h"
namespace TOPNSPC::common {
RefCountedObject::~RefCountedObject... | 1,025 | 22.318182 | 77 | cc |
null | ceph-main/src/common/RefCountedObj.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 4,821 | 22.753695 | 89 | h |
null | ceph-main/src/common/Semaphore.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General ... | 864 | 17.404255 | 71 | h |
null | ceph-main/src/common/SloppyCRCMap.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "common/SloppyCRCMap.h"
#include "common/Formatter.h"
using namespace std;
using ceph::bufferlist;
void SloppyCRCMap::write(uint64_t offset, uint64_t len, const bufferlist& bl,
std::ostream *out)
{
int64... | 4,663 | 24.347826 | 93 | cc |
null | ceph-main/src/common/SloppyCRCMap.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_COMMON_SLOPPYCRCMAP_H
#define CEPH_COMMON_SLOPPYCRCMAP_H
#include "include/encoding.h"
namespace ceph {
class Formatter;
}
/**
* SloppyCRCMap
*
* Opportunistically track CRCs on any reads or writes tha... | 1,964 | 24.519481 | 91 | h |
null | ceph-main/src/common/StackStringStream.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2018 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License vers... | 4,934 | 24.569948 | 79 | h |
null | ceph-main/src/common/SubProcess.cc | #include "SubProcess.h"
#if defined(__FreeBSD__) || defined(__APPLE__)
#include <sys/types.h>
#include <signal.h>
#endif
#include <stdarg.h>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include "common/errno.h"
#include "include/ceph_assert.h"
#include "include/compat.h"
SubProcess::SubProcess(const c... | 9,437 | 22.893671 | 107 | cc |
null | ceph-main/src/common/SubProcess.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph distributed storage system
*
* Copyright (C) 2015 Mirantis Inc
*
* Author: Mykola Golub <mgolub@mirantis.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the term... | 2,902 | 19.884892 | 70 | h |
null | ceph-main/src/common/TextTable.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2012 Inktank Storage, Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Lice... | 2,242 | 23.380435 | 70 | cc |
null | ceph-main/src/common/TextTable.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2012 Inktank Storage, Inc.
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Lice... | 4,269 | 23.261364 | 73 | h |
null | ceph-main/src/common/Thread.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Lic... | 4,856 | 20.025974 | 75 | cc |
null | ceph-main/src/common/Thread.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Lic... | 1,941 | 22.119048 | 71 | h |
null | ceph-main/src/common/Throttle.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "include/scope_guard.h"
#include "common/Throttle.h"
#include "common/ceph_time.h"
#include "common/perf_counters.h"
// re-include our assert to clobber the system one; fix dout:
#include "include/ceph_assert.... | 21,092 | 22.753378 | 114 | cc |
null | ceph-main/src/common/Throttle.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_THROTTLE_H
#define CEPH_THROTTLE_H
#include <atomic>
#include <chrono>
#include <iostream>
#include <list>
#include <map>
#include "common/ceph_mutex.h"
#include "include/Context.h"
#include "common/Throttl... | 12,846 | 26.334043 | 89 | h |
null | ceph-main/src/common/ThrottleInterface.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include <cstdint>
class ThrottleInterface {
public:
virtual ~ThrottleInterface() {}
/**
* take the specified number of slots from the stock regardless the throttling
* @param c number of slots to... | 606 | 24.291667 | 80 | h |
null | ceph-main/src/common/Timer.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 5,874 | 24.995575 | 114 | cc |
null | ceph-main/src/common/Timer.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 3,185 | 28.5 | 81 | h |
null | ceph-main/src/common/TracepointProvider.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "common/TracepointProvider.h"
#include "common/config.h"
TracepointProvider::TracepointProvider(CephContext *cct, const char *library,
const char *config_key)
: m_cct(cct... | 1,148 | 23.978261 | 77 | cc |
null | ceph-main/src/common/TracepointProvider.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_TRACEPOINT_PROVIDER_H
#define CEPH_TRACEPOINT_PROVIDER_H
#include "common/ceph_context.h"
#include "common/config_obs.h"
#include "common/ceph_mutex.h"
#include "include/dlfcn_compat.h"
class TracepointProv... | 2,258 | 26.216867 | 79 | h |
null | ceph-main/src/common/TrackedOp.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Softw... | 14,052 | 26.340467 | 111 | cc |
null | ceph-main/src/common/TrackedOp.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2012 New Dream Network/Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Les... | 12,029 | 28.128329 | 142 | h |
null | ceph-main/src/common/WeightedPriorityQueue.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General P... | 10,003 | 27.259887 | 86 | h |