1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Zdenek Kabelac a900d150e4 thin: move pool messaging from resume to suspend
Existing messaging intarface for thin-pool has a few 'weak' points:

* Message were posted with each 'resume' operation, thus not allowing
activation of thin-pool with the existing state.

* Acceleration skipped suspend step has not worked in cluster,
since clvmd resumes only nodes which are suspended (have proper lock
state).

* Resume may fail and code is not really designed to 'fail' in this
phase (generic rule here is resume DOES NOT fail unless something serious
is wrong and lvm2 tool usually doesn't handle recovery path in this case.)

* Full thin-pool suspend happened, when taken a thin-volume snapshot.

With this patch the new method relocates message passing into suspend
state.

This has a few drawbacks with current API, but overal it performs
better and gives are more posibilities to deal with errors.

Patch introduces a new logic for 'origin-only' suspend of thin-pool and
this also relates to thin-volume when taking snapshot.

When suspend_origin_only operation is invoked on a pool with
queued messages then only those messages are posted to thin-pool and
actual suspend of thin pool and data and metadata volume is skipped.

This makes taking a snapshot of thin-volume lighter operation and
avoids blocking of other unrelated active thin volumes.

Also fail now happens in 'suspend' state where the 'Fail' is more expected
and it is better handled through error paths.

Activation of thin-pool is now not sending any message and leaves upto a tool
to decided later how to finish unfinished double-commit transaction.

Problem which needs some API improvements relates to the lvm2 tree
construction. For the suspend tree we do not add target table line
into the tree, but only a device is inserted into a tree.
Current mechanism to attach messages for thin-pool requires the libdm
to know about thin-pool target, so lvm2 currently takes assumption, node
is really a thin-pool and fills in the table line for this node (which
should be ensured by the PRELOAD phase, but it's a misuse of internal API)
we would possibly need to be able to attach message to 'any' node.

Other thing to notice - current messaging interface in thin-pool
target requires to suspend thin volume origin first and then send
a create message, but this could not have any 'nice' solution on lvm2
side and IMHO we should introduce something like 'create_after_resume'
message.

Patch also changes the moment, where lvm2 transaction id is increased.
Now it happens only after successful finish of kernel transaction id
change. This change was needed to handle properly activation of pool,
which is in the middle of unfinished transaction, and also this corrects
usage of thin-pool by external apps like Docker.
2015-07-03 16:13:14 +02:00
..
activate thin: move pool messaging from resume to suspend 2015-07-03 16:13:14 +02:00
cache Add lvmlockd 2015-07-02 15:42:26 -05:00
cache_segtype debug: extra validation of passed segment 2015-05-08 15:15:11 +02:00
commands Add lvmlockd 2015-07-02 15:42:26 -05:00
config Add lvmlockd 2015-07-02 15:42:26 -05:00
datastruct datastruct: Add str_list_add_list. 2015-03-26 18:30:37 +00:00
device cleanup: cast minor to dev_t 2015-05-08 15:15:10 +02:00
display Add lvmlockd 2015-07-02 15:42:26 -05:00
error segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
filters config: use timestamp with nanosecond precision 2015-03-18 13:42:56 +01:00
format1 format1: check for lvm1_system_id 2015-05-08 15:15:10 +02:00
format_pool cache: Store metadata size and checksum. 2015-03-18 23:43:02 +00:00
format_text Add lvmlockd 2015-07-02 15:42:26 -05:00
freeseg segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
label cache: Store metadata size and checksum. 2015-03-18 23:43:02 +00:00
locking lockd: fix stub functions for LV locking 2015-07-02 16:36:04 -05:00
log log: flush stdout before print to stderr 2015-06-19 16:33:20 +02:00
lvmpolld lvmpolld-client.c: debug print when querying progress 2015-05-21 11:20:21 +02:00
metadata thin: move pool messaging from resume to suspend 2015-07-03 16:13:14 +02:00
mirror cmirror: Adjust region size to work around CPG msg limit to avoid hang. 2015-02-25 14:42:15 -06:00
misc Add lvmlockd 2015-07-02 15:42:26 -05:00
mm xlate: add new variants 2015-06-16 09:30:14 -05:00
properties report: add support for time (basic) 2015-06-30 15:15:10 +02:00
raid segtype: add SEG_ONLY_EXCLUSIVE flag 2014-11-10 22:05:48 +01:00
replicator cleanup: drop default implementation 2014-10-24 16:39:31 +02:00
report report: select: add handler to recognize fuzzy time specification 2015-07-03 10:51:31 +02:00
snapshot segtype: add SEG_ONLY_EXCLUSIVE flag 2014-11-10 22:05:48 +01:00
striped segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
thin thin: move pool messaging from resume to suspend 2015-07-03 16:13:14 +02:00
unknown segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
uuid cleanup: drop unused define 2014-03-12 19:12:34 +01:00
zero cleanup: remove unused headers 2014-11-13 17:49:42 +01:00
Makefile.in Add lvmlockd 2015-07-02 15:42:26 -05:00