[lvm-devel] [PATCH 1/2] Update errno codes for vg_read() and lvm2app lvm_vg_open().

Petr Rockai prockai at redhat.com
Thu Nov 25 14:48:28 UTC 2010


Hi,

I am not checking this in yet, I would like to discuss the value choices
first a bit. Presumably, once we set them, we are sort of stuck with the
choices, so we should be careful.

Dave Wysochanski <wysochanski at pobox.com> writes:

> Update errno codes for vg_read error paths:
> - EINVAL: invalid vg_name
> - ENOLCK: lock_vol fails
EBUSY? (But really, this probably depends on *why* _lock_vol
failed... maybe we need to drill down here?)

> - ENODEV: VG 'vgname' does not exist
> - EPROTOTYPE: VG is clustered but locking not clustered
What about just EPROTO? Or ENOLCK?

> - EROFS: VG is read-only
If we want to re-use existing errnos, I would go with EACCESS or EPERM
here. EROFS *sounds* similar, but is IMHO a semantical misfit.

> - EUCLEAN: VG is inconsistent
This one is tricky. I would almost not assign an errno here at least for
now.

Yours,
   Petr.




More information about the lvm-devel mailing list