XRootD
XrdCephOss.cc File Reference
#include <stdio.h>
#include <string>
#include <fcntl.h>
#include "XrdVersion.hh"
#include "XrdCeph/XrdCephOss.hh"
#include "XrdCeph/XrdCephOssDir.hh"
#include "XrdCeph/XrdCephOssFile.hh"
#include "XrdCeph/XrdCephPosix.hh"
#include "XrdOuc/XrdOucEnv.hh"
#include "XrdSys/XrdSysError.hh"
#include "XrdOuc/XrdOucTrace.hh"
#include "XrdOuc/XrdOucStream.hh"
#include "XrdOuc/XrdOucName2Name.hh"
#include "XrdOuc/XrdOucN2NLoader.hh"
+ Include dependency graph for XrdCephOss.cc:

Go to the source code of this file.

Functions

static void logwrapper (char *format, va_list argp)
 
XrdOssXrdOssGetStorageSystem (XrdOss *native_oss, XrdSysLogger *lp, const char *config_fn, const char *parms)
 
 XrdVERSIONINFO (XrdOssGetStorageSystem, XrdCephOss)
 

Variables

char g_logstring [1024]
 
unsigned int g_maxCephPoolIdx
 
XrdOucName2Nameg_namelib
 
XrdSysError XrdCephEroute (0)
 

Function Documentation

◆ logwrapper()

static void logwrapper ( char *  format,
va_list  argp 
)
static

Definition at line 49 of file XrdCephOss.cc.

49  {
50  vsnprintf(g_logstring, 1024, format, argp);
52 }
char g_logstring[1024]
Definition: XrdCephOss.cc:48
XrdSysError XrdCephEroute(0)
Definition: XrdCephOss.cc:45
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
Definition: XrdSysError.cc:141

References g_logstring, XrdSysError::Say(), and XrdCephEroute.

Referenced by XrdOssGetStorageSystem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdOssGetStorageSystem()

XrdOss* XrdOssGetStorageSystem ( XrdOss native_oss,
XrdSysLogger lp,
const char *  config_fn,
const char *  parms 
)

Definition at line 62 of file XrdCephOss.cc.

66  {
67  // Do the herald thing
68  XrdCephEroute.SetPrefix("ceph_");
70  XrdCephEroute.Say("++++++ CERN/IT-DSS XrdCeph");
71  // set parameters
72  try {
74  } catch (std::exception &e) {
75  XrdCephEroute.Say("CephOss loading failed with exception. Check the syntax of parameters : ", parms);
76  return 0;
77  }
78  // deal with logging
80  return new XrdCephOss(config_fn, XrdCephEroute);
81  }
static void logwrapper(char *format, va_list argp)
Definition: XrdCephOss.cc:49
void ceph_posix_set_logfunc(void(*logfunc)(char *, va_list argp))
void ceph_posix_set_defaults(const char *value)
XrdSysLogger * logger(XrdSysLogger *lp=0)
Definition: XrdSysError.hh:141
const char * SetPrefix(const char *prefix)
Definition: XrdSysError.hh:160

References ceph_posix_set_defaults(), ceph_posix_set_logfunc(), XrdSysError::logger(), logwrapper(), XrdSysError::Say(), XrdSysError::SetPrefix(), and XrdCephEroute.

Referenced by XrdCephOss::Configure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdVERSIONINFO()

XrdVERSIONINFO ( XrdOssGetStorageSystem  ,
XrdCephOss   
)

Variable Documentation

◆ g_logstring

char g_logstring[1024]

Definition at line 48 of file XrdCephOss.cc.

Referenced by logwrapper().

◆ g_maxCephPoolIdx

unsigned int g_maxCephPoolIdx
extern

size of the Striper/IoCtx pool, defaults to 1 may be overwritten in the configuration file (See XrdCephOss::configure)

Definition at line 116 of file XrdCephPosix.cc.

Referenced by ceph_posix_disconnect_all(), XrdCephOss::Configure(), and getCephPoolIdxAndIncrease().

◆ g_namelib

XrdOucName2Name* g_namelib
extern

pointer to library providing Name2Name interface. 0 be default populated in case of ceph.namelib entry in the config file used in XrdCephPosix

pointer to library providing Name2Name interface. 0 be default populated in case of ceph.namelib entry in the config file in XrdCephOss

Definition at line 119 of file XrdCephPosix.cc.

Referenced by XrdCephOss::Configure(), and translateFileName().

◆ XrdCephEroute

XrdOucTrace XrdCephTrace & XrdCephEroute ( )