* LVM2 ./WHATS_NEW libdm/libdm-deptree.c
@ 2011-06-30 9:24 zkabelac
0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2011-06-30 9:24 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-06-30 09:24:59
Modified files:
. : WHATS_NEW
libdm : libdm-deptree.c
Log message:
Report internal error when parameters are missing on table load
When some target is passing empty parameters to some dm target,
report this as an internal error to better catch some broken
table construction (some mirror conversions seem to be doing
this for now).
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2032&r2=1.2033
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.100&r2=1.101
--- LVM2/WHATS_NEW 2011/06/30 09:15:53 1.2032
+++ LVM2/WHATS_NEW 2011/06/30 09:24:58 1.2033
@@ -1,5 +1,6 @@
Version 2.02.86 -
=================================
+ Report internal error when parameters are missing on table load.
Teardown any stray devices with $COMMON_PREFIX during test runs.
Reinstate correct permissions when creating mirrors. [2.02.85]
Append 'm' attribute to pv_attr for missing PVs.
--- LVM2/libdm/libdm-deptree.c 2011/06/27 22:38:53 1.100
+++ LVM2/libdm/libdm-deptree.c 2011/06/30 09:24:58 1.101
@@ -1754,6 +1754,10 @@
stack;
return r;
}
+ if (!params[0])
+ log_error(INTERNAL_ERROR "Empty parameters for "
+ "%s %u:%u.", dm_segtypes[seg->type].target,
+ major, minor);
break;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* LVM2 ./WHATS_NEW libdm/libdm-deptree.c
@ 2012-03-04 17:36 zkabelac
0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2012-03-04 17:36 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-03-04 17:36:24
Modified files:
. : WHATS_NEW
libdm : libdm-deptree.c
Log message:
Return success for deactivation of thin pool
if the thin_check fail on thin pool - still return successful deactivation,
since lvremove would currently fail.
TODO: find some way to not run check with lvremove.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2339&r2=1.2340
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.162&r2=1.163
--- LVM2/WHATS_NEW 2012/03/03 18:32:53 1.2339
+++ LVM2/WHATS_NEW 2012/03/04 17:36:23 1.2340
@@ -1,5 +1,6 @@
Version 2.02.95 -
================================
+ Deactivation of failed thin check on thin pool returns success.
Scan all devices for lvmetad if 'pvscan --cache' used without device list.
Populate lvmcache from lvmetad before displaying PVs in pvscan. (2.02.94)
Suppress incorrect -n pvscan warning now always displayed. (2.02.94)
--- LVM2/libdm/libdm-deptree.c 2012/03/04 16:05:42 1.162
+++ LVM2/libdm/libdm-deptree.c 2012/03/04 17:36:24 1.163
@@ -1591,7 +1591,10 @@
if (child->callback &&
!child->callback(child, DM_NODE_CALLBACK_DEACTIVATED,
child->callback_data))
- r = 0; // FIXME: _node_clear_table() without callback ?
+ stack;
+ // FIXME: We need to let lvremove pass,
+ // so for now deactivation ignores check result
+ //r = 0; // FIXME: _node_clear_table() without callback ?
if (dm_tree_node_num_children(child, 0) &&
!_dm_tree_deactivate_children(child, uuid_prefix, uuid_prefix_len, level + 1))
^ permalink raw reply [flat|nested] 6+ messages in thread
* LVM2 ./WHATS_NEW libdm/libdm-deptree.c
@ 2010-11-23 18:29 zkabelac
0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2010-11-23 18:29 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-11-23 18:29:06
Modified files:
. : WHATS_NEW
libdm : libdm-deptree.c
Log message:
Do not call dm_task_destroy with NULL
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1803&r2=1.1804
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.86&r2=1.87
--- LVM2/WHATS_NEW 2010/11/23 15:28:55 1.1803
+++ LVM2/WHATS_NEW 2010/11/23 18:29:06 1.1804
@@ -1,5 +1,6 @@
Version 2.02.78 -
====================================
+ Fix dm_task_destroy(NULL) call in _node_clear_table() error path.
Fix resource leak in _rm_blks().
Suppress 'No PV label' message when removing several PVs without mdas.
Fix default /etc/lvm permissions to be 0755. (2.02.66)
--- LVM2/libdm/libdm-deptree.c 2010/09/30 21:06:52 1.86
+++ LVM2/libdm/libdm-deptree.c 2010/11/23 18:29:06 1.87
@@ -580,7 +580,6 @@
name, info->major, info->minor);
if (!(dmt = dm_task_create(DM_DEVICE_CLEAR))) {
- dm_task_destroy(dmt);
log_error("Table clear dm_task creation failed for %s", name);
return 0;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* LVM2 ./WHATS_NEW libdm/libdm-deptree.c
2010-06-21 8:54 prajnoha
@ 2010-06-21 9:32 ` Zdenek Kabelac
0 siblings, 0 replies; 6+ messages in thread
From: Zdenek Kabelac @ 2010-06-21 9:32 UTC (permalink / raw)
To: lvm-devel
Dne 21.6.2010 10:54, prajnoha at sourceware.org napsal(a):
> CVSROOT: /cvs/lvm2
> Module name: LVM2
> Changes by: prajnoha at sourceware.org 2010-06-21 08:54:32
>
> Modified files:
> . : WHATS_NEW
> libdm : libdm-deptree.c
>
> Log message:
> Use early udev synchronisation and update of dev nodes for clustered mirrors.
>
I'd some discussion with Petr about related problems it looks like we have few
things here.
1. I believe that cmirrord should be instructed by mirror kernel driver
probably after receiving dm message from our activation code - not just
automagicaly directly after resume code - as in this moment nodes are not yet
ready in filesystem - and because of this 'race' we need to add this hack
flag. However this is most probably 'API' redesign issue...
I think this strategy will be used in replicator - once we will start to used
daemons like cmirrord for replicator - but we are not there yet...
2. Petr noticed there is not really well documented 'nowatch' rule inside
udev, that probably should allow us to set all 'non-toplevel' created nodes
as 'non-watched' nodes - thus avoiding potential problem when we get nodes
unexpectedly opened by some 'udev' rules. It should be probably possible to
use this flag even in the case we create temporary toplevel devices for
'clearing' _mlog while constructing i.e. mirror devices (or replicator logs) -
so we should get 'immune' from 'random' tools opening our rather 'private'
temporary device and blocking our deactivation code from work as devices get
non-zero open count from some watch rule.
Zdenek
^ permalink raw reply [flat|nested] 6+ messages in thread
* LVM2 ./WHATS_NEW libdm/libdm-deptree.c
@ 2010-06-21 8:54 prajnoha
2010-06-21 9:32 ` Zdenek Kabelac
0 siblings, 1 reply; 6+ messages in thread
From: prajnoha @ 2010-06-21 8:54 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha at sourceware.org 2010-06-21 08:54:32
Modified files:
. : WHATS_NEW
libdm : libdm-deptree.c
Log message:
Use early udev synchronisation and update of dev nodes for clustered mirrors.
When using clustered mirrors, we need device nodes to be created during
processing of device tree, not at its end like we normally do (we need to
access the nodes in cmirror prematurely). Therefore we use a new flag called
"immediate_dev_node" stored in deptree's load_properties struct to instruct the
device tree processing code to immediately synchronize with udev and flush all
stacked node operations so the nodes are prepared for use.
For now, the immediate_dev_node is used for clustered mirrors during
processing the dm_tree_preload_children code only. We can add more later if
needed.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1619&r2=1.1620
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.82&r2=1.83
--- LVM2/WHATS_NEW 2010/06/18 20:58:04 1.1619
+++ LVM2/WHATS_NEW 2010/06/21 08:54:32 1.1620
@@ -1,5 +1,6 @@
Version 2.02.68 -
===============================
+ Use early udev synchronisation and update of dev nodes for clustered mirrors.
Unneeded kdev_t.h reference causing harm for cmirrord on some archs.
Add man pages for lvmconf and unsupported lvmsadc and lvmsar tools.
Fix exit code when requesting help using documented -o help option.
--- LVM2/libdm/libdm-deptree.c 2010/05/25 08:40:36 1.82
+++ LVM2/libdm/libdm-deptree.c 2010/06/21 08:54:32 1.83
@@ -143,6 +143,13 @@
struct dm_list segs;
const char *new_name;
+
+ /* If immediate_dev_node is set to 1, try to create the dev node
+ * as soon as possible (e.g. in preload stage even during traversal
+ * and processing of dm tree). This will also flush all stacked dev
+ * node operations, synchronizing with udev.
+ */
+ int immediate_dev_node;
};
/* Two of these used to join two nodes with uses and used_by. */
@@ -1843,6 +1850,7 @@
void *handle = NULL;
struct dm_tree_node *child;
struct dm_info newinfo;
+ int update_devs_flag = 0;
/* Preload children first */
while ((child = dm_tree_next_child(&handle, dnode, 0))) {
@@ -1897,10 +1905,26 @@
/* Update cached info */
child->info = newinfo;
+
+ /*
+ * Prepare for immediate synchronization with udev and flush all stacked
+ * dev node operations if requested by immediate_dev_node property. But
+ * finish processing current level in the tree first.
+ */
+ if (child->props.immediate_dev_node)
+ update_devs_flag = 1;
+
}
handle = NULL;
+ if (update_devs_flag) {
+ if (!dm_udev_wait(dm_tree_get_cookie(dnode)))
+ stack;
+ dm_tree_set_cookie(dnode, 0);
+ dm_task_update_nodes();
+ }
+
return r;
}
@@ -2157,6 +2181,9 @@
return 0;
}
+ if (clustered)
+ log_node->props.immediate_dev_node = 1;
+
if (!_link_tree_nodes(node, log_node))
return_0;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* LVM2 ./WHATS_NEW libdm/libdm-deptree.c
@ 2010-05-21 12:30 zkabelac
0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2010-05-21 12:30 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-05-21 12:30:35
Modified files:
. : WHATS_NEW
libdm : libdm-deptree.c
Log message:
Replicator: check open_count for parents of presuspend_node
For deactivation of Replicator check in advance that all heads
have open_count == 0. For this presuspend_node is used as all
head nodes are linking this control node.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1578&r2=1.1579
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.77&r2=1.78
--- LVM2/WHATS_NEW 2010/05/21 12:27:02 1.1578
+++ LVM2/WHATS_NEW 2010/05/21 12:30:35 1.1579
@@ -1,5 +1,6 @@
Version 2.02.67 -
===============================
+ Checking open_count in all parents of presuspend_node.
Added dm_tree_node_set_presuspend_node() to presuspend child in deactivate.
Initial libdm support for Replicator target (API is not stable yet).
Extend process_each_lv_in_vg() with support for list of failed lvnames.
--- LVM2/libdm/libdm-deptree.c 2010/05/21 12:27:03 1.77
+++ LVM2/libdm/libdm-deptree.c 2010/05/21 12:30:35 1.78
@@ -902,6 +902,44 @@
return r;
}
+/* Check if all parent nodes of given node have open_count == 0 */
+static int _node_has_closed_parents(struct dm_tree_node *node,
+ const char *uuid_prefix,
+ size_t uuid_prefix_len)
+{
+ struct dm_tree_link *dlink;
+ const struct dm_info *dinfo;
+ struct dm_info info;
+ const char *uuid;
+
+ /* Iterate through parents of this node */
+ dm_list_iterate_items(dlink, &node->used_by) {
+ if (!(uuid = dm_tree_node_get_uuid(dlink->node))) {
+ stack;
+ continue;
+ }
+
+ /* Ignore if it doesn't belong to this VG */
+ if (!_uuid_prefix_matches(uuid, uuid_prefix, uuid_prefix_len))
+ continue;
+
+ if (!(dinfo = dm_tree_node_get_info(dlink->node))) {
+ stack; /* FIXME Is this normal? */
+ return 0;
+ }
+
+ /* Refresh open_count */
+ if (!_info_by_dev(dinfo->major, dinfo->minor, 1, &info) ||
+ !info.exists)
+ continue;
+
+ if (info.open_count)
+ return 0;
+ }
+
+ return 1;
+}
+
static int _deactivate_node(const char *name, uint32_t major, uint32_t minor,
uint32_t *cookie, uint16_t udev_flags)
{
@@ -1100,7 +1138,11 @@
!info.exists)
continue;
- if (info.open_count) {
+ /* Also checking open_count in parent nodes of presuspend_node */
+ if (info.open_count ||
+ (child->presuspend_node &&
+ !_node_has_closed_parents(child->presuspend_node,
+ uuid_prefix, uuid_prefix_len))) {
/* Only report error from (likely non-internal) dependency at top level */
if (!level) {
log_error("Unable to deactivate open %s (%" PRIu32
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-04 17:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30 9:24 LVM2 ./WHATS_NEW libdm/libdm-deptree.c zkabelac
-- strict thread matches above, loose matches on Subject: below --
2012-03-04 17:36 zkabelac
2010-11-23 18:29 zkabelac
2010-06-21 8:54 prajnoha
2010-06-21 9:32 ` Zdenek Kabelac
2010-05-21 12:30 zkabelac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.