For write we do not need to hold memory locked.
This relaxes many conditions and avoid problems when allocating
a lot of memory for writting metadata buffers.
(In case of huge MDA size this would lead to mismatch between
locked and unlocked memory region size).
Add also internal check we are not writing in critical section.
Version 2.02.89 -
==================================
+ Unlock memory before writing metadata.
Add query before removing snapshots when inactive snapshot origin is removed.
Allow changing availability state of snapshots.
Skip non-virtual snapshots for availability change for lvchange with vg name.
return 0;
}
+ if (critical_section())
+ log_error(INTERNAL_ERROR
+ "Writing metadata in critical section.");
+
+ /* Unlock memory if possible */
+ memlock_unlock(vg->cmd);
vg->seqno++;
dm_list_iterate_items(pv_to_create, &vg->pvs_to_create) {