* [PATCH] Optionally abort on internal errors.
@ 2009-11-29 19:26 Petr Rockai
2009-11-29 20:34 ` Milan Broz
2009-11-30 9:50 ` Alasdair G Kergon
0 siblings, 2 replies; 4+ messages in thread
From: Petr Rockai @ 2009-11-29 19:26 UTC (permalink / raw)
To: lvm-devel
Hi,
a fairly straightforward patch adding a configure option that will
abort() the process in case it encounters an internal
error. Undocumented so far and not sure it's appropriate to expose --
but maybe we have a policy of no undocumented options?
Anyway, patch attached. (It also makes the testsuite set this option, so
it'll catch any internal errors that may happen during the tests.)
Yours,
Petr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: internal-errors.diff
Type: text/x-diff
Size: 3081 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20091129/c5c559a0/attachment.bin>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Optionally abort on internal errors.
2009-11-29 19:26 [PATCH] Optionally abort on internal errors Petr Rockai
@ 2009-11-29 20:34 ` Milan Broz
2009-11-30 10:01 ` Alasdair G Kergon
2009-11-30 9:50 ` Alasdair G Kergon
1 sibling, 1 reply; 4+ messages in thread
From: Milan Broz @ 2009-11-29 20:34 UTC (permalink / raw)
To: lvm-devel
On 11/29/2009 08:26 PM, Petr Rockai wrote:
> a fairly straightforward patch adding a configure option that will
> abort() the process in case it encounters an internal
> error. Undocumented so far and not sure it's appropriate to expose --
> but maybe we have a policy of no undocumented options?
I like that idea, very useful for test suite.
ACK from me.
just some nitpicking changes like
+ if (level <= _LOG_ERR && !strncmp(format, "Internal error:",
+ strlen("Internal error:")))
(why strlen? just len or better #define the string)
- should it be in log section (global?)
- maybe only activate that when in debug (verbose mode)?
Milan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Optionally abort on internal errors.
2009-11-29 19:26 [PATCH] Optionally abort on internal errors Petr Rockai
2009-11-29 20:34 ` Milan Broz
@ 2009-11-30 9:50 ` Alasdair G Kergon
1 sibling, 0 replies; 4+ messages in thread
From: Alasdair G Kergon @ 2009-11-30 9:50 UTC (permalink / raw)
To: lvm-devel
On Sun, Nov 29, 2009 at 08:26:49PM +0100, Peter Rockai wrote:
> a fairly straightforward patch adding a configure option that will
> abort() the process in case it encounters an internal
> error. Undocumented so far and not sure it's appropriate to expose --
> but maybe we have a policy of no undocumented options?
It should be added to docs/example.conf at the end of the global section.
(The connection with 'log' is only an implementation detail -
conceptually it's a 'global' option.)
Ack.
Alasdair
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Optionally abort on internal errors.
2009-11-29 20:34 ` Milan Broz
@ 2009-11-30 10:01 ` Alasdair G Kergon
0 siblings, 0 replies; 4+ messages in thread
From: Alasdair G Kergon @ 2009-11-30 10:01 UTC (permalink / raw)
To: lvm-devel
On Sun, Nov 29, 2009 at 09:34:11PM +0100, Milan Broz wrote:
> + if (level <= _LOG_ERR && !strncmp(format, "Internal error:",
> + strlen("Internal error:")))
> (why strlen? just len or better #define the string)
#define LOG_INTERNAL_ERR "Internal error: "
These messages may occur at any log level.
In normal circumstances not all of them prevent the program proceeding,
but all should be fatal if this option is set.
> - maybe only activate that when in debug (verbose mode)?
Too confusing. Control via --config should be sufficient for now.
Alasdair
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-30 10:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-29 19:26 [PATCH] Optionally abort on internal errors Petr Rockai
2009-11-29 20:34 ` Milan Broz
2009-11-30 10:01 ` Alasdair G Kergon
2009-11-30 9:50 ` Alasdair G Kergon
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.