Project

General

Profile

Actions

Cleanup #4167

closed

ceph: update rados.h to match kernel

Added by Alex Elder about 11 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

This issue updated the kernel's version of "rados.h" so it
includes new definitions added to the user space side.
http://tracker.ceph.com/issues/4164

There are still a few definitions in the kernel file that
are not reflected in the user space header, and that should
be done.

Actions #1

Updated by Alex Elder about 11 years ago

I'm of two minds about how to represent special errno's
defined in the interface between distinct modules (ceph
user space and the ceph kernel code).

Specifically, EOLDSNAPC is defined using ERESTART in
the kernel (and in the wireshark plugin) and using the
numeric value 85 in the user space code. Similarly,
EBLACKLISTED is defined as either ESHUTDOWN or 108.

Those numeric values typically match those standard
symbolic values.

But technically the symbolic values could change
what number they use to represent them.

In fact, in the kernel ERESTART is defined in five
different ways, dependent on hardware architecture
85 generic
91 mips
116 sparc
127 alpha,
175 parisc

Similarly, ESHUTDOWN can be:
58 alpha and sparc
108 generic
143 mips
236 parisc

So using a numeric value is preferable.

On the other hand, the numeric value might have a
different symbolic value. For example, numeric 85
(which we interpret as ERESTART/OLDSNAPC) represents
EPROTO on alpha.

The only good solution is to use known distinct values
for these special symbols at interface boundaries, and
translate between them and well-understood values for
internal use if necessary (i.e., if you need a valid
errno value).

Actions #2

Updated by Sage Weil almost 8 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF