Re: Errocodes over the line....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/06/2017 09:09, Willem Jan Withagen wrote:
> On 05/06/2017 03:25, Sage Weil wrote:
>> On Sun, 4 Jun 2017, Willem Jan Withagen wrote:
>>> On 30/05/2017 03:30, Sage Weil wrote:
>>>> It does.  There is a helper somewhere that maps error codes in MOSDOpReply 
>>>> that go over the wire that was added for an AIX port a year or two ago.  
>>>> look for errorcode32_t and ceph_to_host_errno etc
>>>
>>> 'mmm
>>>
>>> It looks like it is the other way around as what I'm looking for...
>>> These are the linux errno's translated to AIX/Darwin codes. So the
>>> native OS does not get upset when playing client. These .cc files are
>>> not even compiled in the standard ceph tree, as far as I can see.
>>>
>>> So I guess what I'm looking for is to issue the correct errorcodes on
>>> the line when also acting as server. And as far as I can imagine will
>>> need both: ceph_to_host_errno() and host_to_ceph_errno() and start
>>> glueing that in.
>>> Now the question is: I that restricted to one location to insert as
>>> well, or go I need to go chasing all places where the errcode is de/encoded.
>>
>> 1. Write the ceph_to_host_errno and host_to_ceph_errno methods
>> 2. Fix the errorcode32_t to use them for encode *and* decode.
>> 3. Identify the handful of places where we send errcodes over the wire 
>> (mostly MOSDOpReply and friends) and switch the type to errorcode32_t so 
>> that it is translated during encode/decode.
>>
>> Happy to help with 2 and 3 once we have 1 in place!

First attempt at 1) and 2) in https://github.com/ceph/ceph/pull/15495.
I took the darwin version as template.
If you like the array approach, I will also convert the original
ceph_to_host to array as well. (Or the other way around)

--WjW


--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux