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/hex.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...
965
25.833333
80
cc
null
ceph-main/src/common/hex.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...
630
23.269231
70
h
null
ceph-main/src/common/histogram.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 ...
1,415
23
77
cc
null
ceph-main/src/common/histogram.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 * * 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...
2,973
22.054264
83
h
null
ceph-main/src/common/hobject.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <charconv> #include "hobject.h" #include "common/Formatter.h" using std::list; using std::ostream; using std::set; using std::string; using ceph::bufferlist; using ceph::Formatter; static void append_escaped(...
14,478
22.658497
87
cc
null
ceph-main/src/common/hobject.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 ...
13,472
25.110465
83
h
null
ceph-main/src/common/hobject_fmt.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once /** * \file fmtlib formatters for some hobject.h classes */ #include <fmt/format.h> #include <fmt/ranges.h> #include "common/hobject.h" #include "include/object_fmt.h" #include "msg/msg_fmt.h" // \todo re...
1,398
24.907407
88
h
null
ceph-main/src/common/hostname.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,014
20.595745
71
cc
null
ceph-main/src/common/hostname.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...
601
25.173913
70
h
null
ceph-main/src/common/inline_variant.h
// -*- mode:C++; tab-width:8; c-basic-offset:4; indent-tabs-mode:t -*- // vim: ts=8 sw=4 smarttab /* * Copied from: * https://github.com/exclipy/inline_variant_visitor/blob/master/inline_variant.hpp */ #ifndef INLINE_VARIANT_H #define INLINE_VARIANT_H #include <boost/function_types/function_arity.hpp> #include <bo...
7,222
33.070755
118
h
null
ceph-main/src/common/interval_map.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 * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
7,720
25.624138
81
h
null
ceph-main/src/common/intrusive_lru.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <boost/intrusive_ptr.hpp> #include <boost/intrusive/set.hpp> #include <boost/intrusive/list.hpp> namespace ceph::common { /** * intrusive_lru: lru implementation with embedded map and list hook ...
6,208
24.342857
76
h
null
ceph-main/src/common/ipaddr.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <arpa/inet.h> #include <ifaddrs.h> #include <stdlib.h> #include <string.h> #if defined(__FreeBSD__) #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #endif #include "include/ipaddr.h" #incl...
4,515
23.950276
95
cc
null
ceph-main/src/common/iso_8601.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <iomanip> #include <sstream> #include "iso_8601.h" #include "include/timegm.h" #include "include/ceph_assert.h" namespace ceph { using std::chrono::duration_cast; using std::chrono::nanoseconds; using std::chro...
4,735
21.990291
70
cc
null
ceph-main/src/common/iso_8601.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_COMMON_ISO_8601_H #define CEPH_COMMON_ISO_8601_H #include <string_view> #include <boost/optional.hpp> #include "common/ceph_time.h" namespace ceph { // Here, we support the W3C profile of ISO 8601 with th...
1,803
33.037736
103
h
null
ceph-main/src/common/item_history.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <list> #include <mutex> /* Keep a history of item values so that readers can dereference the pointer to the latest value and continue using it as long as they want. This container is only appropr...
949
18.791667
77
h
null
ceph-main/src/common/likely.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) 2010 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version ...
714
21.34375
70
h
null
ceph-main/src/common/linux_version.h
#ifndef CEPH_LINUX_VERSION_H #define CEPH_LINUX_VERSION_H #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_LINUX_VERSION_H # include <linux/version.h> #endif #ifndef KERNEL_VERSION # define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #endif int get_linux_version(void); #ifdef __cplusplus } #endif #en...
351
14.304348
63
h
null
ceph-main/src/common/lockdep.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...
10,866
26.099751
100
cc
null
ceph-main/src/common/lockdep.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...
1,442
27.86
79
h
null
ceph-main/src/common/lru_map.h
#ifndef CEPH_LRU_MAP_H #define CEPH_LRU_MAP_H #include "common/ceph_mutex.h" template <class K, class V> class lru_map { struct entry { V value; typename std::list<K>::iterator lru_iter; }; std::map<K, entry> entries; std::list<K> entries_lru; ceph::mutex lock = ceph::make_mutex("lru_map::lock"); ...
2,813
20.157895
79
h
null
ceph-main/src/common/mClockPriorityQueue.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...
8,645
22.367568
83
h
null
ceph-main/src/common/map_cacher.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) 2013 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...
5,167
26.057592
72
hpp
null
ceph-main/src/common/mempool.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 Allen Samuels <allen.samuels@sandisk.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser Ge...
3,786
25.858156
100
cc
null
ceph-main/src/common/mime.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,732
29.403509
77
h
null
ceph-main/src/common/module.h
/* * Ceph - scalable distributed file system * * Copyright (C) 2014 Inktank Storage, Inc. * * 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 * Foundation. See file COPYING. * */ #ifnd...
576
19.607143
61
h
null
ceph-main/src/common/mutex_debug.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,508
24.15
79
cc
null
ceph-main/src/common/mutex_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-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...
4,859
22.142857
96
h
null
ceph-main/src/common/numa.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "numa.h" #include <cstring> #include <errno.h> #include <iostream> #include "include/stringify.h" #include "common/safe_io.h" using namespace std::literals; using std::set; // list #if defined(__linux__) in...
5,230
19.042146
80
cc
null
ceph-main/src/common/numa.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <include/compat.h> #include <sched.h> #include <ostream> #include <set> int parse_cpu_set_list(const char *s, size_t *cpu_set_size, cpu_set_t *cpu_set); std::string cpu_set_to_str...
634
24.4
70
h
null
ceph-main/src/common/obj_bencher.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) 2009 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 Public...
43,800
29.396253
106
cc
null
ceph-main/src/common/obj_bencher.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 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 Public...
4,670
34.386364
125
h
null
ceph-main/src/common/openssl_opts_handler.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) 2020 Huawei Technologies Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser Genera...
4,164
27.333333
80
cc
null
ceph-main/src/common/openssl_opts_handler.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 Huawei Technologies Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser Genera...
633
24.36
70
h
null
ceph-main/src/common/options.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "acconfig.h" #include "options.h" #include "common/Formatter.h" #include "common/options/build_options.h" // Helpers for validators #include "include/stringify.h" #include "include/common_fwd.h" #include <boost/...
8,445
23.768328
78
cc
null
ceph-main/src/common/options.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <chrono> #include <string> #include <variant> #include <vector> #include "include/str_list.h" #include "msg/msg_types.h" #include "include/uuid.h" struct Option { enum type_t { TYPE_UINT = 0,...
11,502
26.065882
86
h
null
ceph-main/src/common/ostream_temp.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "common/ostream_temp.h" OstreamTemp::OstreamTemp(clog_type type_, OstreamTempSink *parent_) : type(type_), parent(parent_) { } OstreamTemp::~OstreamTemp() { if (ss.peek() != EOF && parent) parent->do_lo...
335
20
70
cc
null
ceph-main/src/common/ostream_temp.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <sstream> typedef enum { CLOG_DEBUG = 0, CLOG_INFO = 1, CLOG_SEC = 2, CLOG_WARN = 3, CLOG_ERROR = 4, CLOG_UNKNOWN = -1, } clog_type; class OstreamTemp { public: class OstreamTempSink...
1,379
23.210526
70
h
null
ceph-main/src/common/page.cc
#include <unistd.h> #ifdef _WIN32 #include <windows.h> #endif namespace ceph { // page size crap, see page.h int _get_bits_of(int v) { int n = 0; while (v) { n++; v = v >> 1; } return n; } #ifdef _WIN32 unsigned _get_page_size() { SYSTEM_INFO system_info; GetSystemInfo(...
602
16.735294
62
cc
null
ceph-main/src/common/perf_counters.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 ...
17,224
26.083333
96
cc
null
ceph-main/src/common/perf_counters.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 * Copyright (C) 2017 OVH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser...
11,376
28.550649
96
h
null
ceph-main/src/common/perf_counters_collection.cc
#include "common/perf_counters_collection.h" #include "common/ceph_mutex.h" #include "common/ceph_context.h" namespace ceph::common { /* PerfcounterCollection hold the lock for PerfCounterCollectionImp */ PerfCountersCollection::PerfCountersCollection(CephContext *cct) : m_cct(cct), m_lock(ceph::make_mutex("Perf...
1,808
27.265625
120
cc
null
ceph-main/src/common/perf_counters_collection.h
#pragma once #include "common/perf_counters.h" #include "common/ceph_mutex.h" #include "include/common_fwd.h" namespace ceph::common { class PerfCountersCollection { CephContext *m_cct; /** Protects perf_impl->m_loggers */ mutable ceph::mutex m_lock; PerfCountersCollectionImpl perf_impl; public: PerfCounte...
1,351
29.044444
103
h
null
ceph-main/src/common/perf_counters_key.cc
#include "common/perf_counters_key.h" #include <algorithm> #include <iterator> #include <numeric> namespace ceph::perf_counters { namespace detail { // use a null character to delimit strings constexpr char DELIMITER = '\0'; // write a delimited string to the output auto write(std::string_view str, std::output_ite...
6,091
26.075556
75
cc
null
ceph-main/src/common/perf_counters_key.h
#pragma once #include <optional> #include <string> #include <utility> namespace ceph::perf_counters { /// A key/value pair representing a perf counter label using label_pair = std::pair<std::string_view, std::string_view>; /// \brief Construct a key for a perf counter and set of labels. /// /// Returns a string of...
4,245
29.328571
76
h
null
ceph-main/src/common/perf_histogram.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 OVH * * 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, a...
3,271
25.819672
71
cc
null
ceph-main/src/common/perf_histogram.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 OVH * * 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, a...
7,206
30.609649
80
h
null
ceph-main/src/common/pick_address.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...
16,939
25.719243
106
cc
null
ceph-main/src/common/pick_address.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_PICK_ADDRESS_H #define CEPH_PICK_ADDRESS_H #include <string> #include <list> #include "include/common_fwd.h" struct entity_addr_t; class entity_addrvec_t; #define CEPH_PICK_ADDRESS_PUBLIC 0x01 #defin...
3,094
30.262626
97
h
null
ceph-main/src/common/ppc-asm.h
/* PowerPC asm definitions for GNU C. Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of GCC. GCC 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 3, or (at your option) a...
7,342
18.222513
78
h
null
ceph-main/src/common/ppc-opcode.h
/* * Copyright (C) 2015 Anton Blanchard <anton@au.ibm.com>, IBM * * This program is free software; you can redistribute it and/or * modify it under the terms of either: * * a) the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) ...
2,567
37.909091
71
h
null
ceph-main/src/common/pretty_binary.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "pretty_binary.h" #include <stdexcept> #include <sstream> std::string pretty_binary_string_reverse(const std::string& pretty) { size_t i = 0; auto raise = [&](size_t failpos) { std::ostringstream ss; ...
1,916
18.96875
70
cc
null
ceph-main/src/common/pretty_binary.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <string> template<typename S> static std::string pretty_binary_string(const S& bin) { std::string pretty; if (bin.empty()) return pretty; pretty.reserve(bin.length() * 3); auto printabl...
1,561
21.970588
74
h
null
ceph-main/src/common/ptr_wrapper.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) 2019 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 ve...
717
14.608696
70
h
null
ceph-main/src/common/random_string.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <string_view> #include "auth/Crypto.h" #include "common/armor.h" #include "common/ceph_context.h" #include "common/dout.h" #include "random_string.h" int gen_rand_base64(CephContext *cct, char *dest, size...
3,907
29.53125
133
cc
null
ceph-main/src/common/random_string.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) 2004-2009 Sage Weil <sage@newdream.net> * Copyright (C) 2015 Yehuda Sadeh <yehuda@redhat.com> * * This is free software; you can redistribute it ...
1,473
39.944444
84
h
null
ceph-main/src/common/ref.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef COMMON_REF_H #define COMMON_REF_H #include <boost/intrusive_ptr.hpp> namespace ceph { template<typename T> using ref_t = boost::intrusive_ptr<T>; template<typename T> using cref_t = boost::intrusive_ptr<const T>...
1,032
28.514286
95
h
null
ceph-main/src/common/reverse.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 ...
691
20.625
71
h
null
ceph-main/src/common/run_cmd.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,475
21.925926
77
cc
null
ceph-main/src/common/run_cmd.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 ...
865
24.470588
77
h
null
ceph-main/src/common/safe_io.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,482
28.915663
79
h
null
ceph-main/src/common/scrub_types.cc
#include "scrub_types.h" using std::map; using namespace librados; void object_id_wrapper::encode(bufferlist& bl) const { ENCODE_START(1, 1, bl); encode(name, bl); encode(nspace, bl); encode(locator, bl); encode(snap, bl); ENCODE_FINISH(bl); } void object_id_wrapper::decode(bufferlist::const_iterator& b...
7,075
23.150171
95
cc
null
ceph-main/src/common/scrub_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_SCRUB_TYPES_H #define CEPH_SCRUB_TYPES_H #include "osd/osd_types.h" // wrappers around scrub types to offer the necessary bits other than // the minimal set that the lirados requires struct object_id_wrappe...
6,175
28.270142
92
h
null
ceph-main/src/common/sctp_crc32.h
#ifndef CEPH_COMMON_SCTP_CRC32_H #define CEPH_COMMON_SCTP_CRC32_H #ifdef __cplusplus extern "C" { #endif extern uint32_t ceph_crc32c_sctp(uint32_t crc, unsigned char const *data, unsigned length); #ifdef __cplusplus } #endif #endif
236
14.8
91
h
null
ceph-main/src/common/secret.h
#ifndef CEPH_SECRET_H #define CEPH_SECRET_H #ifdef __cplusplus extern "C" { #endif int read_secret_from_file(const char *filename, char *secret, size_t max_len); int set_kernel_secret(const char *secret, const char *key_name); int is_kernel_secret(const char *key_name); #ifdef __cplusplus } #endif #endif
312
15.473684
78
h
null
ceph-main/src/common/shared_cache.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) 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,272
23.085714
96
hpp
null
ceph-main/src/common/shared_mutex_debug.cc
#include "shared_mutex_debug.h" #include <system_error> #include "acconfig.h" #include "common/valgrind.h" namespace ceph { shared_mutex_debug::shared_mutex_debug(std::string group, bool track_lock, bool enable_lock_dep, ...
3,780
21.640719
83
cc
null
ceph-main/src/common/shared_mutex_debug.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <pthread.h> #include <atomic> #include "common/mutex_debug.h" namespace ceph { class shared_mutex_debug : public ceph::mutex_debug_detail::mutex_debugging_base { pthread_rwlock_t rwlock; ...
1,060
19.018868
70
h
null
ceph-main/src/common/sharedptr_registry.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) 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...
4,351
21.905263
70
hpp
null
ceph-main/src/common/shunique_lock.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_COMMON_SHUNIQUE_LOCK_H #define CEPH_COMMON_SHUNIQUE_LOCK_H #include <mutex> #include <shared_mutex> #include <system_error> namespace ceph { // This is a 'lock' class in the style of shared_lock and // uniq...
10,608
25.926396
77
h
null
ceph-main/src/common/signal.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,257
22.040816
76
cc
null
ceph-main/src/common/signal.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,410
31.813953
78
h
null
ceph-main/src/common/simple_cache.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) 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 ...
3,477
22.821918
90
hpp
null
ceph-main/src/common/snap_types.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "snap_types.h" #include "common/Formatter.h" void SnapRealmInfo::encode(ceph::buffer::list& bl) const { h.num_snaps = my_snaps.size(); h.num_prior_parent_snaps = prior_parent_snaps.size(); using ceph::enco...
3,757
26.231884
79
cc
null
ceph-main/src/common/snap_types.h
#ifndef __CEPH_SNAP_TYPES_H #define __CEPH_SNAP_TYPES_H #include "include/types.h" #include "include/utime.h" #include "include/fs_types.h" namespace ceph { class Formatter; } struct SnapRealmInfo { mutable ceph_mds_snap_realm h; std::vector<snapid_t> my_snaps; std::vector<snapid_t> prior_parent_snaps; // bef...
3,395
29.321429
99
h
null
ceph-main/src/common/solaris_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,205
21.247863
70
cc
null
ceph-main/src/common/split.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) 2019 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
2,899
25.851852
74
h
null
ceph-main/src/common/static_ptr.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. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
10,890
30.845029
81
h
null
ceph-main/src/common/str_list.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) 2009-2010 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ver...
1,638
24.215385
83
cc
null
ceph-main/src/common/str_map.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 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This library is free software; you can redistribute it ...
4,811
22.134615
74
cc
null
ceph-main/src/common/strescape.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) 2021 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...
923
23.315789
94
h
null
ceph-main/src/common/strtol.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 ...
7,829
26.964286
86
cc
null
ceph-main/src/common/strtol.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 ...
3,318
28.371681
82
h
null
ceph-main/src/common/subsys.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,947
25.8
78
h
null
ceph-main/src/common/subsys_types.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 versi...
2,094
22.806818
70
h
null
ceph-main/src/common/sync_filesystem.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,314
22.070175
76
h
null
ceph-main/src/common/tracer.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "common/ceph_context.h" #include "global/global_context.h" #include "tracer.h" #ifdef HAVE_JAEGER #include "opentelemetry/sdk/trace/batch_span_processor.h" #include "opentelemetry/sdk/trace/tracer_provider.h" #i...
4,338
37.061404
190
cc
null
ceph-main/src/common/tracer.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "acconfig.h" #include "include/buffer.h" #ifdef HAVE_JAEGER #include "opentelemetry/trace/provider.h" using jspan = opentelemetry::nostd::shared_ptr<opentelemetry::trace::Span>; using jspan_contex...
3,503
31.444444
112
h
null
ceph-main/src/common/tracked_int_ptr.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) 2013 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...
1,591
20.226667
70
hpp
null
ceph-main/src/common/types.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 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This library is free software; you can redistribute it ...
825
24.030303
71
cc
null
ceph-main/src/common/url_escape.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "url_escape.h" #include <stdexcept> #include <sstream> std::string url_escape(const std::string& s) { std::string out; for (auto c : s) { if (std::isalnum(c) || c == '-' || c == '.' || c == '_' || c == ...
1,438
21.138462
74
cc
null
ceph-main/src/common/url_escape.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <string> extern std::string url_escape(const std::string& s); extern std::string url_unescape(const std::string& s);
240
23.1
70
h
null
ceph-main/src/common/utf8.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,754
25.19403
73
h
null
ceph-main/src/common/util.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 * Lic...
11,412
23.75705
115
cc
null
ceph-main/src/common/valgrind.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_VALGRIND_H #define CEPH_VALGRIND_H #include "acconfig.h" #if defined(HAVE_VALGRIND_HELGRIND_H) && !defined(NDEBUG) #include <valgrind/helgrind.h> #else #define ANNOTATE_HAPPENS_AFTER(x) (voi...
544
26.25
72
h
null
ceph-main/src/common/version.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 ...
1,323
21.066667
77
cc
null
ceph-main/src/common/version.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 ...
940
25.138889
70
h
null
ceph-main/src/common/weighted_shuffle.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <algorithm> #include <iterator> #include <random> template <class RandomIt, class DistIt, class URBG> void weighted_shuffle(RandomIt first, RandomIt last, DistIt weight_first, DistIt weight...
692
25.653846
79
h
null
ceph-main/src/common/zipkin_trace.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef COMMON_ZIPKIN_TRACE_H #define COMMON_ZIPKIN_TRACE_H #include "acconfig.h" #include "include/encoding.h" #ifdef WITH_BLKIN #include <ztracer.hpp> #else // !WITH_BLKIN // add stubs for noop Trace and Endpoint /...
2,365
24.170213
85
h
null
ceph-main/src/common/async/bind_handler.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....
3,292
28.401786
86
h