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/vnewosd.sh | #!/bin/bash -ex
OSD_SECRET=`bin/ceph-authtool --gen-print-key`
echo "{\"cephx_secret\": \"$OSD_SECRET\"}" > /tmp/$$
OSD_UUID=`uuidgen`
OSD_ID=`bin/ceph osd new $OSD_UUID -i /tmp/$$`
rm /tmp/$$
rm dev/osd$OSD_ID/* || true
mkdir -p dev/osd$OSD_ID
bin/ceph-osd -i $OSD_ID --mkfs --key $OSD_SECRET --osd-uuid $OSD_UUID
echo... | 437 | 26.375 | 69 | sh |
null | ceph-main/src/vstart.sh | #!/usr/bin/env bash
# -*- mode:sh; tab-width:4; sh-basic-offset:4; indent-tabs-mode:nil -*-
# vim: softtabstop=4 shiftwidth=4 expandtab
# abort on failure
set -e
quoted_print() {
for s in "$@"; do
if [[ "$s" =~ \ ]]; then
printf -- "'%s' " "$s"
else
printf -- "$s "
... | 55,884 | 28.121939 | 176 | sh |
null | ceph-main/src/arch/arm.c | #include "acconfig.h"
#include "arch/probe.h"
/* flags we export */
int ceph_arch_neon = 0;
int ceph_arch_aarch64_crc32 = 0;
int ceph_arch_aarch64_pmull = 0;
#include <stdio.h>
#if __linux__
#include <elf.h>
#include <link.h> // ElfW macro
#include <sys/auxv.h>
#if __arm__ || __aarch64__
#include <asm/hwcap.h>
#en... | 758 | 18.973684 | 64 | c |
null | ceph-main/src/arch/arm.h | #ifndef CEPH_ARCH_ARM_H
#define CEPH_ARCH_ARM_H
#ifdef __cplusplus
extern "C" {
#endif
extern int ceph_arch_neon; /* true if we have ARM NEON or ASIMD abilities */
extern int ceph_arch_aarch64_crc32; /* true if we have AArch64 CRC32/CRC32C abilities */
extern int ceph_arch_aarch64_pmull; /* true if we have AArch64... | 416 | 20.947368 | 89 | h |
null | ceph-main/src/arch/intel.c | /*
* Ceph - scalable distributed file system
*
* Copyright (C) 2013,2014 Inktank Storage, Inc.
* Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
*
* Author: Loic Dachary <loic@dachary.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Le... | 1,883 | 22.259259 | 81 | c |
null | ceph-main/src/arch/intel.h | #ifndef CEPH_ARCH_INTEL_H
#define CEPH_ARCH_INTEL_H
#ifdef __cplusplus
extern "C" {
#endif
extern int ceph_arch_intel_pclmul; /* true if we have PCLMUL features */
extern int ceph_arch_intel_sse42; /* true if we have sse 4.2 features */
extern int ceph_arch_intel_sse41; /* true if we have sse 4.1 features */
extern... | 681 | 28.652174 | 73 | h |
null | ceph-main/src/arch/ppc.c | /* Copyright (C) 2017 International Business Machines Corp.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) ... | 889 | 20.707317 | 78 | c |
null | ceph-main/src/arch/ppc.h | /* Copyright (C) 2017 International Business Machines Corp.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) ... | 540 | 20.64 | 64 | h |
null | ceph-main/src/arch/probe.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "arch/probe.h"
#include "arch/intel.h"
#include "arch/arm.h"
#include "arch/ppc.h"
int ceph_arch_probe(void)
{
if (ceph_arch_probed)
return 1;
#if defined(__i386__) || defined(__x86_64__)
ceph_arch_inte... | 603 | 21.37037 | 70 | cc |
null | ceph-main/src/arch/probe.h | #ifndef CEPH_ARCH_PROBE_H
#define CEPH_ARCH_PROBE_H
#ifdef __cplusplus
extern "C" {
#endif
extern int ceph_arch_probed; /* non-zero if we've probed features */
extern int ceph_arch_probe(void);
#ifdef __cplusplus
}
#endif
#endif
| 235 | 12.882353 | 69 | h |
null | ceph-main/src/auth/Auth.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-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 ... | 7,619 | 22.8125 | 79 | h |
null | ceph-main/src/auth/AuthAuthorizeHandler.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-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 ... | 1,331 | 26.75 | 71 | h |
null | ceph-main/src/auth/AuthClient.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include <cstdint>
#include <vector>
#include "include/buffer_fwd.h"
class AuthConnectionMeta;
class Connection;
class CryptoKey;
class AuthClient {
public:
virtual ~AuthClient() {}
/// Build an authe... | 1,390 | 25.75 | 70 | h |
null | ceph-main/src/auth/AuthClientHandler.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-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 ... | 1,005 | 22.395349 | 71 | cc |
null | ceph-main/src/auth/AuthClientHandler.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-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 ... | 1,947 | 25.324324 | 88 | h |
null | ceph-main/src/auth/AuthMethodList.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-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 ... | 2,140 | 28.736111 | 100 | cc |
null | ceph-main/src/auth/AuthMethodList.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-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 ... | 955 | 21.761905 | 71 | h |
null | ceph-main/src/auth/AuthRegistry.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "AuthRegistry.h"
#include "cephx/CephxAuthorizeHandler.h"
#ifdef HAVE_GSSAPI
#include "krb/KrbAuthorizeHandler.hpp"
#endif
#include "none/AuthNoneAuthorizeHandler.h"
#include "common/ceph_context.h"
#include "co... | 9,647 | 24.796791 | 81 | cc |
null | ceph-main/src/auth/AuthRegistry.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include <map>
#include <vector>
#include "AuthAuthorizeHandler.h"
#include "AuthMethodList.h"
#include "common/ceph_mutex.h"
#include "common/ceph_context.h"
#include "common/config_cacher.h"
class AuthRe... | 2,310 | 27.182927 | 76 | h |
null | ceph-main/src/auth/AuthServer.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
#include "AuthRegistry.h"
#include "include/common_fwd.h"
#include <vector>
class Connection;
class AuthServer {
public:
AuthRegistry auth_registry;
AuthServer(CephContext *cct) : auth_registry(cct) ... | 1,509 | 28.038462 | 81 | h |
null | ceph-main/src/auth/AuthServiceHandler.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-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 ... | 2,304 | 27.109756 | 87 | cc |
null | ceph-main/src/auth/AuthServiceHandler.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-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 ... | 2,573 | 29.642857 | 95 | h |
null | ceph-main/src/auth/AuthSessionHandler.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-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 ... | 1,463 | 25.618182 | 92 | cc |
null | ceph-main/src/auth/AuthSessionHandler.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-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 P... | 1,290 | 23.826923 | 102 | h |
null | ceph-main/src/auth/Crypto.cc | // vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-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
* License version 2.1, as published by the Free Software
* Fou... | 16,749 | 26.191558 | 94 | cc |
null | ceph-main/src/auth/Crypto.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-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 P... | 6,046 | 25.995536 | 77 | h |
null | ceph-main/src/auth/DummyAuth.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "AuthClient.h"
#include "AuthServer.h"
class DummyAuthClientServer : public AuthClient,
public AuthServer {
public:
DummyAuthClientServer(CephContext *cct) : AuthServer(cct) {}
// client
int get_... | 1,471 | 22 | 70 | h |
null | ceph-main/src/auth/KeyRing.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-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 P... | 6,441 | 24.066148 | 83 | cc |
null | ceph-main/src/auth/KeyRing.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-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 ... | 3,520 | 29.617391 | 121 | h |
null | ceph-main/src/auth/RotatingKeyRing.cc | #include <map>
#include "common/debug.h"
#include "auth/RotatingKeyRing.h"
#include "auth/KeyRing.h"
#define dout_subsys ceph_subsys_auth
#undef dout_prefix
#define dout_prefix *_dout << "auth: "
bool RotatingKeyRing::need_new_secrets() const
{
std::lock_guard l{lock};
return secrets.need_new_secrets();
}
bool... | 1,678 | 22.319444 | 82 | cc |
null | ceph-main/src/auth/RotatingKeyRing.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-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 ... | 1,376 | 24.5 | 76 | h |
null | ceph-main/src/auth/cephx/CephxAuthorizeHandler.cc | #include "CephxProtocol.h"
#include "CephxAuthorizeHandler.h"
#include "common/dout.h"
#define dout_subsys ceph_subsys_auth
bool CephxAuthorizeHandler::verify_authorizer(
CephContext *cct,
const KeyStore& keys,
const ceph::bufferlist& authorizer_data,
size_t connection_secret_required_len,
ceph::bufferlist ... | 1,371 | 25.901961 | 91 | cc |
null | ceph-main/src/auth/cephx/CephxAuthorizeHandler.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-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 ... | 1,114 | 26.875 | 71 | h |
null | ceph-main/src/auth/cephx/CephxClientHandler.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-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 ... | 9,770 | 28.254491 | 105 | cc |
null | ceph-main/src/auth/cephx/CephxClientHandler.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-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 ... | 2,017 | 24.544304 | 72 | h |
null | ceph-main/src/auth/cephx/CephxKeyServer.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-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 ... | 13,116 | 26.327083 | 123 | cc |
null | ceph-main/src/auth/cephx/CephxKeyServer.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-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 ... | 9,074 | 27.009259 | 91 | h |
null | ceph-main/src/auth/cephx/CephxProtocol.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-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... | 17,859 | 28.520661 | 111 | cc |
null | ceph-main/src/auth/cephx/CephxProtocol.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-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 ... | 13,084 | 23.782197 | 85 | h |
null | ceph-main/src/auth/cephx/CephxServiceHandler.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-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 ... | 13,167 | 30.203791 | 99 | cc |
null | ceph-main/src/auth/cephx/CephxServiceHandler.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-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 ... | 1,544 | 27.090909 | 71 | h |
null | ceph-main/src/auth/cephx/CephxSessionHandler.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-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 P... | 5,829 | 28.897436 | 110 | cc |
null | ceph-main/src/auth/cephx/CephxSessionHandler.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-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 P... | 1,128 | 24.088889 | 70 | h |
null | ceph-main/src/auth/krb/KrbAuthorizeHandler.cpp | // -*- 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 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 1,345 | 23.925926 | 78 | cpp |
null | ceph-main/src/auth/krb/KrbAuthorizeHandler.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) 2018 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 1,104 | 22.510638 | 70 | hpp |
null | ceph-main/src/auth/krb/KrbClientHandler.cpp | // -*- 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 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 8,553 | 32.677165 | 78 | cpp |
null | ceph-main/src/auth/krb/KrbClientHandler.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) 2018 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 2,259 | 25.588235 | 73 | hpp |
null | ceph-main/src/auth/krb/KrbProtocol.cpp | // -*- 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 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 2,782 | 30.988506 | 85 | cpp |
null | ceph-main/src/auth/krb/KrbProtocol.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) 2018 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 3,909 | 23.285714 | 70 | hpp |
null | ceph-main/src/auth/krb/KrbServiceHandler.cpp | // -*- 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 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 7,650 | 32.853982 | 87 | cpp |
null | ceph-main/src/auth/krb/KrbServiceHandler.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) 2018 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 1,758 | 27.370968 | 76 | hpp |
null | ceph-main/src/auth/krb/KrbSessionHandler.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) 2018 SUSE LLC.
* Author: Daniel Oliveira <doliveira@suse.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of ... | 867 | 21.842105 | 70 | hpp |
null | ceph-main/src/auth/none/AuthNoneAuthorizeHandler.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-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,502 | 25.368421 | 94 | cc |
null | ceph-main/src/auth/none/AuthNoneAuthorizeHandler.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-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 ... | 1,123 | 27.1 | 71 | h |
null | ceph-main/src/auth/none/AuthNoneClientHandler.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-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 ... | 1,751 | 27.258065 | 86 | h |
null | ceph-main/src/auth/none/AuthNoneProtocol.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-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 ... | 1,142 | 28.307692 | 79 | h |
null | ceph-main/src/auth/none/AuthNoneServiceHandler.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-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 ... | 1,268 | 26 | 71 | h |
null | ceph-main/src/auth/none/AuthNoneSessionHandler.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-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 ... | 529 | 25.5 | 71 | h |
null | ceph-main/src/blk/BlockDevice.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 XSky <haomai@xsky.com>
*
* Author: Haomai Wang <haomaiwang@gmail.com>
*
* This is free software; you can redistribute it and/or
* modify it under... | 5,393 | 24.443396 | 78 | cc |
null | ceph-main/src/blk/BlockDevice.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2015 XSky <haomai@xsky.com>
*
* Author: Haomai Wang <haomaiwang@gmail.com>
*
* This is free software; you can redistribute it and/or
* modify it under... | 8,853 | 28.029508 | 117 | h |
null | ceph-main/src/blk/aio/aio.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <algorithm>
#include "aio.h"
std::ostream& operator<<(std::ostream& os, const aio_t& aio)
{
unsigned i = 0;
os << "aio: ";
for (auto& iov : aio.iov) {
os << "\n [" << i++ << "] 0x"
<< std::hex <... | 3,200 | 24.608 | 87 | cc |
null | ceph-main/src/blk/aio/aio.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"
#if defined(HAVE_LIBAIO)
#include <libaio.h>
#elif defined(HAVE_POSIXAIO)
#include <aio.h>
#include <sys/event.h>
#endif
#include <boost/intrusive/list.hpp>
#include <boost/container/... | 3,965 | 23.7875 | 85 | h |
null | ceph-main/src/blk/kernel/KernelDevice.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 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.... | 43,353 | 28.89931 | 153 | cc |
null | ceph-main/src/blk/kernel/KernelDevice.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2014 Red Hat
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.... | 4,767 | 29.369427 | 111 | h |
null | ceph-main/src/blk/kernel/io_uring.cc | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include "io_uring.h"
#if defined(HAVE_LIBURING)
#include "liburing.h"
#include <sys/epoll.h>
using std::list;
using std::make_unique;
struct ioring_data {
struct io_uring io_uring;
pthread_mutex_t cq_mutex;
pth... | 5,354 | 19.207547 | 81 | cc |
null | ceph-main/src/blk/kernel/io_uring.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/types.h"
#include "aio/aio.h"
struct ioring_data;
struct ioring_queue_t final : public io_queue_t {
std::unique_ptr<ioring_data> d;
unsigned iodepth = 0;
bool... | 861 | 24.352941 | 70 | h |
null | ceph-main/src/blk/pmem/PMEMDevice.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 Intel <jianpeng.ma@intel.com>
*
* Author: Jianpeng Ma <jianpeng.ma@intel.com>
*
* This is free software; you can redistribute it and/or
* modify i... | 9,091 | 22.989446 | 125 | cc |
null | ceph-main/src/blk/pmem/PMEMDevice.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 Intel <jianpeng.ma@intel.com>
*
* Author: Jianpeng Ma <jianpeng.ma@intel.com>
*
* This is free software; you can redistribute it and/or
* modify ... | 2,206 | 26.936709 | 104 | h |
null | ceph-main/src/blk/spdk/NVMEDevice.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 XSky <haomai@xsky.com>
*
* Author: Haomai Wang <haomaiwang@gmail.com>
*
* This is free software; you can redistribute it and/or
* modify it un... | 28,078 | 27.276939 | 143 | cc |
null | ceph-main/src/blk/spdk/NVMEDevice.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2015 XSky <haomai@xsky.com>
*
* Author: Haomai Wang <haomaiwang@gmail.com>
*
* This is free software; you can redistribute it and/or
* modify it under... | 2,323 | 26.341176 | 104 | h |
null | ceph-main/src/blk/zoned/HMSMRDevice.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 Red Hat
* Copyright (C) 2020 Abutalib Aghayev
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Less... | 3,243 | 23.575758 | 84 | cc |
null | ceph-main/src/blk/zoned/HMSMRDevice.h | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2014 Red Hat
* Copyright (C) 2020 Abutalib Aghayev
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Less... | 1,323 | 23.981132 | 70 | h |
null | ceph-main/src/ceph-volume/setup.py | from setuptools import setup, find_packages
import os
setup(
name='ceph-volume',
version='1.0.0',
packages=find_packages(),
author='',
author_email='contact@redhat.com',
description='Deploy Ceph OSDs using different device technologies like lvm or physical disks',
license='LGPLv2+',
k... | 1,387 | 31.27907 | 98 | py |
null | ceph-main/src/ceph-volume/tox_install_command.sh | #!/usr/bin/env bash
python -m pip install --editable="file://`pwd`/../python-common"
python -m pip install $@
| 110 | 26.75 | 64 | sh |
null | ceph-main/src/ceph-volume/ceph_volume/__init__.py | from collections import namedtuple
sys_info = namedtuple('sys_info', ['devices'])
sys_info.devices = dict()
class UnloadedConfig(object):
"""
This class is used as the default value for conf.ceph so that if
a configuration file is not successfully loaded then it will give
a nice error message when v... | 623 | 26.130435 | 81 | py |
null | ceph-main/src/ceph-volume/ceph_volume/configuration.py | import contextlib
import logging
import os
import re
from ceph_volume import terminal, conf
from ceph_volume import exceptions
from sys import version_info as sys_version_info
if sys_version_info.major >= 3:
import configparser
conf_parentclass = configparser.ConfigParser
elif sys_version_info.major < 3:
i... | 8,831 | 36.905579 | 102 | py |
null | ceph-main/src/ceph-volume/ceph_volume/decorators.py | import os
import sys
from ceph_volume import terminal, exceptions
from functools import wraps
def needs_root(func):
"""
Check for super user privileges on functions/methods. Raise
``SuperUserError`` with a nice message.
"""
@wraps(func)
def is_root(*a, **kw):
if not os.getuid() == 0 an... | 2,535 | 26.868132 | 93 | py |
null | ceph-main/src/ceph-volume/ceph_volume/exceptions.py | import os
class ConfigurationError(Exception):
def __init__(self, cluster_name='ceph', path='/etc/ceph', abspath=None):
self.cluster_name = cluster_name
self.path = path
self.abspath = abspath or "%s.conf" % os.path.join(self.path, self.cluster_name)
def __str__(self):
return... | 1,616 | 24.265625 | 90 | py |
null | ceph-main/src/ceph-volume/ceph_volume/log.py | import logging
import os
from ceph_volume import terminal
from ceph_volume import conf
BASE_FORMAT = "[%(name)s][%(levelname)-6s] %(message)s"
FILE_FORMAT = "[%(asctime)s]" + BASE_FORMAT
def setup(name='ceph-volume.log', log_path=None, log_level=None):
log_path = log_path or conf.log_path
# if a non-root use... | 1,718 | 33.38 | 86 | py |
null | ceph-main/src/ceph-volume/ceph_volume/main.py | from __future__ import print_function
import argparse
import os
import pkg_resources
import sys
import logging
from ceph_volume.decorators import catches
from ceph_volume import log, devices, configuration, conf, exceptions, terminal, inventory, drive_group, activate
class Volume(object):
_help = """
ceph-volume... | 6,471 | 34.173913 | 113 | py |
null | ceph-main/src/ceph-volume/ceph_volume/process.py | from fcntl import fcntl, F_GETFL, F_SETFL
from os import O_NONBLOCK, read, path
import subprocess
from select import select
from ceph_volume import terminal
from ceph_volume.util import as_bytes
from ceph_volume.util.system import which, run_host_cmd, host_rootfs
import logging
logger = logging.getLogger(__name__)
... | 8,463 | 35.8 | 98 | py |
null | ceph-main/src/ceph-volume/ceph_volume/terminal.py | import logging
import sys
terminal_logger = logging.getLogger('terminal')
class colorize(str):
"""
Pretty simple to use::
colorize.make('foo').bold
colorize.make('foo').green
colorize.make('foo').yellow
colorize.make('foo').red
colorize.make('foo').blue
Otherwis... | 5,516 | 24.660465 | 79 | py |
null | ceph-main/src/ceph-volume/ceph_volume/activate/__init__.py | from .main import Activate # noqa
| 34 | 16.5 | 33 | py |
null | ceph-main/src/ceph-volume/ceph_volume/activate/main.py | # -*- coding: utf-8 -*-
import argparse
from ceph_volume import terminal
from ceph_volume.devices.lvm.activate import Activate as LVMActivate
from ceph_volume.devices.raw.activate import Activate as RAWActivate
from ceph_volume.devices.simple.activate import Activate as SimpleActivate
class Activate(object):
h... | 2,588 | 29.104651 | 85 | py |
null | ceph-main/src/ceph-volume/ceph_volume/api/__init__.py | """
Device API that can be shared among other implementations.
"""
| 67 | 16 | 58 | py |
null | ceph-main/src/ceph-volume/ceph_volume/api/lvm.py | """
API for CRUD lvm tag operations. Follows the Ceph LVM tag naming convention
that prefixes tags with ``ceph.`` and uses ``=`` for assignment, and provides
set of utilities for interacting with LVM.
"""
import logging
import os
import uuid
from itertools import repeat
from math import floor
from ceph_volume import pr... | 39,582 | 31.659241 | 106 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/__init__.py | from . import lvm, simple, raw # noqa
| 38 | 18.5 | 37 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/__init__.py | from .main import LVM # noqa
| 29 | 14 | 28 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/activate.py | from __future__ import print_function
import argparse
import logging
import os
from textwrap import dedent
from ceph_volume import process, conf, decorators, terminal, configuration
from ceph_volume.util import system, disk
from ceph_volume.util import prepare as prepare_utils
from ceph_volume.util import encryption as... | 11,005 | 38.028369 | 100 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/batch.py | import argparse
from collections import namedtuple
import json
import logging
from textwrap import dedent
from ceph_volume import terminal, decorators
from ceph_volume.util import disk, prompt_bool, arg_validators, templates
from ceph_volume.util import prepare
from . import common
from .create import Create
from .prep... | 23,228 | 35.754747 | 115 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/common.py | from ceph_volume.util import arg_validators, disk
from ceph_volume import process, conf
from ceph_volume import terminal
from ceph_volume.devices.lvm.zap import Zap
import argparse
def rollback_osd(args, osd_id=None):
"""
When the process of creating or preparing fails, the OSD needs to be
destroyed so tha... | 5,294 | 31.090909 | 102 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/create.py | from __future__ import print_function
from textwrap import dedent
import logging
from ceph_volume.util import system
from ceph_volume.util.arg_validators import exclude_group_options
from ceph_volume import decorators, terminal
from .common import create_parser, rollback_osd
from .prepare import Prepare
from .activate ... | 2,925 | 36.512821 | 102 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/deactivate.py | import argparse
import logging
import sys
from textwrap import dedent
from ceph_volume import conf
from ceph_volume.util import encryption, system
from ceph_volume.api.lvm import get_lvs_by_tag
logger = logging.getLogger(__name__)
def deactivate_osd(osd_id=None, osd_uuid=None):
lvs = []
if osd_uuid is not N... | 2,721 | 29.58427 | 87 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/listing.py | from __future__ import print_function
import argparse
import json
import logging
from textwrap import dedent
from ceph_volume import decorators
from ceph_volume.api import lvm as api
logger = logging.getLogger(__name__)
osd_list_header_template = """\n
{osd_id:=^20}"""
osd_device_header_template = """
{type: <1... | 7,185 | 31.080357 | 101 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/main.py | import argparse
from textwrap import dedent
from ceph_volume import terminal
from . import activate
from . import deactivate
from . import prepare
from . import create
from . import trigger
from . import listing
from . import zap
from . import batch
from . import migrate
class LVM(object):
help = 'Use LVM and LV... | 1,409 | 24.636364 | 71 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/migrate.py | from __future__ import print_function
import argparse
import logging
import os
from textwrap import dedent
from ceph_volume.util import system, disk, merge_dict
from ceph_volume.util.device import Device
from ceph_volume.util.arg_validators import valid_osd_id
from ceph_volume import decorators, terminal, process
from ... | 26,204 | 36.759366 | 120 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/prepare.py | from __future__ import print_function
import json
import logging
from textwrap import dedent
from ceph_volume.util import prepare as prepare_utils
from ceph_volume.util import encryption as encryption_utils
from ceph_volume.util import system, disk
from ceph_volume.util.arg_validators import exclude_group_options
from ... | 12,925 | 37.017647 | 103 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/trigger.py | from __future__ import print_function
import argparse
from textwrap import dedent
from ceph_volume.exceptions import SuffixParsingError
from ceph_volume import decorators
from .activate import Activate
def parse_osd_id(string):
osd_id = string.split('-', 1)[0]
if not osd_id:
raise SuffixParsingError('... | 2,174 | 29.633803 | 95 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/lvm/zap.py | import argparse
import os
import logging
import time
from textwrap import dedent
from ceph_volume import decorators, terminal, process
from ceph_volume.api import lvm as api
from ceph_volume.util import system, encryption, disk, arg_validators, str_to_int, merge_dict
from ceph_volume.util.device import Device
from ce... | 14,382 | 34.339066 | 110 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/raw/__init__.py | from .main import Raw # noqa
| 29 | 14 | 28 | py |