[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] lvm2app and handle modifications during error conditions



While working on a VG reduce bug in lvm2app it became very apparent that
in general when a user of a library runs into an error condition that
they should discard whatever VG/PV/LV handle they passed in to the call
and fetch a new one.  This is because the code base modifies the
structures during processing and if we fail we don't restore them.
Sometimes the structures are modified before we are even done checking
preconditions.  This isn't a problem when running as a command line as
when we exit all in flight changes are lost.

Does anyone have a simple solution to address this or is the best we can
do is educate library users with some updated documentation?

Thanks,
Tony


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]