clogd/dm-log-clustered.ko: Fix for bugs 506843, 479749, 507400
Device-mapper userspace logs (like the clustered log) are
identified by a universally unique identifier (UUID). This
identifier is used to associate requests from the kernel to
a specific log in userspace. The UUID must be unique everywhere,
since multiple machines may use this identifier when sharing a
log, as is the case for cluster logs.
Sometimes, device-mapper/LVM may re-use a UUID. This is the
case during 'pvmove's, when moving from one segment of an LV
to another, or when resizing a mirror, etc. In these cases,
a new log is created with the same UUID and loaded in the
"inactive" slot. When a device-mapper "resume" is issued,
the "live" talbe is deactivated and the new "inactive" table
becomes "live". (The "inactive" table can also be removed
via a device-mapper 'clear' command.)
The above two issues where colliding in the 3 bugs (possibly
more) mentioned in the title. More than one log was being
created with the same UUID, and there was no way to distinguish
between them. So, sometimes the wrong log would be swapped
out during the exchange.
The solution is to create a 'uuid_instance', or perhaps a
'luid'. A local unique identifier to go along with the
UUID. This new identifier is used to determine exactly which
log is being referenced by the kernel when the log exchange
is made. The identifier is not universally safe, but it does
not need to be, since create/destroy/suspend/resume operations
are bound to a specific machine; and these are the operations
that make up the exchange.