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/client/fuse_ll.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...
49,980
26.537741
95
cc
null
ceph-main/src/client/fuse_ll.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 ...
701
23.206897
71
h
null
ceph-main/src/client/ioctl.h
#ifndef FS_CEPH_IOCTL_H #define FS_CEPH_IOCTL_H #include "include/int_types.h" #if defined(__linux__) #include <linux/ioctl.h> #include <linux/types.h> #elif defined(__APPLE__) || defined(__FreeBSD__) #include <sys/ioctl.h> #include <sys/types.h> #endif #define CEPH_IOCTL_MAGIC 0x97 /* just use u64 to align sanely ...
1,482
27.519231
66
h
null
ceph-main/src/client/posix_acl.cc
#include "include/compat.h" #include "include/types.h" #include "include/fs_types.h" #include <sys/stat.h> #include "posix_acl.h" #include "UserPerm.h" int posix_acl_check(const void *xattr, size_t size) { const acl_ea_header *header; if (size < sizeof(*header)) return -1; header = reinterpret_cast<const acl...
6,553
21.678201
84
cc
null
ceph-main/src/client/posix_acl.h
#ifndef CEPH_POSIX_ACL #define CEPH_POSIX_ACL #define ACL_EA_VERSION 0x0002 #define ACL_USER_OBJ 0x01 #define ACL_USER 0x02 #define ACL_GROUP_OBJ 0x04 #define ACL_GROUP 0x08 #define ACL_MASK 0x10 #define ACL_OTHER 0x20 #define AC...
1,001
26.833333
73
h
null
ceph-main/src/client/hypertable/CephBroker.cc
/** -*- C++ -*- * Copyright (C) 2009-2011 New Dream Network * * This file is part of Hypertable. * * Hypertable 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 any...
14,707
26.908918
107
cc
null
ceph-main/src/client/hypertable/CephBroker.h
/** -*- C++ -*- * Copyright (C) 2009-2011 New Dream Network * * This file is part of Hypertable. * * Hypertable 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 any...
3,854
31.669492
91
h
null
ceph-main/src/cls/2pc_queue/cls_2pc_queue.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "cls/2pc_queue/cls_2pc_queue_types.h" #include "cls/2pc_queue/cls_2pc_queue_ops.h" #include "cls/2pc_queue/cls_2pc_queue_const.h" #include "cls/queue/cls_queue_ops.h" #include "cls/que...
22,789
34.833333
166
cc
null
ceph-main/src/cls/2pc_queue/cls_2pc_queue_client.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls/2pc_queue/cls_2pc_queue_client.h" #include "cls/2pc_queue/cls_2pc_queue_ops.h" #include "cls/2pc_queue/cls_2pc_queue_const.h" #include "cls/queue/cls_queue_ops.h" #include "cls/queue/cls_queue_const.h" usin...
7,287
28.746939
128
cc
null
ceph-main/src/cls/2pc_queue/cls_2pc_queue_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <string> #include <vector> #include "include/rados/librados.hpp" #include "cls/queue/cls_queue_types.h" #include "cls/2pc_queue/cls_2pc_queue_types.h" // initialize the queue with maximum size (byt...
5,223
55.782609
137
h
null
ceph-main/src/cls/2pc_queue/cls_2pc_queue_const.h
#pragma once #define TPC_QUEUE_CLASS "2pc_queue" #define TPC_QUEUE_INIT "2pc_queue_init" #define TPC_QUEUE_GET_CAPACITY "2pc_queue_get_capacity" #define TPC_QUEUE_GET_TOPIC_STATS "2pc_queue_get_topic_stats" #define TPC_QUEUE_RESERVE "2pc_queue_reserve" #define TPC_QUEUE_COMMIT "2pc_queue_commit" #define TPC_QUEUE_ABO...
594
36.1875
69
h
null
ceph-main/src/cls/2pc_queue/cls_2pc_queue_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "include/types.h" #include "cls_2pc_queue_types.h" struct cls_2pc_queue_reserve_op { uint64_t size; uint32_t entries; void encode(ceph::buffer::list& bl) const { ENCODE_START(1, 1, bl); ...
2,782
22.584746
70
h
null
ceph-main/src/cls/2pc_queue/cls_2pc_queue_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "include/types.h" struct cls_2pc_reservation { using id_t = uint32_t; inline static const id_t NO_ID{0}; uint64_t size; // how much size to reserve (bytes) ceph::coarse_r...
2,160
28.60274
108
h
null
ceph-main/src/cls/cas/cls_cas.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_cas_ops.h" #include "cls_cas_internal.h" #include "include/compat.h" #include "osd/osd_types.h" using ceph::bufferlist; using ceph::decode; CLS_VER(1,0) ...
5,029
19.958333
82
cc
null
ceph-main/src/cls/cas/cls_cas_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/cas/cls_cas_client.h" #include "cls/cas/cls_cas_ops.h" #include "include/rados/librados.hpp" using std::set; using std::string; using ceph::bufferlist; using ceph::decode; using ceph::e...
1,419
20.515152
70
cc
null
ceph-main/src/cls/cas/cls_cas_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_CAS_CLIENT_H #define CEPH_CLS_CAS_CLIENT_H #include "include/types.h" #include "include/rados/librados_fwd.hpp" #include "common/hobject.h" // // basic methods // /// create a chunk, or get additional ...
981
21.318182
70
h
null
ceph-main/src/cls/cas/cls_cas_internal.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls_cas_internal.h" chunk_refs_t::chunk_refs_t(const chunk_refs_t& other) { *this = other; } chunk_refs_t& chunk_refs_t::operator=(const chunk_refs_t& other) { // this is inefficient, but easy. bufferli...
2,878
20.014599
70
cc
null
ceph-main/src/cls/cas/cls_cas_internal.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <string> #include "boost/variant.hpp" #include "include/stringify.h" #include "common/Formatter.h" #include "common/hobject.h" #define CHUNK_REFCOUNT_ATTR "chunk_refs" // public type struct ch...
9,743
23.857143
76
h
null
ceph-main/src/cls/cas/cls_cas_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_CAS_OPS_H #define CEPH_CLS_CAS_OPS_H #include "include/types.h" #include "common/hobject.h" #include "common/Formatter.h" struct cls_cas_chunk_create_or_get_ref_op { enum { FLAG_VERIFY = 1, // ve...
2,451
23.039216
91
h
null
ceph-main/src/cls/cephfs/cls_cephfs.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 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,239
23.372093
121
cc
null
ceph-main/src/cls/cephfs/cls_cephfs.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 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,249
20.523179
70
h
null
ceph-main/src/cls/cephfs/cls_cephfs_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) 2015 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,704
24.698198
79
cc
null
ceph-main/src/cls/cephfs/cls_cephfs_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/rados/librados_fwd.hpp" #include "mds/mdstypes.h" #include "cls_cephfs.h" class AccumulateArgs; class ClsCephFSClient { public: static int accumulate_inode_metadata( librados::IoCtx &ctx, ...
907
23.540541
70
h
null
ceph-main/src/cls/cmpomap/client.cc
// -*- 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...
1,889
23.545455
70
cc
null
ceph-main/src/cls/cmpomap/client.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...
2,780
39.304348
79
h
null
ceph-main/src/cls/cmpomap/ops.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...
2,204
20.831683
80
h
null
ceph-main/src/cls/cmpomap/server.cc
// -*- 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...
8,775
27.963696
83
cc
null
ceph-main/src/cls/cmpomap/types.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...
1,265
27.133333
80
h
null
ceph-main/src/cls/fifo/cls_fifo.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /** \file * * This is an OSD class that implements methods for management * and use of fifo * */ #include <cerrno> #include <optional> #include <string> #include <fmt/format.h> #include "include/buffer.h" #include...
24,256
24.294056
127
cc
null
ceph-main/src/cls/fifo/cls_fifo_ops.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. * Copyright (C) 2019 SUSE LLC * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesse...
7,461
22.916667
76
h
null
ceph-main/src/cls/fifo/cls_fifo_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) 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 ver...
14,680
25.216071
81
h
null
ceph-main/src/cls/hello/cls_hello.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * This is a simple example RADOS class, designed to be usable as a * template for implementing new methods. * * Our goal here is to illustrate the interface between the OSD and * the class and demonstrate what kin...
11,371
29.406417
97
cc
null
ceph-main/src/cls/journal/cls_journal.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/int_types.h" #include "include/buffer.h" #include "include/encoding.h" #include "common/errno.h" #include "objclass/objclass.h" #include "cls/journal/cls_journal_types.h" #include <errno.h> #include <map...
35,914
26.311787
113
cc
null
ceph-main/src/cls/journal/cls_journal_client.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls/journal/cls_journal_client.h" #include "include/rados/librados.hpp" #include "include/buffer.h" #include "include/Context.h" #include "common/Cond.h" #include <errno.h> namespace cls { namespace journal { n...
14,026
26.612205
81
cc
null
ceph-main/src/cls/journal/cls_journal_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_JOURNAL_CLIENT_H #define CEPH_CLS_JOURNAL_CLIENT_H #include "include/rados/librados_fwd.hpp" #include "cls/journal/cls_journal_types.h" #include <set> #include <boost/optional.hpp> class Context; names...
4,807
42.709091
80
h
null
ceph-main/src/cls/journal/cls_journal_types.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls/journal/cls_journal_types.h" #include "include/stringify.h" #include "common/Formatter.h" using ceph::bufferlist; using ceph::Formatter; namespace cls { namespace journal { void ObjectPosition::encode(buf...
4,976
23.885
78
cc
null
ceph-main/src/cls/journal/cls_journal_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_JOURNAL_TYPES_H #define CEPH_CLS_JOURNAL_TYPES_H #include "include/int_types.h" #include "include/buffer_fwd.h" #include "include/encoding.h" #include <iosfwd> #include <list> #include <string> namespac...
4,645
28.405063
80
h
null
ceph-main/src/cls/lock/cls_lock.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /** \file * * This is an OSD class that implements methods for object * advisory locking. * */ #include <errno.h> #include <map> #include <sstream> #include "include/types.h" #include "include/utime.h" #include "ob...
16,306
24.126348
93
cc
null
ceph-main/src/cls/lock/cls_lock_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) 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 ...
8,471
28.519164
93
cc
null
ceph-main/src/cls/lock/cls_lock_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_LOCK_CLIENT_H #define CEPH_CLS_LOCK_CLIENT_H #include <chrono> #include "include/rados/librados_fwd.hpp" #include "cls/lock/cls_lock_types.h" namespace rados { namespace cls { namespace lock { ...
5,196
35.598592
84
h
null
ceph-main/src/cls/lock/cls_lock_ops.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 ...
5,901
26.579439
92
cc
null
ceph-main/src/cls/lock/cls_lock_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_LOCK_OPS_H #define CEPH_CLS_LOCK_OPS_H #include "include/types.h" #include "include/utime.h" #include "cls/lock/cls_lock_types.h" struct cls_lock_lock_op { std::string name; ClsLockType type; std:...
6,144
23.979675
83
h
null
ceph-main/src/cls/lock/cls_lock_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) 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,554
24.808081
78
cc
null
ceph-main/src/cls/lock/cls_lock_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_LOCK_TYPES_H #define CEPH_CLS_LOCK_TYPES_H #include "include/encoding.h" #include "include/types.h" #include "include/utime.h" #include "msg/msg_types.h" /* lock flags */ #define LOCK_FLAG_MAY_RENEW 0x1...
5,432
30.045714
104
h
null
ceph-main/src/cls/log/cls_log.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "include/utime.h" #include "objclass/objclass.h" #include "cls_log_types.h" #include "cls_log_ops.h" #include "global/global_context.h" #include "include/compat.h" using std::map; us...
7,318
21.589506
104
cc
null
ceph-main/src/cls/log/cls_log_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/log/cls_log_ops.h" #include "include/rados/librados.hpp" #include "include/compat.h" using std::list; using std::string; using ceph::bufferlist; using namespace librados; void cls_l...
4,094
24.434783
110
cc
null
ceph-main/src/cls/log/cls_log_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_LOG_CLIENT_H #define CEPH_CLS_LOG_CLIENT_H #include "include/rados/librados_fwd.hpp" #include "cls_log_types.h" /* * log objclass */ void cls_log_add_prepare_entry(cls_log_entry& entry, const utime_t...
1,710
41.775
115
h
null
ceph-main/src/cls/log/cls_log_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_LOG_OPS_H #define CEPH_CLS_LOG_OPS_H #include "cls_log_types.h" struct cls_log_add_op { std::list<cls_log_entry> entries; bool monotonic_inc; cls_log_add_op() : monotonic_inc(true) {} void enc...
3,583
21.828025
78
h
null
ceph-main/src/cls/log/cls_log_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_LOG_TYPES_H #define CEPH_CLS_LOG_TYPES_H #include "include/encoding.h" #include "include/types.h" #include "include/utime.h" #include "common/ceph_json.h" #include "common/Formatter.h" class JSONObj; c...
2,619
23.485981
79
h
null
ceph-main/src/cls/lua/cls_lua.cc
/* * Lua Bindings for RADOS Object Class */ #include <errno.h> #include <setjmp.h> #include <string> #include <sstream> #include <lua.hpp> #include "include/types.h" #include "objclass/objclass.h" #include "json_spirit/json_spirit.h" #include "cls_lua.h" #include "cls_lua_ops.h" using namespace std; CLS_VER(1,0) CL...
25,597
23.263507
86
cc
null
ceph-main/src/cls/lua/cls_lua.h
#ifndef CEPH_CLS_LUA_H #define CEPH_CLS_LUA_H #include <lua.hpp> #include "include/types.h" #define LOG_LEVEL_DEFAULT 10 int luaopen_bufferlist(lua_State *L); bufferlist *clslua_checkbufferlist(lua_State *L, int pos = 1); bufferlist *clslua_pushbufferlist(lua_State *L, bufferlist *set); #endif
300
19.066667
65
h
null
ceph-main/src/cls/lua/cls_lua_client.cc
#include <string> #include <vector> #include "include/encoding.h" #include "include/rados/librados.hpp" // for IoCtx #include "cls_lua_client.h" #include "cls_lua_ops.h" using std::string; using std::vector; using librados::IoCtx; using librados::bufferlist; namespace cls_lua_client { /* * Currently the return ...
953
26.257143
76
cc
null
ceph-main/src/cls/lua/cls_lua_client.h
#ifndef CLS_LUA_CLIENT_HPP #define CLS_LUA_CLIENT_HPP #include <string> #include "include/rados/librados.hpp" namespace cls_lua_client { int exec(librados::IoCtx& ioctx, const std::string& oid, const std::string& script, const std::string& handler, librados::bufferlist& inbl, librados::bufferlist& outbl...
333
22.857143
63
h
null
ceph-main/src/cls/lua/cls_lua_ops.h
#ifndef CEPH_CLS_LUA_OPS_H #define CEPH_CLS_LUA_OPS_H #include <string> #include "include/encoding.h" struct cls_lua_eval_op { std::string script; std::string handler; bufferlist input; void encode(bufferlist &bl) const { ENCODE_START(1, 1, bl); encode(script, bl); encode(handler, bl); encod...
582
17.21875
47
h
null
ceph-main/src/cls/lua/lua_bufferlist.cc
/* * Lua module wrapping librados::bufferlist */ #include <errno.h> #include <string> #include <sstream> #include <math.h> #include <lua.hpp> #include "include/types.h" #include "include/buffer.h" #include "objclass/objclass.h" #include "cls/lua/cls_lua.h" #define LUA_BUFFERLIST "ClsLua.Bufferlist" struct bufferlis...
3,757
19.762431
90
cc
null
ceph-main/src/cls/numops/cls_numops.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 CERN * * Author: Joaquim Rocha <joaquim.rocha@cern.ch> * * This library is free software; you can redistribute it and/or * modify it under the t...
3,970
22.497041
77
cc
null
ceph-main/src/cls/numops/cls_numops_client.cc
/* * Ceph - scalable distributed file system * * Copyright (C) 2015 CERN * * Author: Joaquim Rocha <joaquim.rocha@cern.ch> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; ei...
1,970
23.6375
70
cc
null
ceph-main/src/cls/numops/cls_numops_client.h
/* * Ceph - scalable distributed file system * * Copyright (C) 2015 CERN * * Author: Joaquim Rocha <joaquim.rocha@cern.ch> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; ei...
1,447
27.392157
70
h
null
ceph-main/src/cls/otp/cls_otp.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /** \file * * This is an OSD class that implements methods for management * and use of otp (one time password). * */ #include <errno.h> #include <map> #include <list> #include <boost/range/adaptor/reversed.hpp> #i...
13,535
22.378238
114
cc
null
ceph-main/src/cls/otp/cls_otp_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) 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,178
25.973958
100
cc
null
ceph-main/src/cls/otp/cls_otp_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_OTP_CLIENT_H #define CEPH_CLS_OTP_CLIENT_H #include "include/rados/librados_fwd.hpp" #include "cls/otp/cls_otp_types.h" namespace rados { namespace cls { namespace otp { class OTP { p...
2,404
38.42623
103
h
null
ceph-main/src/cls/otp/cls_otp_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_OTP_OPS_H #define CEPH_CLS_OTP_OPS_H #include "include/types.h" #include "include/utime.h" #include "cls/otp/cls_otp_types.h" struct cls_otp_set_otp_op { std::list<rados::cls::otp::otp_info_t> entries...
3,707
20.811765
70
h
null
ceph-main/src/cls/otp/cls_otp_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) 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,811
24.166667
70
cc
null
ceph-main/src/cls/otp/cls_otp_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_OTP_TYPES_H #define CEPH_CLS_OTP_TYPES_H #include "include/encoding.h" #include "include/types.h" #define CLS_OTP_MAX_REPO_SIZE 100 class JSONObj; namespace rados { namespace cls { namespace ot...
3,717
26.338235
87
h
null
ceph-main/src/cls/queue/cls_queue.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include <errno.h> #include "objclass/objclass.h" #include "cls/queue/cls_queue_types.h" #include "cls/queue/cls_queue_ops.h" #include "cls/queue/cls_queue_const.h" #include "cls/queue/cls_que...
3,702
24.363014
139
cc
null
ceph-main/src/cls/queue/cls_queue_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/queue/cls_queue_ops.h" #include "cls/queue/cls_queue_const.h" #include "cls/queue/cls_queue_client.h" using namespace std; using namespace librados; void cls_queue_init(ObjectWriteOperat...
2,152
23.191011
106
cc
null
ceph-main/src/cls/queue/cls_queue_client.h
#ifndef CEPH_CLS_QUEUE_CLIENT_H #define CEPH_CLS_QUEUE_CLIENT_H #include "include/rados/librados.hpp" #include "cls/queue/cls_queue_types.h" #include "cls_queue_ops.h" #include "common/ceph_time.h" void cls_queue_init(librados::ObjectWriteOperation& op, const std::string& queue_name, uint64_t size); int cls_queue_get...
845
48.764706
122
h
null
ceph-main/src/cls/queue/cls_queue_const.h
#ifndef CEPH_CLS_QUEUE_CONSTS_H #define CEPH_CLS_QUEUE_CONSTS_H #define QUEUE_CLASS "queue" #define QUEUE_INIT "queue_init" #define QUEUE_GET_CAPACITY "queue_get_capacity" #define QUEUE_ENQUEUE "queue_enqueue" #define QUEUE_LIST_ENTRIES "queue_list_entries" #define QUEUE_REMOVE_ENTRIES "queue_remove_entries" #endif
319
25.666667
51
h
null
ceph-main/src/cls/queue/cls_queue_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_QUEUE_OPS_H #define CEPH_CLS_QUEUE_OPS_H #include "cls/queue/cls_queue_types.h" struct cls_queue_init_op { uint64_t queue_size{0}; uint64_t max_urgent_data_size{0}; ceph::buffer::list bl_urgent_da...
3,588
21.154321
70
h
null
ceph-main/src/cls/queue/cls_queue_src.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "objclass/objclass.h" #include "cls/queue/cls_queue_types.h" #include "cls/queue/cls_queue_ops.h" #include "cls/queue/cls_queue_const.h" #include "cls/queue/cls_queue_src.h" using std...
19,243
36.007692
156
cc
null
ceph-main/src/cls/queue/cls_queue_src.h
#ifndef CEPH_CLS_QUEUE_SRC_H #define CEPH_CLS_QUEUE_SRC_H #include "objclass/objclass.h" #include "cls/queue/cls_queue_types.h" #include "cls/queue/cls_queue_ops.h" int queue_write_head(cls_method_context_t hctx, cls_queue_head& head); int queue_read_head(cls_method_context_t hctx, cls_queue_head& head); int queue_in...
832
48
129
h
null
ceph-main/src/cls/queue/cls_queue_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_QUEUE_TYPES_H #define CEPH_CLS_QUEUE_TYPES_H #include <errno.h> #include "include/types.h" //Size of head leaving out urgent data #define QUEUE_HEAD_SIZE_1K 1024 #define QUEUE_START_OFFSET_1K QUEUE_HEA...
2,881
22.818182
88
h
null
ceph-main/src/cls/rbd/cls_rbd.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /** \file * * This is an OSD class that implements methods for * use with rbd. * * Most of these deal with the rbd header object. Methods prefixed * with old_ deal with the original rbd design, in which clients read...
234,089
26.131433
115
cc
null
ceph-main/src/cls/rbd/cls_rbd.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef __CEPH_CLS_RBD_H #define __CEPH_CLS_RBD_H #include "include/types.h" #include "include/buffer_fwd.h" #include "include/rbd_types.h" #include "common/Formatter.h" #include "cls/rbd/cls_rbd_types.h" /// informatio...
7,846
30.641129
79
h
null
ceph-main/src/cls/rbd/cls_rbd_client.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls/rbd/cls_rbd_client.h" #include "cls/lock/cls_lock_client.h" #include "include/buffer.h" #include "include/encoding.h" #include "include/rbd_types.h" #include "include/rados/librados.hpp" #include "include/ne...
78,107
24.940883
99
cc
null
ceph-main/src/cls/rbd/cls_rbd_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_LIBRBD_CLS_RBD_CLIENT_H #define CEPH_LIBRBD_CLS_RBD_CLIENT_H #include "cls/lock/cls_lock_types.h" #include "cls/rbd/cls_rbd_types.h" #include "common/snap_types.h" #include "include/types.h" #include "includ...
37,002
54.393713
104
h
null
ceph-main/src/cls/rbd/cls_rbd_types.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <boost/variant.hpp> #include "cls/rbd/cls_rbd_types.h" #include "common/Formatter.h" namespace cls { namespace rbd { using std::istringstream; using std::ostringstream; using std::string; using ceph::bufferlis...
40,161
28.444282
106
cc
null
ceph-main/src/cls/rbd/cls_rbd_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_RBD_TYPES_H #define CEPH_CLS_RBD_TYPES_H #include "include/int_types.h" #include "include/buffer.h" #include "include/encoding.h" #include "include/stringify.h" #include "include/utime.h" #include "msg/m...
31,366
29.189605
96
h
null
ceph-main/src/cls/refcount/cls_refcount.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/refcount/cls_refcount_ops.h" #include "include/compat.h" using std::string; using ceph::bufferlist; CLS_VER(1,0) CLS_NAME(refcount) #define REFCOUNT_AT...
4,924
21.591743
111
cc
null
ceph-main/src/cls/refcount/cls_refcount_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/refcount/cls_refcount_client.h" #include "cls/refcount/cls_refcount_ops.h" #include "include/rados/librados.hpp" using std::list; using std::string; using ceph::bufferlist; void cls_re...
1,498
21.712121
98
cc
null
ceph-main/src/cls/refcount/cls_refcount_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_REFCOUNT_CLIENT_H #define CEPH_CLS_REFCOUNT_CLIENT_H #include "include/rados/librados_fwd.hpp" #include "include/types.h" /* * refcount objclass * * The refcount objclass implements a refcounting sch...
2,299
53.761905
122
h
null
ceph-main/src/cls/refcount/cls_refcount_ops.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls_refcount_ops.h" #include "common/Formatter.h" #include "common/ceph_json.h" using std::list; void cls_refcount_get_op::dump(ceph::Formatter *f) const { f->dump_string("tag", tag); f->dump_int("implicit...
2,675
24.009346
85
cc
null
ceph-main/src/cls/refcount/cls_refcount_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_CLS_REFCOUNT_OPS_H #define CEPH_CLS_REFCOUNT_OPS_H #include "include/types.h" #include "common/hobject.h" struct cls_refcount_get_op { std::string tag; bool implicit_ref; cls_refcount_get_op() : impl...
3,762
23.277419
77
h
null
ceph-main/src/cls/rgw/cls_rgw.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include <errno.h> #include <boost/algorithm/string.hpp> #include "objclass/objclass.h" #include "cls/rgw/cls_rgw_ops.h" #include "cls/rgw/cls_rgw_const.h" #include "common/Clock.h" #include ...
143,942
29.271924
168
cc
null
ceph-main/src/cls/rgw/cls_rgw_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/rgw/cls_rgw_const.h" #include "cls/rgw/cls_rgw_client.h" #include "common/debug.h" using std::list; using std::map; using std::pair; using std::string; using std::vector; using ceph::r...
35,079
27.707038
179
cc
null
ceph-main/src/cls/rgw/cls_rgw_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "include/str_list.h" #include "include/rados/librados.hpp" #include "cls_rgw_ops.h" #include "cls_rgw_const.h" #include "common/RefCountedObj.h" #include "common/strtol.h" #include "include/compat.h...
27,051
40.876161
185
h
null
ceph-main/src/cls/rgw/cls_rgw_const.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #define RGW_CLASS "rgw" /* Special error code returned by cls bucket list operation if it was * unable to skip past enough not visibile entries to return any * entries in the call. */ constexpr int RGWBIA...
2,788
33.432099
70
h
null
ceph-main/src/cls/rgw/cls_rgw_ops.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls/rgw/cls_rgw_ops.h" #include "common/Formatter.h" #include "common/ceph_json.h" #include "include/utime.h" using std::list; using std::map; using ceph::Formatter; void rgw_cls_tag_timeout_op::dump(Formatt...
15,556
26.102787
122
cc
null
ceph-main/src/cls/rgw/cls_rgw_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "cls/rgw/cls_rgw_types.h" struct rgw_cls_tag_timeout_op { uint64_t tag_timeout; rgw_cls_tag_timeout_op() : tag_timeout(0) {} void encode(ceph::buffer::list &bl) const { ENCODE_START(1, ...
38,127
23.694301
122
h
null
ceph-main/src/cls/rgw/cls_rgw_types.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls/rgw/cls_rgw_types.h" #include "common/ceph_json.h" #include "include/utime.h" using std::list; using std::string; using ceph::bufferlist; using ceph::Formatter; void rgw_zone_set_entry::from_str(const str...
24,991
27.432309
102
cc
null
ceph-main/src/cls/rgw/cls_rgw_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <string> #include <list> #include <boost/container/flat_map.hpp> #include "common/ceph_time.h" #include "common/Formatter.h" #include <fmt/format.h> #include "rgw/rgw_basic_types.h" #define CEPH_...
36,045
26.102256
125
h
null
ceph-main/src/cls/rgw_gc/cls_rgw_gc.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include <errno.h> #include "objclass/objclass.h" #include "cls/rgw/cls_rgw_ops.h" #include "cls/rgw/cls_rgw_types.h" #include "cls/rgw_gc/cls_rgw_gc_types.h" #include "cls/rgw_gc/cls_rgw_gc_o...
19,778
34.319643
160
cc
null
ceph-main/src/cls/rgw_gc/cls_rgw_gc_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/rgw/cls_rgw_ops.h" #include "cls/rgw_gc/cls_rgw_gc_ops.h" #include "cls/queue/cls_queue_ops.h" #include "cls/rgw_gc/cls_rgw_gc_const.h" #include "cls/queue/cls_queue_const.h" #include "cls...
2,817
24.853211
122
cc
null
ceph-main/src/cls/rgw_gc/cls_rgw_gc_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "include/rados/librados.hpp" #include "common/ceph_time.h" #include "cls/queue/cls_queue_ops.h" #include "cls/rgw/cls_rgw_types.h" #include "cls/rgw_gc/cls_rgw_gc_types.h" void cls_rgw_gc_queue_i...
1,093
51.095238
142
h
null
ceph-main/src/cls/rgw_gc/cls_rgw_gc_const.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #define RGW_GC_CLASS "rgw_gc" #define RGW_GC_QUEUE_INIT "rgw_gc_queue_init" #define RGW_GC_QUEUE_ENQUEUE "rgw_gc_queue_enqueue" #define RGW_GC_QUEUE_LIST_ENTRIES "rgw_gc_queue_list_entries" #define RGW_GC_Q...
432
32.307692
70
h
null
ceph-main/src/cls/rgw_gc/cls_rgw_gc_ops.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "cls/rgw/cls_rgw_types.h" struct cls_rgw_gc_queue_init_op { uint64_t size; uint64_t num_deferred_entries{0}; cls_rgw_gc_queue_init_op() {} void encode(ceph::buffer::list& bl) const { ...
1,625
22.228571
70
h
null
ceph-main/src/cls/rgw_gc/cls_rgw_gc_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "include/types.h" #include <unordered_map> struct cls_rgw_gc_urgent_data { std::unordered_map<std::string, ceph::real_time> urgent_data_map; uint32_t num_urgent_data_entries{0}; // requested by...
1,078
29.828571
98
h
null
ceph-main/src/cls/sdk/cls_sdk.cc
/* * This is an example RADOS object class built using only the Ceph SDK interface. */ #include "include/rados/objclass.h" CLS_VER(1,0) CLS_NAME(sdk) cls_handle_t h_class; cls_method_handle_t h_test_coverage_write; cls_method_handle_t h_test_coverage_replay; /** * test_coverage_write - a "write" method that creat...
2,984
21.613636
107
cc
null
ceph-main/src/cls/test_remote_reads/cls_test_remote_reads.cc
/* * This is an example RADOS object class that shows how to use remote reads. */ #include "common/ceph_json.h" #include "objclass/objclass.h" CLS_VER(1,0) CLS_NAME(test_remote_reads) cls_handle_t h_class; cls_method_handle_t h_test_read; cls_method_handle_t h_test_gather; /** * read data */ static int test_rea...
2,571
28.227273
115
cc
null
ceph-main/src/cls/timeindex/cls_timeindex.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_timeindex_ops.h" #include "include/compat.h" using std::map; using std::string; using ceph::bufferlist; CLS_VER(1,0) CLS_NAME(timeindex) static const ...
6,232
22.344569
81
cc