]>
git.proxmox.com Git - ceph.git/blob - ceph/src/osd/error_code.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2019 Red Hat <contact@redhat.com>
7 * Author: Adam C. Emerson <aemerson@redhat.com>
9 * This is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License version 2.1, as published by the Free Software
12 * Foundation. See file COPYING.
18 #include <boost/system/error_code.hpp>
20 #include "include/rados.h"
22 const boost::system::error_category
& osd_category() noexcept
;
24 // Since the OSD mostly uses POSIX error codes plus a couple
25 // additions, this will be a degenerate error category for now that
26 // mostly forwards to POSIX.
29 old_snapc
= 85, /* ORDERSNAP flag set; writer has old snapc*/
30 blocklisted
= 108 /* blocklisted */
33 namespace boost::system
{
35 struct is_error_code_enum
<::osd_errc
> {
36 static const bool value
= true;
40 struct is_error_condition_enum
<::osd_errc
> {
41 static const bool value
= false;
45 // implicit conversion:
46 inline boost::system::error_code
make_error_code(osd_errc e
) noexcept
{
47 return { static_cast<int>(e
), osd_category() };
50 // explicit conversion:
51 inline boost::system::error_condition
make_error_condition(osd_errc e
) noexcept
{
52 return { static_cast<int>(e
), osd_category() };