* Re: rbd format check
[not found] <4EC2EED6.9040509@dreamhost.com>
@ 2011-11-16 18:40 ` Sage Weil
2011-11-16 19:04 ` Josh Durgin
0 siblings, 1 reply; 4+ messages in thread
From: Sage Weil @ 2011-11-16 18:40 UTC (permalink / raw)
To: Josh Durgin; +Cc: ceph-devel
On Tue, 15 Nov 2011, Josh Durgin wrote:
> I added a simple check for the old version in the wip-rbd-layering branch of
> ceph and ceph-client.git. If that looks good and you want to push it upstream,
> maybe grab the rollback removal from wip-rollback as well.
On the librbd side, let's add a dout(0 or 1) so that we can figure out why
things are failing. Ideally we could use a distinct error code too so
that the tools can report an appropriate error message, altho looking at
errno-base.h nothing looks like an obvious choice.
For the kernel code, a pr_info or pr_warn would be good so that something
useful up on the console. And again, a distinct error code would be nice
so that 'rbd map ...' can print something helpful to stderr...
sage
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rbd format check
2011-11-16 18:40 ` rbd format check Sage Weil
@ 2011-11-16 19:04 ` Josh Durgin
2011-11-16 19:10 ` Sage Weil
0 siblings, 1 reply; 4+ messages in thread
From: Josh Durgin @ 2011-11-16 19:04 UTC (permalink / raw)
To: Sage Weil; +Cc: ceph-devel
On 11/16/2011 10:40 AM, Sage Weil wrote:
> On Tue, 15 Nov 2011, Josh Durgin wrote:
>> I added a simple check for the old version in the wip-rbd-layering branch of
>> ceph and ceph-client.git. If that looks good and you want to push it upstream,
>> maybe grab the rollback removal from wip-rollback as well.
>
> On the librbd side, let's add a dout(0 or 1) so that we can figure out why
> things are failing. Ideally we could use a distinct error code too so
> that the tools can report an appropriate error message, altho looking at
> errno-base.h nothing looks like an obvious choice.
I looked through errno.h as well and didn't see anything that fit very
well. Anyone have a suggestion? The ones that seem closest are EBADMSG
or EMEDIUMTYPE.
Also, the dout(0) errors don't seem to be printed unless you add the
--err-to-stderr (or stronger) flags. Shouldn't printing errors be the
default?
> For the kernel code, a pr_info or pr_warn would be good so that something
> useful up on the console. And again, a distinct error code would be nice
> so that 'rbd map ...' can print something helpful to stderr...
>
> sage
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rbd format check
2011-11-16 19:04 ` Josh Durgin
@ 2011-11-16 19:10 ` Sage Weil
2011-11-16 21:34 ` Josh Durgin
0 siblings, 1 reply; 4+ messages in thread
From: Sage Weil @ 2011-11-16 19:10 UTC (permalink / raw)
To: Josh Durgin; +Cc: ceph-devel
On Wed, 16 Nov 2011, Josh Durgin wrote:
> On 11/16/2011 10:40 AM, Sage Weil wrote:
> > On Tue, 15 Nov 2011, Josh Durgin wrote:
> > > I added a simple check for the old version in the wip-rbd-layering branch
> > > of
> > > ceph and ceph-client.git. If that looks good and you want to push it
> > > upstream,
> > > maybe grab the rollback removal from wip-rollback as well.
> >
> > On the librbd side, let's add a dout(0 or 1) so that we can figure out why
> > things are failing. Ideally we could use a distinct error code too so
> > that the tools can report an appropriate error message, altho looking at
> > errno-base.h nothing looks like an obvious choice.
>
> I looked through errno.h as well and didn't see anything that fit very well.
> Anyone have a suggestion? The ones that seem closest are EBADMSG or
> EMEDIUMTYPE.
>
> Also, the dout(0) errors don't seem to be printed unless you add the
> --err-to-stderr (or stronger) flags. Shouldn't printing errors be the
> default?
Hmm, err_to_stderr should default to true... although that is probably a
bad thing for librbd!
Maybe
#define ENOEXEC 8 /* Exec format error */
?
sage
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rbd format check
2011-11-16 19:10 ` Sage Weil
@ 2011-11-16 21:34 ` Josh Durgin
0 siblings, 0 replies; 4+ messages in thread
From: Josh Durgin @ 2011-11-16 21:34 UTC (permalink / raw)
To: Sage Weil; +Cc: ceph-devel
On 11/16/2011 11:10 AM, Sage Weil wrote:
> On Wed, 16 Nov 2011, Josh Durgin wrote:
>> On 11/16/2011 10:40 AM, Sage Weil wrote:
>>> On Tue, 15 Nov 2011, Josh Durgin wrote:
>>>> I added a simple check for the old version in the wip-rbd-layering branch
>>>> of
>>>> ceph and ceph-client.git. If that looks good and you want to push it
>>>> upstream,
>>>> maybe grab the rollback removal from wip-rollback as well.
>>>
>>> On the librbd side, let's add a dout(0 or 1) so that we can figure out why
>>> things are failing. Ideally we could use a distinct error code too so
>>> that the tools can report an appropriate error message, altho looking at
>>> errno-base.h nothing looks like an obvious choice.
>>
>> I looked through errno.h as well and didn't see anything that fit very well.
>> Anyone have a suggestion? The ones that seem closest are EBADMSG or
>> EMEDIUMTYPE.
>>
>> Also, the dout(0) errors don't seem to be printed unless you add the
>> --err-to-stderr (or stronger) flags. Shouldn't printing errors be the
>> default?
>
> Hmm, err_to_stderr should default to true... although that is probably a
> bad thing for librbd!
>
> Maybe
>
> #define ENOEXEC 8 /* Exec format error */
>
> ?
I went with ENXIO - from POSIX.1:
"No such device or address. Input or output on a special file refers to
a device that does not exist, or makes a request beyond the capabilities
of the device. It may also occur when, for example, a tape drive is not
on-line."
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-16 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4EC2EED6.9040509@dreamhost.com>
2011-11-16 18:40 ` rbd format check Sage Weil
2011-11-16 19:04 ` Josh Durgin
2011-11-16 19:10 ` Sage Weil
2011-11-16 21:34 ` Josh Durgin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.