]> git.proxmox.com Git - ceph.git/blob - ceph/src/global/global_context.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / global / global_context.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2011 New Dream Network
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15 #ifndef CEPH_GLOBAL_CONTEXT_H
16 #define CEPH_GLOBAL_CONTEXT_H
17
18 #include <limits.h>
19
20 #include "common/config_fwd.h"
21
22 class CephContext;
23
24 extern CephContext *g_ceph_context;
25 ConfigProxy& g_conf();
26
27 extern const char *g_assert_file;
28 extern int g_assert_line;
29 extern const char *g_assert_func;
30 extern const char *g_assert_condition;
31 extern unsigned long long g_assert_thread;
32 extern char g_assert_thread_name[4096];
33 extern char g_assert_msg[8096];
34 extern char g_process_name[NAME_MAX + 1];
35
36 extern bool g_eio;
37 extern char g_eio_devname[1024];
38 extern char g_eio_path[PATH_MAX];
39 extern int g_eio_error;
40 extern int g_eio_iotype; // IOCB_CMD_* from libaio's aio_abh.io
41 extern unsigned long long g_eio_offset;
42 extern unsigned long long g_eio_length;
43
44 extern int note_io_error_event(
45 const char *devname,
46 const char *path,
47 int error,
48 int iotype,
49 unsigned long long offset,
50 unsigned long long length);
51
52 #endif