Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
null | ceph-main/src/rgw/services/svc_finisher.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "common/Finisher.h"
#include "svc_finisher.h"
using namespace std;
int RGWSI_Finisher::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
finisher = new Finisher(cct);
finisher->start();
r... | 1,012 | 16.169492 | 75 | cc |
null | ceph-main/src/rgw/services/svc_finisher.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
class Context;
class Finisher;
class RGWSI_Finisher : public RGWServiceInstance
{
friend struct RGWServices_Def;
public:
class ShutdownCB;
private:
Finisher *finisher... | 898 | 18.977778 | 73 | h |
null | ceph-main/src/rgw/services/svc_mdlog.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_mdlog.h"
#include "svc_rados.h"
#include "svc_zone.h"
#include "svc_sys_obj.h"
#include "rgw_tools.h"
#include "rgw_mdlog.h"
#include "rgw_coroutine.h"
#include "rgw_cr_rados.h"
#include "rgw_zone.h"... | 17,119 | 30.127273 | 139 | cc |
null | ceph-main/src/rgw/services/svc_mdlog.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... | 3,956 | 32.252101 | 144 | h |
null | ceph-main/src/rgw/services/svc_meta.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_meta.h"
#include "rgw_metadata.h"
#define dout_subsys ceph_subsys_rgw
using namespace std;
RGWSI_Meta::RGWSI_Meta(CephContext *cct) : RGWServiceInstance(cct) {
}
RGWSI_Meta::~RGWSI_Meta() {}
vo... | 1,039 | 21.12766 | 78 | cc |
null | ceph-main/src/rgw/services/svc_meta.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... | 1,098 | 21.428571 | 71 | h |
null | ceph-main/src/rgw/services/svc_meta_be.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_meta_be.h"
#include "rgw_mdlog.h"
#define dout_subsys ceph_subsys_rgw
using namespace std;
RGWSI_MetaBackend::Context::~Context() {} // needed, even though destructor is pure virtual
RGWSI_MetaBa... | 5,858 | 29.201031 | 135 | cc |
null | ceph-main/src/rgw/services/svc_meta_be.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
* Lic... | 9,488 | 31.166102 | 119 | h |
null | ceph-main/src/rgw/services/svc_meta_be_otp.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_meta_be_otp.h"
#include "rgw_tools.h"
#include "rgw_metadata.h"
#include "rgw_mdlog.h"
#define dout_subsys ceph_subsys_rgw
using namespace std;
RGWSI_MetaBackend_OTP::RGWSI_MetaBackend_OTP(CephCon... | 2,284 | 29.878378 | 126 | cc |
null | ceph-main/src/rgw/services/svc_meta_be_otp.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
* Li... | 2,477 | 26.533333 | 115 | h |
null | ceph-main/src/rgw/services/svc_meta_be_params.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
* Li... | 578 | 21.269231 | 83 | h |
null | ceph-main/src/rgw/services/svc_meta_be_sobj.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_meta_be_sobj.h"
#include "svc_meta_be_params.h"
#include "svc_mdlog.h"
#include "rgw_tools.h"
#include "rgw_metadata.h"
#include "rgw_mdlog.h"
#define dout_subsys ceph_subsys_rgw
using namespace st... | 8,036 | 31.538462 | 127 | cc |
null | ceph-main/src/rgw/services/svc_meta_be_sobj.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
* Li... | 6,733 | 33.533333 | 117 | h |
null | ceph-main/src/rgw/services/svc_meta_be_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) 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
* Lic... | 528 | 18.592593 | 70 | h |
null | ceph-main/src/rgw/services/svc_notify.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "include/random.h"
#include "include/Context.h"
#include "common/errno.h"
#include "rgw_cache.h"
#include "svc_notify.h"
#include "svc_finisher.h"
#include "svc_zone.h"
#include "svc_rados.h"
#include "r... | 11,700 | 24.887168 | 134 | cc |
null | ceph-main/src/rgw/services/svc_notify.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
#include "svc_rados.h"
class Context;
class RGWSI_Zone;
class RGWSI_Finisher;
class RGWWatcher;
class RGWSI_Notify_ShutdownCB;
struct RGWCacheNotifyInfo;
class RGWSI_Not... | 2,755 | 24.757009 | 101 | h |
null | ceph-main/src/rgw/services/svc_otp.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_otp.h"
#include "svc_zone.h"
#include "svc_meta.h"
#include "svc_meta_be_sobj.h"
#include "rgw_zone.h"
#define dout_subsys ceph_subsys_rgw
using namespace std;
class RGW_MB_Handler_Module_OTP : pu... | 5,105 | 26.304813 | 112 | cc |
null | ceph-main/src/rgw/services/svc_otp.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
* Lic... | 2,780 | 27.96875 | 71 | h |
null | ceph-main/src/rgw/services/svc_otp_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) 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
* Lic... | 740 | 23.7 | 94 | h |
null | ceph-main/src/rgw/services/svc_quota.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_quota.h"
#include "svc_zone.h"
#include "rgw_zone.h"
const RGWQuotaInfo& RGWSI_Quota::get_bucket_quota() const
{
return zone_svc->get_current_period().get_config().quota.bucket_quota;
}
const RGW... | 443 | 22.368421 | 72 | cc |
null | ceph-main/src/rgw/services/svc_quota.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
class RGWSI_Quota : public RGWServiceInstance
{
RGWSI_Zone *zone_svc{nullptr};
public:
RGWSI_Quota(CephContext *cct): RGWServiceInstance(cct) {}
void init(RGWSI_Zone... | 463 | 19.173913 | 70 | h |
null | ceph-main/src/rgw/services/svc_rados.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_rados.h"
#include "include/rados/librados.hpp"
#include "common/errno.h"
#include "osd/osd_types.h"
#include "rgw_tools.h"
#include "rgw_cr_rados.h"
#include "auth/AuthRegistry.h"
#define dout_subs... | 11,560 | 24.921525 | 117 | cc |
null | ceph-main/src/rgw/services/svc_rados.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
#include "include/rados/librados.hpp"
#include "common/async/yield_context.h"
class RGWAsyncRadosProcessor;
class RGWAccessListFilter {
public:
virtual ~RGWAccessListFilt... | 6,282 | 23.833992 | 112 | h |
null | ceph-main/src/rgw/services/svc_role_rados.cc | #include "svc_role_rados.h"
#include "svc_meta_be_sobj.h"
#include "svc_meta.h"
#include "rgw_role.h"
#include "rgw_zone.h"
#include "svc_zone.h"
#include "rgw_tools.h"
#define dout_subsys ceph_subsys_rgw
class RGWSI_Role_Module : public RGWSI_MBSObj_Handler_Module {
RGWSI_Role_RADOS::Svc& svc;
const std::string ... | 2,264 | 26.289157 | 96 | cc |
null | ceph-main/src/rgw/services/svc_role_rados.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 SUSE LLC
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License v... | 1,357 | 25.627451 | 73 | h |
null | ceph-main/src/rgw/services/svc_sync_modules.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_sync_modules.h"
#include "svc_zone.h"
#include "rgw_sync_module.h"
#include "rgw_zone.h"
#define dout_subsys ceph_subsys_rgw
void RGWSI_SyncModules::init(RGWSI_Zone *zone_svc)
{
svc.zone = zone_s... | 1,295 | 27.8 | 145 | cc |
null | ceph-main/src/rgw/services/svc_sync_modules.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
#include "rgw_sync_module.h"
class RGWSI_Zone;
class RGWSyncModulesManager;
class RGWSI_SyncModules : public RGWServiceInstance
{
RGWSyncModulesManager *sync_modules_mana... | 790 | 21.6 | 71 | h |
null | ceph-main/src/rgw/services/svc_sys_obj.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_sys_obj.h"
#include "svc_sys_obj_core.h"
#include "svc_rados.h"
#include "svc_zone.h"
#include "rgw_zone.h"
#define dout_subsys ceph_subsys_rgw
using namespace std;
RGWSI_SysObj::Obj RGWSI_SysObj:... | 5,749 | 30.25 | 134 | cc |
null | ceph-main/src/rgw/services/svc_sys_obj.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "common/static_ptr.h"
#include "rgw_service.h"
#include "svc_rados.h"
#include "svc_sys_obj_types.h"
#include "svc_sys_obj_core_types.h"
class RGWSI_Zone;
class RGWSI_SysObj;
struct rgw_... | 7,197 | 25.560886 | 134 | h |
null | ceph-main/src/rgw/services/svc_sys_obj_cache.cc |
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "common/admin_socket.h"
#include "svc_sys_obj_cache.h"
#include "svc_zone.h"
#include "svc_notify.h"
#include "rgw_zone.h"
#include "rgw_tools.h"
#define dout_subsys ceph_subsys_rgw
using namespace st... | 19,023 | 27.351714 | 133 | cc |
null | ceph-main/src/rgw/services/svc_sys_obj_cache.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "common/RWLock.h"
#include "rgw_service.h"
#include "rgw_cache.h"
#include "svc_sys_obj_core.h"
class RGWSI_Notify;
class RGWSI_SysObj_Cache_CB;
class RGWSI_SysObj_Cache_ASocketHook;
clas... | 6,954 | 30.188341 | 126 | h |
null | ceph-main/src/rgw/services/svc_sys_obj_core.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_sys_obj_core.h"
#include "svc_rados.h"
#include "svc_zone.h"
#include "rgw_tools.h"
#define dout_subsys ceph_subsys_rgw
using namespace std;
int RGWSI_SysObj_Core_GetObjState::get_rados_obj(const ... | 18,124 | 26.173913 | 110 | cc |
null | ceph-main/src/rgw/services/svc_sys_obj_core.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
#include "svc_rados.h"
#include "svc_sys_obj.h"
#include "svc_sys_obj_core_types.h"
class RGWSI_Zone;
struct rgw_cache_entry_info;
class RGWSI_SysObj_Core : public RGWSer... | 5,988 | 40.020548 | 121 | h |
null | ceph-main/src/rgw/services/svc_sys_obj_core_types.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
#include "svc_rados.h"
#include "svc_sys_obj_types.h"
struct RGWSI_SysObj_Core_GetObjState : public RGWSI_SysObj_Obj_GetObjState {
RGWSI_RADOS::Obj rados_obj;
bool ha... | 909 | 25 | 98 | h |
null | ceph-main/src/rgw/services/svc_sys_obj_types.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
struct RGWSI_SysObj_Obj_GetObjState {
};
struct RGWSI_SysObj_Pool_ListInfo {
};
| 230 | 13.4375 | 70 | h |
null | ceph-main/src/rgw/services/svc_tier_rados.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_tier_rados.h"
using namespace std;
const std::string MP_META_SUFFIX = ".meta";
MultipartMetaFilter::~MultipartMetaFilter() {}
bool MultipartMetaFilter::filter(const string& name, string& key) {
... | 841 | 21.756757 | 70 | cc |
null | ceph-main/src/rgw/services/svc_tier_rados.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... | 4,259 | 26.483871 | 105 | h |
null | ceph-main/src/rgw/services/svc_user.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_user.h"
RGWSI_User::RGWSI_User(CephContext *cct): RGWServiceInstance(cct) {
}
RGWSI_User::~RGWSI_User() {
}
| 231 | 18.333333 | 70 | cc |
null | ceph-main/src/rgw/services/svc_user.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
* Lic... | 5,374 | 40.992188 | 89 | h |
null | ceph-main/src/rgw/services/svc_user_rados.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include <boost/algorithm/string.hpp>
#include "svc_user.h"
#include "svc_user_rados.h"
#include "svc_zone.h"
#include "svc_sys_obj.h"
#include "svc_sys_obj_cache.h"
#include "svc_meta.h"
#include "svc_meta_be_sob... | 29,944 | 29.902993 | 160 | cc |
null | ceph-main/src/rgw/services/svc_user_rados.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... | 8,779 | 40.415094 | 150 | h |
null | ceph-main/src/rgw/services/svc_zone.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_zone.h"
#include "svc_rados.h"
#include "svc_sys_obj.h"
#include "svc_sync_modules.h"
#include "rgw_zone.h"
#include "rgw_rest_conn.h"
#include "rgw_bucket_sync.h"
#include "common/errno.h"
#include... | 34,371 | 30.650092 | 173 | cc |
null | ceph-main/src/rgw/services/svc_zone.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
class RGWSI_RADOS;
class RGWSI_SysObj;
class RGWSI_SyncModules;
class RGWSI_Bucket_Sync;
class RGWRealm;
class RGWZoneGroup;
class RGWZone;
class RGWZoneParams;
class RGWPe... | 6,428 | 37.963636 | 160 | h |
null | ceph-main/src/rgw/services/svc_zone_utils.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#include "svc_zone_utils.h"
#include "svc_rados.h"
#include "svc_zone.h"
#include "rgw_zone.h"
using namespace std;
int RGWSI_ZoneUtils::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
init_unique_tr... | 2,350 | 35.169231 | 140 | cc |
null | ceph-main/src/rgw/services/svc_zone_utils.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
#include "rgw_service.h"
class RGWSI_RADOS;
class RGWSI_Zone;
class RGWSI_ZoneUtils : public RGWServiceInstance
{
friend struct RGWServices_Def;
RGWSI_RADOS *rados_svc{nullptr};
RGWSI_Zone *... | 825 | 20.179487 | 71 | h |
null | ceph-main/src/script/add_header.pl | #!/usr/bin/perl
use strict;
my $fn = shift @ARGV;
my $old = `cat $fn`;
my $header = `cat doc/header.txt`;
# strip existing header
my $new = $old;
if ($new =~ /^(.*)\* Ceph - scalable distributed file system/s) {
my ($a,@b) = split(/\*\/\n/, $new);
$new = join("*/\n",@b);
}
$new = $header . $new;
if ($new ne $old)... | 446 | 15.555556 | 65 | pl |
null | ceph-main/src/script/add_osd.sh | #!/usr/bin/env bash
set -ex
CEPH_DEV_DIR=dev
CEPH_BIN=bin
ceph_adm=$CEPH_BIN/ceph
osd=$1
location=$2
weight=.0990
# DANGEROUS
rm -rf $CEPH_DEV_DIR/osd$osd
mkdir -p $CEPH_DEV_DIR/osd$osd
uuid=`uuidgen`
echo "add osd$osd $uuid"
OSD_SECRET=$($CEPH_BIN/ceph-authtool --gen-print-key)
echo "{\"cephx_secret\": \"$OSD_SECR... | 896 | 23.916667 | 107 | sh |
null | ceph-main/src/script/bdev_grep.pl | #!/usr/bin/perl
my $offset = shift @ARGV;
while (<>) {
# next unless / \d\d bdev /;
my $rest = $_;
my @hit;
while ($rest =~ /([\da-f]+)[~\+]([\da-f]+)/) {
my ($o, $l) = $rest =~ /([\da-f]+)[~\+]([\da-f]+)/;
$rest = $';
if (hex($offset) >= hex($o) &&
hex($offset) < hex($o) + hex($l)) {
... | 445 | 21.3 | 52 | pl |
null | ceph-main/src/script/ceph-backport.sh | #!/usr/bin/env bash
set -e
#
# ceph-backport.sh - Ceph backporting script
#
# Credits: This script is based on work done by Loic Dachary
#
#
# This script automates the process of staging a backport starting from a
# Backport tracker issue.
#
# Setup:
#
# ceph-backport.sh --setup
#
# Usage and troubleshooting:
#
#... | 64,260 | 34.211507 | 267 | sh |
null | ceph-main/src/script/ceph-debug-docker.sh | #!/usr/bin/env bash
# This can be run from e.g. the senta machines which have docker available. You
# may need to run this script with sudo.
#
# Once you have booted into the image, you should be able to debug the core file:
# $ gdb -q /ceph/teuthology-archive/.../coredump/1500013578.8678.core
#
# You may want to ... | 5,570 | 30.653409 | 316 | sh |
null | ceph-main/src/script/ceph_dump_log.py | # Copyright (C) 2018 Red Hat Inc.
#
# Authors: Sergio Lopez Pascual <slopezpa@redhat.com>
# Brad Hubbard <bhubbard@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published by
# the Free Software Foundation; either v... | 3,710 | 38.903226 | 111 | py |
null | ceph-main/src/script/check_commands.sh | #!/bin/sh
git grep -e COMMAND\( -e COMMAND_WITH_FLAG\( | grep -o "(\"[a-zA-Z ]*\"" | grep -o "[a-zA-Z ]*" | sort | uniq > commands.txt
missing_test=false
good_tests=""
bad_tests=""
while read cmd; do
if git grep -q "$cmd" -- src/test qa/; then
good_tests="$good_tests '$cmd'"
else
echo "'$cmd' has no apparent... | 495 | 22.619048 | 124 | sh |
null | ceph-main/src/script/crash_bdev.sh | #!/usr/bin/env bash
set -ex
while true; do
./ceph daemon osd.0 config set bdev_inject_crash 2
sleep 5
tail -n 1000 out/osd.0.log | grep bdev_inject_crash || exit 1
./init-ceph start osd.0
sleep 20
done
| 223 | 19.363636 | 65 | sh |
null | ceph-main/src/script/credits.sh | #!/usr/bin/env bash
range="$1"
TMP=/tmp/credits
declare -A mail2author
declare -A mail2organization
remap="s/'/ /g"
git log --pretty='%ae %aN <%aE>' $range | sed -e "$remap" | sort -u > $TMP
while read mail who ; do
author=$(echo $who | git -c mailmap.file=.peoplemap check-mailmap --stdin)
mail2author[$mail]="... | 2,379 | 49.638298 | 219 | sh |
null | ceph-main/src/script/extend_stretch_cluster.sh | #!/usr/bin/env bash
set -ex
../src/script/add_osd.sh 4 'host=host1-1 datacenter=site1 root=default'
../src/script/add_osd.sh 5 'host=host1-2 datacenter=site1 root=default'
../src/script/add_osd.sh 6 'host=host2-1 datacenter=site2 root=default'
../src/script/add_osd.sh 7 'host=host2-2 datacenter=site2 root=default'
| 318 | 34.444444 | 71 | sh |
null | ceph-main/src/script/find_dups_in_pg_log.sh | #!/bin/sh
# pipe output of grep for objectname in osd logs to me
#
# e.g.,
#
# zgrep smithi01817880-936 remote/*/log/*osd* | ~/src/ceph/src/script/find_dups_in_pg_log.sh
#
# or
#
# zcat remote/*/log/*osd* | ~/src/ceph/src/script/find_dups_in_pg_log.sh
#
# output will be any requests that appear in the pg log >1 time... | 690 | 29.043478 | 145 | sh |
null | ceph-main/src/script/fix_modeline.pl | #!/usr/bin/perl
use strict;
my $fn = shift @ARGV;
my $old = `cat $fn`;
my $header = `cat doc/modeline.txt`;
# strip existing modeline
my $new = $old;
$new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs
$new =~ s/^\/\/ vim: ([^\n]*)\n//s; # vim;
$new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs
$ne... | 668 | 21.3 | 60 | pl |
null | ceph-main/src/script/gen-corpus.sh | #!/usr/bin/env bash
# -*- mode:sh; tab-width:4; sh-basic-offset:4; indent-tabs-mode:nil -*-
# vim: softtabstop=4 shiftwidth=4 expandtab
set -ex
function get_jobs() {
local jobs=$(nproc)
if [ $jobs -ge 8 ] ; then
echo 8
else
echo $jobs
fi
}
[ -z "$BUILD_DIR" ] && BUILD_DIR=build
funct... | 2,323 | 21.563107 | 71 | sh |
null | ceph-main/src/script/kcon_all.sh | #!/bin/sh -x
p() {
echo "$*" > /sys/kernel/debug/dynamic_debug/control
}
echo 9 > /proc/sysrq-trigger
p 'module ceph +p'
p 'module libceph +p'
p 'module rbd +p'
| 164 | 14 | 52 | sh |
null | ceph-main/src/script/kcon_most.sh | #!/bin/sh -x
p() {
echo "$*" > /sys/kernel/debug/dynamic_debug/control
}
echo 9 > /proc/sysrq-trigger
p 'module ceph +p'
p 'module libceph +p'
p 'module rbd +p'
p 'file net/ceph/messenger.c -p'
p 'file' `grep -- --- /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '+p'
p 'f... | 435 | 30.142857 | 118 | sh |
null | ceph-main/src/script/lib-build.sh | #!/usr/bin/env bash
#
# lib-build.sh - A library of build and test bash shell functions.
#
# There should be few, or none, globals in this file beyond function
# definitions.
#
# This script should be `shellcheck`ed. Please run shellcheck when
# making changes to this script and use ignore comments
# (ref: https://www.... | 3,031 | 33.067416 | 79 | sh |
null | ceph-main/src/script/ptl-tool.py | #!/usr/bin/python3
# README:
#
# This tool's purpose is to make it easier to merge PRs into test branches and
# into main. Make sure you generate a Personal access token in GitHub and
# add it your ~/.github.key.
#
# Because developers often have custom names for the ceph upstream remote
# (https://github.com/ceph/cep... | 15,439 | 37.123457 | 199 | py |
null | ceph-main/src/script/run-cbt.sh | #!/bin/sh
usage() {
prog_name=$1
shift
cat <<EOF
usage:
$prog_name [options] <config-file>...
options:
-a,--archive-dir directory in which the test result is stored, default to $PWD/cbt-archive
--build-dir directory where CMakeCache.txt is located, default to $PWD
--cbt di... | 4,207 | 27.241611 | 141 | sh |
null | ceph-main/src/script/run-make.sh | #!/usr/bin/env bash
set -e
if ! [ "${_SOURCED_LIB_BUILD}" = 1 ]; then
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CEPH_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
. "${CEPH_ROOT}/src/script/lib-build.sh" || exit 2
fi
trap clean_up_after_myself EXIT
ORIGINAL_CCACHE_CONF="$HOME/.ccache/ccach... | 5,447 | 29.099448 | 88 | sh |
null | ceph-main/src/script/run_mypy.sh | #!/usr/bin/env bash
# needs to be executed from the src directory.
# generates a report at src/mypy_report.txt
set -e
python3 -m venv .mypy_venv
. .mypy_venv/bin/activate
! pip install $(find -name requirements.txt -not -path './frontend/*' -printf '-r%p ')
pip install mypy
MYPY_INI="$PWD"/mypy.ini
export MYPYPA... | 2,880 | 25.431193 | 188 | sh |
null | ceph-main/src/script/run_tox.sh | #!/usr/bin/env bash
set -e
if [ `uname` = FreeBSD ]; then
GETOPT=/usr/local/bin/getopt
else
GETOPT=getopt
fi
function usage() {
local prog_name=$(basename $1)
shift
cat <<EOF
$prog_name [options] ... [test_name]
options:
[-h|--help] display this help message
[--source-dir dir] root... | 3,696 | 27.007576 | 251 | sh |
null | ceph-main/src/script/run_uml.sh | #!/bin/bash -norc
# Magic startup script for a UML instance. As long as unique
# instances are started, more than one of them can be concurrently
# in use on a single system. All their network interfaces are
# bridged together onto the virtual bridge "virbr0" which is
# supplied by the "libvirt" package.
#
# Note th... | 6,622 | 30.093897 | 68 | sh |
null | ceph-main/src/script/set_up_stretch_mode.sh | #!/usr/bin/env bash
set -x
./bin/ceph config set osd osd_crush_update_on_start false
./bin/ceph osd crush move osd.0 host=host1-1 datacenter=site1 root=default
./bin/ceph osd crush move osd.1 host=host1-2 datacenter=site1 root=default
./bin/ceph osd crush move osd.2 host=host2-1 datacenter=site2 root=default
./bin/c... | 1,613 | 28.345455 | 74 | sh |
null | ceph-main/src/script/strip_trailing_whitespace.sh | #!/bin/sh
sed -i 's/[ \t]*$//' $1
sed -i 's/^ /\t/' $1
| 63 | 11.8 | 27 | sh |
null | ceph-main/src/script/kubejacker/kubejacker.sh | #!/bin/bash
set -x
set -e
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
# Run me from your build dir! I look for binaries in bin/, lib/ etc.
BUILDPATH=$(pwd)
# PREREQUISITE: a repo that you can push to. You are probably running
# a local docker registry that your kubelet nodes also have access to.
RE... | 2,665 | 28.955056 | 128 | sh |
null | ceph-main/src/script/smr_benchmark/linearCopy.sh | #!/usr/bin/env bash
# copy a linear file from srcFile to destination disk in a loop until writeSize MBs is written
# destinationDisk is a SMR Host Aware Disk eg. /dev/sdb
if [ "$#" -lt 3 ]; then
echo "Usage ./linearCopy.sh srcFile destinationDisk writeSize(MB)"
exit
fi
if [ "$(id -u)" != "0" ]; then
echo "Please ... | 1,898 | 19.641304 | 94 | sh |
null | ceph-main/src/script/smr_benchmark/linearSMRCopy.sh | #! /usr/bin/env bash
# copy a linear file from srcFile to destination SMRDisk in a loop until writeSize MBs is written
# SMRDisk is the SMR Host Aware / Host Managed Disk eg. /dev/sdb
usage(){
echo "linearSMRCopy.sh <srcFile> <SMRDisk> <writeSize (MB)>"
}
if [ "$#" -lt 3 ]; then
usage
exit
fi
if [ "$(id -u)" != ... | 1,789 | 24.571429 | 127 | sh |
null | ceph-main/src/test/TestSignalHandlers.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 Dreamhost
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version ... | 2,911 | 23.677966 | 82 | cc |
null | ceph-main/src/test/TestTimers.cc | #include "common/ceph_argparse.h"
#include "common/ceph_mutex.h"
#include "common/Timer.h"
#include "global/global_init.h"
#include "include/Context.h"
#include <iostream>
/*
* TestTimers
*
* Tests the timer classes
*/
#define MAX_TEST_CONTEXTS 5
using namespace std;
class TestContext;
namespace
{
int test_a... | 6,307 | 21.368794 | 75 | cc |
null | ceph-main/src/test/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 ... | 10,771 | 30.497076 | 119 | cc |
null | ceph-main/src/test/admin_socket_output.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
*
* 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,700 | 30.691358 | 90 | cc |
null | ceph-main/src/test/admin_socket_output.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
*
* 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,157 | 27.025974 | 86 | h |
null | ceph-main/src/test/admin_socket_output_tests.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
*
* 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,504 | 31.453704 | 92 | cc |
null | ceph-main/src/test/admin_socket_output_tests.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
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 744 | 24.689655 | 74 | h |
null | ceph-main/src/test/barclass.cc |
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include "objclass/objclass.h"
CLS_VER(1,0)
CLS_NAME(bar)
cls_handle_t h_class;
cls_method_handle_t h_foo;
int foo_method(cls_method_context_t ctx, char *indata, int datalen,
char **outdata, int *outdatalen)
{
int i;
cls_log("hello world, t... | 817 | 15.693878 | 67 | cc |
null | ceph-main/src/test/base64.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 Dreamhost
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version ... | 2,671 | 24.941748 | 94 | cc |
null | ceph-main/src/test/bench_journald_logger.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "common/Journald.h"
#include "log/Entry.h"
#include "log/SubsystemMap.h"
using namespace ceph::logging;
int main()
{
SubsystemMap subs;
JournaldLogger journald(&subs);
for (int i = 0; i < 100000; i++) {
... | 535 | 24.52381 | 147 | cc |
null | ceph-main/src/test/bench_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 "common/Thread.h"
#include "common/debug.h"
#include "common/Clock.h"
#include "common/config.h"
#include "common/ceph_argparse.h"
#include "global/global_init.h"
#define dout_context ... | 1,880 | 20.62069 | 77 | cc |
null | ceph-main/src/test/bufferlist.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 program is free software; you can redistribute it an... | 80,980 | 25.258431 | 98 | cc |
null | ceph-main/src/test/buildtest_skeleton.cc | #include "common/common_init.h"
/* This program exists to test that we can build libcommon without
* referencing g_ceph_context
*
* This program will go away as soon as we actually don't use g_ceph_context in
* more programs. Obviously, at that point, those programs will provide an
* equivalent test.
*/
int main... | 360 | 24.785714 | 79 | cc |
null | ceph-main/src/test/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) 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 ... | 15,254 | 26.990826 | 93 | cc |
null | ceph-main/src/test/ceph_compatset.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,161 | 29.72619 | 84 | cc |
null | ceph-main/src/test/ceph_crypto.cc | #include "gtest/gtest.h"
#include "common/ceph_argparse.h"
#include "common/ceph_crypto.h"
#include "common/common_init.h"
#include "global/global_init.h"
#include "global/global_context.h"
class CryptoEnvironment: public ::testing::Environment {
public:
void SetUp() override {
ceph::crypto::init();
}
};
TEST... | 9,505 | 32.121951 | 163 | cc |
null | ceph-main/src/test/confutils.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2011 New Dream Network
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | 12,434 | 26.091503 | 76 | cc |
null | ceph-main/src/test/coverage.sh | #!/bin/sh
set -e
usage () {
printf '%s: usage: %s [-d srcdir] [-o output_basename] COMMAND [ARGS..]\n' "$(basename "$0")" "$(basename "$0")" 1>&2
exit 1
}
OUTPUT_BASENAME=coverage
SRCDIR=.
while getopts "d:o:h" flag
do
case $flag in
d) SRCDIR=$OPTARG;;
o) OUTPUT_BASENAME=$OPTARG;;
*) usa... | 900 | 29.033333 | 123 | sh |
null | ceph-main/src/test/crypto.cc | #include <errno.h>
#include <time.h>
#include <boost/container/small_vector.hpp>
#include "gtest/gtest.h"
#include "include/types.h"
#include "auth/Crypto.h"
#include "common/Clock.h"
#include "common/ceph_crypto.h"
#include "common/ceph_context.h"
#include "global/global_context.h"
using namespace std;
class Crypt... | 9,684 | 27.236152 | 77 | cc |
null | ceph-main/src/test/crypto_init.cc | #include <errno.h>
#include <time.h>
#include <pthread.h>
#include <unistd.h>
#include <vector>
#include "include/types.h"
#include "common/code_environment.h"
#include "global/global_context.h"
#include "global/global_init.h"
#include "include/msgr.h"
#include "gtest/gtest.h"
#include "auth/Crypto.h"
#include "common... | 471 | 20.454545 | 41 | cc |
null | ceph-main/src/test/cxx11_client.cc | #include "include/buffer.h"
// We might want to include here all our public headers.
// Not any file residing in src/include has this status.
int main() {}
| 158 | 21.714286 | 56 | cc |
null | ceph-main/src/test/daemon_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) 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 ... | 12,034 | 30.587927 | 110 | cc |
null | ceph-main/src/test/detect-build-env-vars.sh | #!/usr/bin/env bash
if [ -n "$CEPH_BUILD_DIR" ] && [ -n "$CEPH_ROOT" ] && [ -n "$CEPH_BIN" ] && [ -n "$CEPH_LIB" ]; then
echo "Enivronment Variables Already Set"
elif [ -e CMakeCache.txt ]; then
echo "Environment Variables Not All Set, Detected Build System CMake"
echo "Setting Environment Variables"
export CE... | 639 | 31 | 100 | sh |
null | ceph-main/src/test/docker-test-helper.sh | #!/usr/bin/env bash
#
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published by
# the Free Software Foundation; either version 2, or (... | 10,592 | 28.839437 | 141 | sh |
null | ceph-main/src/test/docker-test.sh | #!/usr/bin/env bash
#
# Copyright (C) 2014 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published by
# the Free Software Foundation; either version 2, or (at you... | 649 | 31.5 | 70 | sh |
null | ceph-main/src/test/encoding.cc | #include "include/buffer.h"
#include "include/encoding.h"
#include <fmt/format.h>
#include "gtest/gtest.h"
using namespace std;
template < typename T >
static void test_encode_and_decode(const T& src)
{
bufferlist bl(1000000);
encode(src, bl);
T dst;
auto i = bl.cbegin();
decode(dst, i);
ASSERT_EQ(src, d... | 13,939 | 24.625 | 102 | cc |
null | ceph-main/src/test/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 ... | 4,786 | 36.108527 | 101 | cc |
null | ceph-main/src/test/fooclass.cc |
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include "objclass/objclass.h"
CLS_VER(1,0)
CLS_NAME(foo)
cls_handle_t h_class;
cls_method_handle_t h_foo;
int foo_method(cls_method_context_t ctx, char *indata, int datalen,
char **outdata, int *outdatalen)
{
int i;
cls_log("hello world, t... | 817 | 15.693878 | 67 | cc |