[lvm-devel] LVM2/libdm/ioctl libdm-iface.c

Alasdair G Kergon agk at redhat.com
Sun Mar 20 21:41:49 UTC 2011


On Sun, Mar 20, 2011 at 02:09:13PM +0100, Zdenek Kabelac wrote:
> My patch was only fixing error reporting logic.
 
One output case:
  Failed to get device-mapper version
  Support for older device-mapped version is disabled.

A quite misleading pair of messages, I think.

Another output case, when only one version is compiled into the binary:
  ...
  Support for older device-mapped version is disabled.

Support was not compiled in so we shouldn't mention anything about it to the
user.

> Did I get this rule wrong - are there some exceptions?

  We must always have at least one log_error on the error path, but as
few as possible.
  We try to place it as low down in the code as we can consistent with
minimising the number of log_errors: it is normally, but not always, at the
lowest level.  
  'stack' is used in other places on error paths.
 
Alasdair




More information about the lvm-devel mailing list