From: Tony Asleson <tasleson@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 4/5] lvm2app: Move core lv re-size code (v2)
Date: Fri, 15 Mar 2013 11:30:26 -0500 [thread overview]
Message-ID: <51434CA2.1040401@redhat.com> (raw)
In-Reply-To: <5142D8FD.5000107@redhat.com>
On 03/15/2013 03:17 AM, Zdenek Kabelac wrote:
> The issue is of course bigger - since the current 1/0 internal lvm
> logic doesn't support well the public API where you really want to know
> the 'reason' for failure - which ATM is just logged with log_error()
> deeply from liblvm/libdm code.
>
> We need here some decision - I guess - the best would be probably to
> define
> the list of error codes we want to expose to the lvm2api users first.
>
> Should the API user know about dm errors?
> Parameter errors ?
> Memory errors ?
> Internal errors ?
I believe the answer to all of these is yes. If the operation cannot
succeed the user of the library is going to want to know why. The
library interface should be more informational than the command line
interface.
As for error codes, I don't think we need to get specific with the error
codes unless the library caller can actually make a useful decision
based on that error code to execute some other code which may allow them
to succeed in the operation.
The library already has functions to return an error specific code
(lvm_errno) and error message text (lvm_errmsg). It also appears that
the logging code already stores messages it can retrieve.
I need to look at the error logging code some more to understand what is
missing or needs to be changed. We definitely need to make sure we
won't log to stdout/stderr when executing in the context of a library.
Regards,
-Tony
next prev parent reply other threads:[~2013-03-15 16:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 18:14 [PATCH 1/5] lvm2app: Implementation of pv resize (v6) Tony Asleson
2013-03-14 18:14 ` [PATCH 2/5] lvm2app: Move percent_of_extents to lvm-percent.[h|c] Tony Asleson
2013-03-14 18:14 ` [PATCH 3/5] lvm2app: Rework argument handling for lv resize Tony Asleson
2013-03-14 18:14 ` [PATCH 4/5] lvm2app: Move core lv re-size code (v2) Tony Asleson
2013-03-15 8:17 ` Zdenek Kabelac
2013-03-15 16:30 ` Tony Asleson [this message]
2013-03-14 18:14 ` [PATCH 5/5] lvm2app: Implement lv resize (v2) Tony Asleson
-- strict thread matches above, loose matches on Subject: below --
2013-03-13 22:13 [PATCH 1/5] lvm2app: Implementation of pv resize (v6) Tony Asleson
2013-03-13 22:13 ` [PATCH 4/5] lvm2app: Move core lv re-size code (v2) Tony Asleson
2013-03-14 14:12 ` Zdenek Kabelac
2013-03-14 15:12 ` Tony Asleson
2013-03-14 15:14 ` Zdenek Kabelac
2013-03-14 15:29 ` Tony Asleson
2013-03-14 15:39 ` Zdenek Kabelac
2013-03-14 14:17 ` Zdenek Kabelac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51434CA2.1040401@redhat.com \
--to=tasleson@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.