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/common/WorkQueue.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 ...
10,365
24.160194
126
cc
null
ceph-main/src/common/WorkQueue.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 ...
18,509
25.90407
99
h
null
ceph-main/src/common/admin_socket.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 ...
21,714
26.452592
82
cc
null
ceph-main/src/common/admin_socket.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 ...
7,193
31.405405
112
h
null
ceph-main/src/common/admin_socket_client.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 ...
4,598
25.583815
98
cc
null
ceph-main/src/common/admin_socket_client.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 ...
908
24.25
75
h
null
ceph-main/src/common/aix_errno.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 ...
5,361
22.112069
70
cc
null
ceph-main/src/common/allocate_unique.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) 2020 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....
2,217
30.685714
80
h
null
ceph-main/src/common/arch.h
#ifndef CEPH_ARCH_H #define CEPH_ARCH_H static const char *get_arch() { #if defined(__i386__) return "i386"; #elif defined(__x86_64__) return "x86-64"; #else return "unknown"; #endif } #endif
202
11.6875
29
h
null
ceph-main/src/common/armor.h
#ifndef CEPH_ARMOR_H #define CEPH_ARMOR_H #ifdef __cplusplus extern "C" { #endif int ceph_armor(char *dst, char * const dst_end, const char * src, const char *end); int ceph_armor_linebreak(char *dst, char * const dst_end, const char *src, const char *end, int line_width); int ceph_unarmor(ch...
432
19.619048
57
h
null
ceph-main/src/common/assert.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) 2008-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...
7,321
27.27027
79
cc
null
ceph-main/src/common/autovector.h
// Copyright (c) 2018-Present Red Hat Inc. All rights reserved. // // Copyright (c) 2011-2018, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 and Apache 2.0 License #ifndef CEPH_AUTOVECTOR_H #define CEPH_AUTOVECTOR_H #include <algorithm> #include <cassert> #include <initial...
8,854
25.275964
79
h
null
ceph-main/src/common/bit_str.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) 2016 SUSE LINUX GmbH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ve...
1,710
22.438356
70
cc
null
ceph-main/src/common/bit_str.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 SUSE LINUX GmbH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ve...
913
23.052632
70
h
null
ceph-main/src/common/bit_vector.hpp
// -*- 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 <contact@redhat.com> * * LGPL2.1 (see COPYING-LGPL2.1) or later */ #ifndef BIT_VECTOR_HPP #define BIT_VECTOR_HPP #include "common/Formatte...
18,156
27.020062
89
hpp
null
ceph-main/src/common/blkdev.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) 2015 Hewlett-Packard Development Company, L.P. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser Ge...
27,142
21.751886
157
cc
null
ceph-main/src/common/blkdev.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef __CEPH_COMMON_BLKDEV_H #define __CEPH_COMMON_BLKDEV_H #include <set> #include <map> #include <string> #include "json_spirit/json_spirit_value.h" extern int get_device_by_path(const char *path, char* partition, c...
2,628
29.929412
106
h
null
ceph-main/src/common/bloom_filter.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "common/bloom_filter.hpp" #include <bit> #include <numeric> using ceph::bufferlist; using ceph::bufferptr; using ceph::Formatter; double bloom_filter::density() const { // TODO: use transform_reduce() in GCC...
3,722
24.5
98
cc
null
ceph-main/src/common/bloom_filter.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* ******************************************************************* * * * Open Bloom Filter * * ...
17,565
28.976109
114
hpp
null
ceph-main/src/common/bounded_key_counter.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) 2017 Red Hat, Inc * * Author: Casey Bodley <cbodley@redhat.com> * * This is free software; you can redistribute it and/or * modify it under the terms o...
5,718
28.786458
80
h
null
ceph-main/src/common/buffer.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...
63,861
26.071641
104
cc
null
ceph-main/src/common/buffer_instrumentation.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/buffer.h" #include "include/buffer_raw.h" namespace ceph::buffer_instrumentation { // this is nothing more than an intermediary for a class hierarchy which // can placed between a user's custom raw and...
985
28.878788
80
h
null
ceph-main/src/common/buffer_seastar.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) 2017 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...
2,622
23.980952
77
cc
null
ceph-main/src/common/buffer_seastar.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <seastar/core/temporary_buffer.hh> #include "include/buffer.h" #include "common/error_code.h" namespace details { template<bool is_const> class buffer_iterator_impl { public: using pointer = std::conditional_...
1,651
25.222222
75
h
null
ceph-main/src/common/ceph_argparse.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...
14,874
23.874582
101
cc
null
ceph-main/src/common/ceph_argparse.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) 2008-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...
3,045
31.752688
81
h
null
ceph-main/src/common/ceph_atomic.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <atomic> // What and why // ============ // // ceph::atomic – thin wrapper to differentiate behavior of atomics. // // Not all users of the common truly need costly atomic operations to // synchron...
2,650
27.202128
107
h
null
ceph-main/src/common/ceph_context.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 * Copyright (C) 2017 OVH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser ...
30,193
27.484906
183
cc
null
ceph-main/src/common/ceph_context.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 ...
10,853
24.538824
88
h
null
ceph-main/src/common/ceph_crypto.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) 2010-2011 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ver...
7,514
28.355469
127
cc
null
ceph-main/src/common/ceph_crypto.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #ifndef CEPH_CRYPTO_H #define CEPH_CRYPTO_H #include "acconfig.h" #include <stdexcept> #include "include/common_fwd.h" #include "include/buffer.h" #include "include/types.h" #define CEPH_CRYPTO_MD5_DIGESTSIZE 16 #define CEPH_CRYPTO_HMACSHA1_DIGES...
5,574
24.573394
76
h
null
ceph-main/src/common/ceph_frag.cc
/* * Ceph 'frag' type */ #include "include/types.h" int ceph_frag_compare(__u32 a, __u32 b) { unsigned va = ceph_frag_value(a); unsigned vb = ceph_frag_value(b); if (va < vb) return -1; if (va > vb) return 1; va = ceph_frag_bits(a); vb = ceph_frag_bits(b); if (va < vb) return -1; if (va > vb) return ...
336
14.318182
39
cc
null
ceph-main/src/common/ceph_fs.cc
/* * ceph_fs.cc - Some Ceph functions that are shared between kernel space and * user space. * */ /* * Some non-inline ceph helpers */ #include "include/types.h" int ceph_flags_to_mode(int flags) { /* because CEPH_FILE_MODE_PIN is zero, so mode = -1 is error */ int mode = -1; if ((flags & CEPH_O_DIRECTORY) ...
2,099
21.826087
80
cc
null
ceph-main/src/common/ceph_hash.cc
#include "include/types.h" /* * Robert Jenkin's hash function. * http://burtleburtle.net/bob/hash/evahash.html * This is in the public domain. */ #define mix(a, b, c) \ do { \ a = a - b; a = a - c; a = a ^ (c >> 13); \ b = b - c; b = b - a; b = b ^ (a << 8); \ c = c - a; c = c - b; c = c ^...
2,949
21.868217
69
cc
null
ceph-main/src/common/ceph_json.cc
#include "common/ceph_json.h" #include "include/utime.h" // for testing DELETE ME #include <fstream> #include <include/types.h> #include <boost/algorithm/string.hpp> #include <boost/tokenizer.hpp> #include <boost/lexical_cast.hpp> #include "json_spirit/json_spirit_writer_template.h" using namespace json_spirit; us...
21,286
20.37249
104
cc
null
ceph-main/src/common/ceph_json.h
#ifndef CEPH_JSON_H #define CEPH_JSON_H #include <stdexcept> #include <typeindex> #include <include/types.h> #include <boost/container/flat_map.hpp> #include <boost/container/flat_set.hpp> #include <include/ceph_fs.h> #include "common/ceph_time.h" #include "json_spirit/json_spirit.h" #include "Formatter.h" class ...
23,382
24.035332
126
h
null
ceph-main/src/common/ceph_mutex.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <utility> #include "common/containers.h" // What and why // ============ // // For general code making use of mutexes, use these ceph:: types. // The key requirement is that you make use of the cep...
6,126
26.977169
95
h
null
ceph-main/src/common/ceph_releases.cc
#include "ceph_releases.h" #include <ostream> #include "ceph_ver.h" std::ostream& operator<<(std::ostream& os, const ceph_release_t r) { return os << ceph_release_name(static_cast<int>(r)); } ceph_release_t ceph_release() { return ceph_release_t{CEPH_RELEASE}; } ceph_release_t ceph_release_from_name(std::strin...
1,577
25.745763
92
cc
null
ceph-main/src/common/ceph_releases.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <cstdint> #include <iosfwd> #include <string_view> #include "common/ceph_strings.h" // the C++ version of CEPH_RELEASE_* defined by include/rados.h enum class ceph_release_t : std::uint8_t { unk...
2,108
22.433333
70
h
null
ceph-main/src/common/ceph_strings.cc
/* * Ceph string constants */ #include "ceph_strings.h" #include "include/types.h" #include "include/ceph_features.h" const char *ceph_entity_type_name(int type) { switch (type) { case CEPH_ENTITY_TYPE_MDS: return "mds"; case CEPH_ENTITY_TYPE_OSD: return "osd"; case CEPH_ENTITY_TYPE_MON: return "mon"; case CEPH...
10,775
26.560102
75
cc
null
ceph-main/src/common/ceph_strings.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <cstdint> const char *ceph_entity_type_name(int type); const char *ceph_con_mode_name(int con_mode); const char *ceph_osd_op_name(int op); const char *ceph_osd_state_name(int s); const char *ceph_r...
895
33.461538
70
h
null
ceph-main/src/common/ceph_time.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...
9,023
24.709402
82
cc
null
ceph-main/src/common/ceph_time.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...
18,525
32.200717
90
h
null
ceph-main/src/common/ceph_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...
8,643
26.616613
71
h
null
ceph-main/src/common/cmdparse.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) 2013 Inktank Storage, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License ve...
19,223
25.013532
77
cc
null
ceph-main/src/common/cmdparse.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_COMMON_CMDPARSE_H #define CEPH_COMMON_CMDPARSE_H #include <vector> #include <stdexcept> #include <optional> #include <ostream> #include <boost/variant.hpp> #include "include/ceph_assert.h" // boost clobbers ...
3,517
26.271318
80
h
null
ceph-main/src/common/code_environment.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 ...
2,668
20.015748
80
cc
null
ceph-main/src/common/code_environment.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,173
25.681818
77
h
null
ceph-main/src/common/cohort_lru.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Copyright (C) 2015 CohortFS, LLC. * * 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 Software *...
12,135
23.320641
77
h
null
ceph-main/src/common/common_init.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) 2010-2011 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ver...
3,850
27.738806
76
cc
null
ceph-main/src/common/common_init.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) 2009-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...
2,802
30.494382
78
h
null
ceph-main/src/common/compat.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 * Copyright (C) 2018 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the G...
12,911
21.732394
81
cc
null
ceph-main/src/common/compiler_extensions.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 ...
796
24.709677
74
h
null
ceph-main/src/common/condition_variable_debug.cc
#include "condition_variable_debug.h" #include "common/mutex_debug.h" namespace ceph { condition_variable_debug::condition_variable_debug() : waiter_mutex{nullptr} { int r = pthread_cond_init(&cond, nullptr); if (r) { throw std::system_error(r, std::generic_category()); } } condition_variable_debug::~con...
2,202
26.5375
75
cc
null
ceph-main/src/common/condition_variable_debug.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <condition_variable> #include <ctime> #include <pthread.h> #include "common/ceph_time.h" namespace ceph { namespace mutex_debug_detail { template<bool> class mutex_debug_impl; } class condition...
2,464
28.345238
71
h
null
ceph-main/src/common/fd.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-2012 Inktank * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License versi...
534
22.26087
70
h
null
ceph-main/src/common/config.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...
44,610
27.270596
312
cc
null
ceph-main/src/common/config.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...
13,123
33.997333
101
h
null
ceph-main/src/common/config_cacher.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...
1,523
24.4
74
h
null
ceph-main/src/common/config_fwd.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #pragma once #include "include/common_fwd.h" namespace TOPNSPC::common { class ConfigProxy; } using TOPNSPC::common::ConfigProxy;
205
19.6
70
h
null
ceph-main/src/common/config_obs.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...
1,819
34.686275
104
h
null
ceph-main/src/common/config_obs_mgr.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #pragma once #include <map> #include <set> #include <string> #include "common/config_tracker.h" class ConfigValues; // @c ObserverMgr manages a set of config observers which are interested in // the changes of settings at runtime. template<clas...
4,114
33.579832
90
h
null
ceph-main/src/common/config_proxy.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #pragma once #include <type_traits> #include "common/config.h" #include "common/config_obs.h" #include "common/config_obs_mgr.h" #include "common/ceph_mutex.h" // @c ConfigProxy is a facade of multiple config related classes. it exposes // the le...
11,013
30.201133
82
h
null
ceph-main/src/common/config_tracker.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #pragma once #include <string> // @ConfigTracker is queried to see if any added observers is tracking one or // more changed settings. // // this class is introduced in hope to decouple @c md_config_t from any instantiated // class of @c Observer...
671
34.368421
84
h
null
ceph-main/src/common/config_values.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #include "config_values.h" #include "config.h" #if WITH_SEASTAR #include "crimson/common/log.h" #endif ConfigValues::set_value_result_t ConfigValues::set_value(const std::string_view key, Option::value_t&& new_value, ...
2,281
24.076923
70
cc
null
ceph-main/src/common/config_values.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #pragma once #include <cstdint> #include <map> #include <set> #include <string> #include <utility> #include "common/entity_name.h" #include "common/options.h" #include "log/SubsystemMap.h" #include "msg/msg_types.h" // @c ConfigValues keeps trac...
3,254
31.227723
81
h
null
ceph-main/src/common/containers.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 ver...
6,547
32.408163
74
h
null
ceph-main/src/common/convenience.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,276
30.448529
72
h
null
ceph-main/src/common/crc32c.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/crc32c.h" #include "arch/probe.h" #include "arch/intel.h" #include "arch/arm.h" #include "arch/ppc.h" #include "common/sctp_crc32.h" #include "common/crc32c_intel_fast.h" #include "common/crc32c_aarch64....
15,943
65.157676
101
cc
null
ceph-main/src/common/crc32c_aarch64.h
#ifndef CEPH_COMMON_CRC32C_AARCH64_H #define CEPH_COMMON_CRC32C_AARCH64_H #include "acconfig.h" #include "arch/arm.h" #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_ARMV8_CRC extern uint32_t ceph_crc32c_aarch64(uint32_t crc, unsigned char const *buffer, unsigned len); #else static inline uint32_t ceph_crc32c_...
445
14.37931
99
h
null
ceph-main/src/common/crc32c_intel_baseline.h
#ifndef CEPH_COMMON_CRC32C_INTEL_BASELINE_H #define CEPH_COMMON_CRC32C_INTEL_BASELINE_H #include "include/int_types.h" #ifdef __cplusplus extern "C" { #endif extern uint32_t ceph_crc32c_intel_baseline(uint32_t crc, unsigned char const *buffer, unsigned len); #ifdef __cplusplus } #endif #endif
299
16.647059
100
h
null
ceph-main/src/common/crc32c_intel_fast.h
#ifndef CEPH_COMMON_CRC32C_INTEL_FAST_H #define CEPH_COMMON_CRC32C_INTEL_FAST_H #ifdef __cplusplus extern "C" { #endif /* is the fast version compiled in */ extern int ceph_crc32c_intel_fast_exists(void); #ifdef __x86_64__ extern uint32_t ceph_crc32c_intel_fast(uint32_t crc, unsigned char const *buffer, unsigned le...
495
16.103448
102
h
null
ceph-main/src/common/crc32c_ppc.h
/* Copyright (C) 2017 International Business Machines Corp. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) ...
577
24.130435
89
h
null
ceph-main/src/common/crc32c_ppc_constants.h
/* Copyright (C) 2017 International Business Machines Corp. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) ...
31,832
31.482653
104
h
null
ceph-main/src/common/darwin_errno.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 ...
5,457
22.324786
70
cc
null
ceph-main/src/common/debug.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...
850
22.638889
70
h
null
ceph-main/src/common/deleter.h
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
7,899
29.152672
107
h
null
ceph-main/src/common/dns_resolve.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) 2016 SUSE LINUX GmbH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ve...
9,264
23.839142
91
cc
null
ceph-main/src/common/dns_resolve.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 SUSE LINUX GmbH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ve...
4,743
27.238095
85
h
null
ceph-main/src/common/dout.cc
#include <iostream> void dout_emergency(const char * const str) { std::cerr << str; std::cerr.flush(); } void dout_emergency(const std::string &str) { std::cerr << str; std::cerr.flush(); }
201
12.466667
43
cc
null
ceph-main/src/common/dout.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-2010 Sage Weil <sage@newdream.net> * Copyright (C) 2010 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the t...
6,715
33.091371
88
h
null
ceph-main/src/common/dummy.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 Inktank, Inc * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
652
30.095238
71
cc
null
ceph-main/src/common/entity_name.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,054
17.403614
89
cc
null
ceph-main/src/common/entity_name.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,519
26.096774
74
h
null
ceph-main/src/common/environment.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 ...
942
20.431818
70
cc
null
ceph-main/src/common/environment.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 ...
570
24.954545
70
h
null
ceph-main/src/common/errno.cc
#include "common/errno.h" #include "acconfig.h" #include "include/compat.h" #include <sstream> #include <string.h> std::string cpp_strerror(int err) { char buf[128]; char *errmsg; if (err < 0) err = -err; std::ostringstream oss; errmsg = ceph_strerror_r(err, buf, sizeof(buf)); oss << "(" << err << ...
359
14.652174
50
cc
null
ceph-main/src/common/errno.h
#ifndef CEPH_ERRNO_H #define CEPH_ERRNO_H #include <string> /* Return a given error code as a string */ std::string cpp_strerror(int err); #ifdef _WIN32 // While cpp_strerror handles errors defined in errno.h, this one // accepts standard Windows error codes. std::string win32_strerror(int err); std::string win32_la...
363
20.411765
65
h
null
ceph-main/src/common/error_code.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) 2017 Red Hat, Inc. <contact@redhat.com> * * Author: Adam C. Emerson <aemerson@redhat.com> * * This is free software; you can redistribute it and/or modi...
5,545
27.152284
74
cc
null
ceph-main/src/common/error_code.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) 2017 Red Hat, Inc. <contact@redhat.com> * * Author: Adam C. Emerson <aemerson@redhat.com> * * This is free software; you can redistribute it and/or modi...
4,378
27.809211
79
h
null
ceph-main/src/common/escape.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 ...
6,180
20.536585
76
cc
null
ceph-main/src/common/escape.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,043
30.446154
77
h
null
ceph-main/src/common/event_socket.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) 2015 XSky <haomai@xsky.com> * * Author: Haomai Wang <haomaiwang@gmail.com> * * This is free software; you can redistribute it and/or * modify it under ...
1,702
19.27381
70
h
null
ceph-main/src/common/fair_mutex.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- #pragma once #include "common/ceph_mutex.h" #include <thread> #include <string> namespace ceph { /// a FIFO mutex class fair_mutex { public: fair_mutex(const std::string& name) : mutex{ceph::make_mutex(name)} {} ~fair_mutex() = defau...
1,494
17.45679
72
h
null
ceph-main/src/common/fault_injector.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2020 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Licen...
4,680
33.419118
79
h
null
ceph-main/src/common/fd.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-2012 Inktank * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License versi...
1,457
23.3
100
cc
null
ceph-main/src/common/fork_function.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab // Run a function in a forked child, with a timeout. #pragma once #include <functional> #include <iostream> #include <ostream> #include <signal.h> #ifndef _WIN32 #include <sys/wait.h> #endif #include <sys/types.h> #in...
4,562
24.779661
74
h
null
ceph-main/src/common/freebsd_errno.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,162
45.195455
90
cc
null
ceph-main/src/common/fs_types.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/fs_types.h" #include "common/Formatter.h" #include "include/ceph_features.h" #include "common/ceph_json.h" void dump(const ceph_file_layout& l, ceph::Formatter *f) { f->dump_unsigned("stripe_unit", l....
4,209
26.880795
80
cc
null
ceph-main/src/common/function_signature.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Copied from: * https://github.com/exclipy/inline_variant_visitor/blob/master/function_signature.hpp * which apparently copied it from * http://stackoverflow.com/questions/4771417/how-to-get-the-signature-of-a-c-bi...
1,474
29.729167
93
h