public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2010-05-21 14:34 zkabelac
0 siblings, 0 replies; 15+ messages in thread
From: zkabelac @ 2010-05-21 14:34 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2010-05-21 14:34:02
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Replicator: activate checks for missing vgs
Activation needs to have all remote VGs locked to pass for replicator.
So if activated LV is replicator-dev LV - read all remote VGs.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1588&r2=1.1589
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.168&r2=1.169
--- LVM2/WHATS_NEW 2010/05/21 14:29:49 1.1588
+++ LVM2/WHATS_NEW 2010/05/21 14:34:01 1.1589
@@ -1,6 +1,7 @@
Version 2.02.67 -
===============================
- Check for missing VGs before taking lock_lv_vol (for Replicator).
+ Activation code read and releases also remote VGs (Replicator).
+ Check for missing VGs before taking lock_vol (Replicator).
Update process_each_lv_in_vg() to use cmd_vg structure.
Update _process_one_vg() to work with cmd_vg structure.
Add functions for read and release VGs list.
--- LVM2/lib/activate/activate.c 2010/03/26 22:15:43 1.168
+++ LVM2/lib/activate/activate.c 2010/05/21 14:34:02 1.169
@@ -865,6 +865,9 @@
goto out;
}
+ if (!lv_read_replicator_vgs(lv))
+ goto_out;
+
lv_calculate_readahead(lv, NULL);
/* If VG was precommitted, preload devices for the LV */
@@ -894,8 +897,10 @@
out:
if (lv_pre)
vg_release(lv_pre->vg);
- if (lv)
+ if (lv) {
+ lv_release_replicator_vgs(lv);
vg_release(lv->vg);
+ }
return r;
}
@@ -1025,6 +1030,9 @@
goto_out;
}
+ if (!lv_read_replicator_vgs(lv))
+ goto_out;
+
lv_calculate_readahead(lv, NULL);
if (!monitor_dev_for_events(cmd, lv, 0))
@@ -1038,8 +1046,10 @@
if (!lv_info(cmd, lv, &info, 1, 0) || info.exists)
r = 0;
out:
- if (lv)
+ if (lv) {
+ lv_release_replicator_vgs(lv);
vg_release(lv->vg);
+ }
return r;
}
@@ -1118,6 +1128,9 @@
goto out;
}
+ if (!lv_read_replicator_vgs(lv))
+ goto_out;
+
lv_calculate_readahead(lv, NULL);
if (exclusive)
@@ -1133,8 +1146,10 @@
stack;
out:
- if (lv)
+ if (lv) {
+ lv_release_replicator_vgs(lv);
vg_release(lv->vg);
+ }
return r;
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2012-01-25 22:16 zkabelac
0 siblings, 0 replies; 15+ messages in thread
From: zkabelac @ 2012-01-25 22:16 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-01-25 22:16:05
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Fix missing dmt destructor
Also always initialize maj,min,patchlevel when success is returned.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2242&r2=1.2243
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.240&r2=1.241
--- LVM2/WHATS_NEW 2012/01/25 21:52:53 1.2242
+++ LVM2/WHATS_NEW 2012/01/25 22:16:04 1.2243
@@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
+ Fix memleak in target_version() error path (unsupported LIST_VERSIONS).
Limit alignment to 32bit values.
Check for correctness of uint64 dev_size value.
Rename origin_only parameter to more generic flag use_layer for lv_info().
--- LVM2/lib/activate/activate.c 2012/01/25 13:12:59 1.240
+++ LVM2/lib/activate/activate.c 2012/01/25 22:16:04 1.241
@@ -481,7 +481,11 @@
if (!dm_task_run(dmt)) {
log_debug("Failed to get %s target version", target_name);
/* Assume this was because LIST_VERSIONS isn't supported */
- return 1;
+ *maj = 0;
+ *min = 0;
+ *patchlevel = 0;
+ r = 1;
+ goto out;
}
target = dm_task_get_versions(dmt);
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2011-02-18 14:26 zkabelac
0 siblings, 0 replies; 15+ messages in thread
From: zkabelac @ 2011-02-18 14:26 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2011-02-18 14:26:31
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Remove fs_unlock after failed suspend
Explicit fs_unlock() after failed suspend is not need -
as it will happen automatically with nearest lv_info()
or vg_unlock().
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1916&r2=1.1917
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.193&r2=1.194
--- LVM2/WHATS_NEW 2011/02/18 14:16:11 1.1916
+++ LVM2/WHATS_NEW 2011/02/18 14:26:31 1.1917
@@ -1,5 +1,6 @@
Version 2.02.85 -
===================================
+ Remove fs_unlock() from lv_suspend error path.
Change memory locking semantic and use critical sections.
Add configurable pv_min_size to select block devices by its size.
Add function to read 64bit ints from config find_config_tree_int64.
--- LVM2/lib/activate/activate.c 2011/02/18 14:16:11 1.193
+++ LVM2/lib/activate/activate.c 2011/02/18 14:26:31 1.194
@@ -1126,7 +1126,6 @@
if (!_lv_suspend_lv(lv, origin_only, lockfs, flush_required)) {
critical_section_dec(cmd);
- fs_unlock();
goto out;
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2010-08-16 23:29 agk
0 siblings, 0 replies; 15+ messages in thread
From: agk @ 2010-08-16 23:29 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2010-08-16 23:29:10
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Don't really change monitoring status when in test mode.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1704&r2=1.1705
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.174&r2=1.175
--- LVM2/WHATS_NEW 2010/08/16 22:54:35 1.1704
+++ LVM2/WHATS_NEW 2010/08/16 23:29:09 1.1705
@@ -1,5 +1,6 @@
Version 2.02.73 -
================================
+ Don't really change monitoring status when in test mode.
Fix some exit statuses when starting/stopping monitoring fails.
Enable snapshot monitoring by default when dmeventd is enabled.
Move cloned libdevmapper-event client code from segments into lib/activate.
--- LVM2/lib/activate/activate.c 2010/08/16 22:54:36 1.174
+++ LVM2/lib/activate/activate.c 2010/08/16 23:29:10 1.175
@@ -940,7 +940,12 @@
if (!monitor_fn)
continue;
- log_verbose("%sonitoring %s/%s", monitor ? "M" : "Not m", lv->vg->name, lv->name);
+ log_verbose("%sonitoring %s/%s%s", monitor ? "M" : "Not m", lv->vg->name, lv->name,
+ test_mode() ? " [Test mode: skipping this]" : "");
+
+ /* FIXME Test mode should really continue a bit further. */
+ if (test_mode())
+ continue;
/* FIXME specify events */
if (!monitor_fn(seg, 0)) {
@@ -964,7 +969,8 @@
sleep(1);
}
- r = (monitored && monitor) || (!monitored && !monitor);
+ if (r)
+ r = (monitored && monitor) || (!monitored && !monitor);
}
return r;
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2010-07-12 11:37 prajnoha
0 siblings, 0 replies; 15+ messages in thread
From: prajnoha @ 2010-07-12 11:37 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha@sourceware.org 2010-07-12 11:37:50
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Add more verbose messages while checking volume_list and hosttags settings.
This should bring less confusion when there are some settings left and
people just forgot about it and then they run into problems. These messages
should give them a hint of what's really going on.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1663&r2=1.1664
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.171&r2=1.172
--- LVM2/WHATS_NEW 2010/07/09 17:01:11 1.1663
+++ LVM2/WHATS_NEW 2010/07/12 11:37:49 1.1664
@@ -1,5 +1,6 @@
Version 2.02.71 -
===============================
+ Add more verbose messages while checking volume_list and hosttags settings.
Add log_error when strdup fails in {vg|lv}_change_tag().
Remove unnecessary includes in liblvm files.
Use __attribute__ consistently throughout.
--- LVM2/lib/activate/activate.c 2010/07/08 12:24:04 1.171
+++ LVM2/lib/activate/activate.c 2010/07/12 11:37:50 1.172
@@ -262,6 +262,9 @@
char path[PATH_MAX];
if (!(cn = find_config_tree_node(cmd, "activation/volume_list"))) {
+ log_verbose("activation/volume_list configuration setting "
+ "not defined, checking host tags only");
+
/* If no host tags defined, activate */
if (dm_list_empty(&cmd->tags))
return 1;
@@ -271,11 +274,18 @@
str_list_match_list(&cmd->tags, &lv->vg->tags))
return 1;
+ log_verbose("No host tag matches %s/%s",
+ lv->vg->name, lv->name);
+
/* Don't activate */
return 0;
}
for (cv = cn->v; cv; cv = cv->next) {
+ log_verbose("activation/volume_list configuration setting "
+ "defined, checking the list to match %s/%s",
+ lv->vg->name, lv->name);
+
if (cv->type != CFG_STRING) {
log_error("Ignoring invalid string in config file "
"activation/volume_list");
@@ -330,6 +340,9 @@
return 1;
}
+ log_verbose("No item supplied in activation/volume_list configuration "
+ "setting matches %s/%s", lv->vg->name, lv->name);
+
return 0;
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2010-01-27 13:24 mbroz
0 siblings, 0 replies; 15+ messages in thread
From: mbroz @ 2010-01-27 13:24 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2010-01-27 13:23:57
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Always query device by using uuid only and not name in clvmd.
Otherwise confusion with the device of the same name
(but different UUID, e.g. non-lvm device) can happen.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1410&r2=1.1411
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.163&r2=1.164
--- LVM2/WHATS_NEW 2010/01/26 08:01:18 1.1410
+++ LVM2/WHATS_NEW 2010/01/27 13:23:57 1.1411
@@ -1,5 +1,6 @@
Version 2.02.60 - 23rd January 2010
===================================
+ Always query device by using uuid only and not name in clvmd.
Add missing metadata reverts in pvmove error path.
Unlock shared lock in clvmd if activation calls failed.
Fix return code of info call for query by uuid.
--- LVM2/lib/activate/activate.c 2010/01/13 01:55:43 1.163
+++ LVM2/lib/activate/activate.c 2010/01/27 13:23:57 1.164
@@ -492,7 +492,7 @@
if (!(lv = lv_from_lvid(cmd, lvid_s, 0)))
return 0;
- r = _lv_info(cmd, lv, 0, info, with_open_count, with_read_ahead, 0);
+ r = _lv_info(cmd, lv, 0, info, with_open_count, with_read_ahead, 1);
vg_release(lv->vg);
return r;
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2009-12-03 19:23 mbroz
0 siblings, 0 replies; 15+ messages in thread
From: mbroz @ 2009-12-03 19:23 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2009-12-03 19:23:40
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Fix memory lock imbalance in lv_suspend if already suspended.
pvmove suspends all moved LVs + pvmoveX mirrored LV itself.
This suspends even underlying pvmoveX and following explicit
suspend call is just noop.
But in resume the pvmoveX volume is no longer underlying
device for moved LVs, so it performs full resume with memlock
decrease.
Code must call memlock_inc() if suspend is requested, volume
is already suspended and error is not requested.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1340&r2=1.1341
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.159&r2=1.160
--- LVM2/WHATS_NEW 2009/12/03 19:22:24 1.1340
+++ LVM2/WHATS_NEW 2009/12/03 19:23:40 1.1341
@@ -1,5 +1,6 @@
Version 2.02.57 -
====================================
+ Fix memory lock imbalance in lv_suspend if already suspended.
Fix pvmove test mode to not fail and do not poll.
Fix error message if VG already exist in vgcreate.
Fix tools to use log_error when stopped by user.
--- LVM2/lib/activate/activate.c 2009/12/01 19:10:23 1.159
+++ LVM2/lib/activate/activate.c 2009/12/03 19:23:40 1.160
@@ -879,7 +879,11 @@
goto_out;
if (!info.exists || info.suspended) {
- r = error_if_not_suspended ? 0 : 1;
+ if (!error_if_not_suspended) {
+ r = 1;
+ if (info.suspended)
+ memlock_inc();
+ }
goto out;
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2009-12-01 19:10 mbroz
0 siblings, 0 replies; 15+ messages in thread
From: mbroz @ 2009-12-01 19:10 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2009-12-01 19:10:23
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Fix memory leak in lv_info_by_lvid
The lv_from_lvid calls internally vg_read(),
we must release vg structure afterwards.
Code is called only from clvmd.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1335&r2=1.1336
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.158&r2=1.159
--- LVM2/WHATS_NEW 2009/11/27 14:35:38 1.1335
+++ LVM2/WHATS_NEW 2009/12/01 19:10:23 1.1336
@@ -1,5 +1,6 @@
Version 2.02.57 -
====================================
+ Fix clvmd memory leak in lv_info_by_lvid.
Do not allow creating mirrors of more than 8 images.
Use locking_type 3 (compiled in cluster locking) in lvmconf.
Remove duplicate dm_list macros and functions.
--- LVM2/lib/activate/activate.c 2009/10/30 13:07:49 1.158
+++ LVM2/lib/activate/activate.c 2009/12/01 19:10:23 1.159
@@ -486,12 +486,16 @@
int lv_info_by_lvid(struct cmd_context *cmd, const char *lvid_s,
struct lvinfo *info, int with_open_count, int with_read_ahead)
{
+ int r;
struct logical_volume *lv;
if (!(lv = lv_from_lvid(cmd, lvid_s, 0)))
return 0;
- return _lv_info(cmd, lv, 0, info, with_open_count, with_read_ahead, 0);
+ r = _lv_info(cmd, lv, 0, info, with_open_count, with_read_ahead, 0);
+ vg_release(lv->vg);
+
+ return r;
}
/*
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2009-10-30 13:07 agk
0 siblings, 0 replies; 15+ messages in thread
From: agk @ 2009-10-30 13:07 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2009-10-30 13:07:49
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Insert some missing stack macros into activation code.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1308&r2=1.1309
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.157&r2=1.158
--- LVM2/WHATS_NEW 2009/10/27 17:00:44 1.1308
+++ LVM2/WHATS_NEW 2009/10/30 13:07:49 1.1309
@@ -1,5 +1,6 @@
Version 2.02.55 -
===================================
+ Insert some missing stack macros into activation code.
Recognise DRBD device part and handle it similar to MD devices.
Version 2.02.54 - 26th October 2009
--- LVM2/lib/activate/activate.c 2009/10/16 17:41:50 1.157
+++ LVM2/lib/activate/activate.c 2009/10/30 13:07:49 1.158
@@ -936,7 +936,7 @@
return 1;
if (!(lv = lv_from_lvid(cmd, lvid_s, 0)))
- goto out;
+ goto_out;
if (test_mode()) {
_skip("Resuming '%s'.", lv->name);
@@ -949,11 +949,11 @@
if (!info.exists || !info.suspended) {
r = error_if_not_active ? 0 : 1;
- goto out;
+ goto_out;
}
if (!_lv_activate_lv(lv))
- goto out;
+ goto_out;
memlock_dec();
fs_unlock();
@@ -1138,7 +1138,8 @@
lv->status |= ACTIVATE_EXCL;
memlock_inc();
- r = _lv_activate_lv(lv);
+ if (!(r = _lv_activate_lv(lv)))
+ stack;
memlock_dec();
fs_unlock();
@@ -1155,13 +1156,19 @@
/* Activate LV */
int lv_activate(struct cmd_context *cmd, const char *lvid_s, int exclusive)
{
- return _lv_activate(cmd, lvid_s, exclusive, 0);
+ if (!_lv_activate(cmd, lvid_s, exclusive, 0))
+ return_0;
+
+ return 1;
}
/* Activate LV only if it passes filter */
int lv_activate_with_filter(struct cmd_context *cmd, const char *lvid_s, int exclusive)
{
- return _lv_activate(cmd, lvid_s, exclusive, 1);
+ if (!_lv_activate(cmd, lvid_s, exclusive, 1))
+ return_0;
+
+ return 1;
}
int lv_mknodes(struct cmd_context *cmd, const struct logical_volume *lv)
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2009-09-29 18:50 agk
0 siblings, 0 replies; 15+ messages in thread
From: agk @ 2009-09-29 18:50 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2009-09-29 18:50:29
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Don't attempt to deactivate an LV if any of its snapshots are in use.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1278&r2=1.1279
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.154&r2=1.155
--- LVM2/WHATS_NEW 2009/09/29 15:17:54 1.1278
+++ LVM2/WHATS_NEW 2009/09/29 18:50:28 1.1279
@@ -1,5 +1,6 @@
Version 2.02.54 -
=====================================
+ Don't attempt to deactivate an LV if any of its snapshots are in use.
Return fail if lv_deactivate fails to remove device from kernel.
Provide alternative implementation of obsolete siginterrupt().
Consolidate LV allocation into alloc_lv().
--- LVM2/lib/activate/activate.c 2009/09/29 15:17:54 1.154
+++ LVM2/lib/activate/activate.c 2009/09/29 18:50:28 1.155
@@ -975,6 +975,29 @@
return _lv_resume(cmd, lvid_s, 1);
}
+static int _lv_has_open_snapshots(struct logical_volume *lv)
+{
+ struct lv_segment *snap_seg;
+ struct lvinfo info;
+ int r = 0;
+
+ dm_list_iterate_items_gen(snap_seg, &lv->snapshot_segs, origin_list) {
+ if (!lv_info(lv->vg->cmd, snap_seg->cow, &info, 1, 0)) {
+ r = 1;
+ continue;
+ }
+
+ if (info.exists && info.open_count) {
+ log_error("LV %s/%s has open snapshot %s: "
+ "not deactivating", lv->vg->name, lv->name,
+ snap_seg->cow->name);
+ r = 1;
+ }
+ }
+
+ return r;
+}
+
int lv_deactivate(struct cmd_context *cmd, const char *lvid_s)
{
struct logical_volume *lv;
@@ -1001,10 +1024,14 @@
goto out;
}
- if (info.open_count && lv_is_visible(lv)) {
- log_error("LV %s/%s in use: not deactivating", lv->vg->name,
- lv->name);
- goto out;
+ if (lv_is_visible(lv)) {
+ if (info.open_count) {
+ log_error("LV %s/%s in use: not deactivating",
+ lv->vg->name, lv->name);
+ goto out;
+ }
+ if (lv_is_origin(lv) && _lv_has_open_snapshots(lv))
+ goto_out;
}
lv_calculate_readahead(lv, NULL);
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2009-09-29 15:17 mbroz
0 siblings, 0 replies; 15+ messages in thread
From: mbroz @ 2009-09-29 15:17 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2009-09-29 15:17:54
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Return fail if lv_deactivate did not removed device from kernel.
lv_deactivate now returns always success, because tree deactivation
functions (see dm_tree_deactivate_children) always returns success.
Because code should return failure in lv_deactivate at least,
fix it by checking for device existence after real deactivation call.
(After discussion this was prefered solution to dm tree function rewrite
which affects snapshots and mirrors.)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1277&r2=1.1278
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.153&r2=1.154
--- LVM2/WHATS_NEW 2009/09/28 21:23:02 1.1277
+++ LVM2/WHATS_NEW 2009/09/29 15:17:54 1.1278
@@ -1,5 +1,6 @@
Version 2.02.54 -
=====================================
+ Return fail if lv_deactivate fails to remove device from kernel.
Provide alternative implementation of obsolete siginterrupt().
Consolidate LV allocation into alloc_lv().
Treat input units of both 's' and 'S' as 512-byte sectors. (2.02.49)
--- LVM2/lib/activate/activate.c 2009/06/01 12:43:32 1.153
+++ LVM2/lib/activate/activate.c 2009/09/29 15:17:54 1.154
@@ -1017,6 +1017,8 @@
memlock_dec();
fs_unlock();
+ if (!lv_info(cmd, lv, &info, 1, 0) || info.exists)
+ r = 0;
out:
if (lv)
vg_release(lv->vg);
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2007-08-01 20:29 jbrassow
0 siblings, 0 replies; 15+ messages in thread
From: jbrassow @ 2007-08-01 20:29 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow@sourceware.org 2007-08-01 20:29:07
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
lib/activate/activate.c:_lv_activate tries to monitor a device
regardless of whether it was successfully activated. Now fixed
to only monitor if it was successfully activated.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.674&r2=1.675
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.124&r2=1.125
--- LVM2/WHATS_NEW 2007/07/28 15:20:36 1.674
+++ LVM2/WHATS_NEW 2007/08/01 20:29:07 1.675
@@ -1,5 +1,6 @@
Version 2.02.28 -
================================
+ Don't try to monitor devices which we failed to create.
Don't leak a file descriptor in fcntl_lock_file(), when fcntl fails.
Remove create_dir function; use now-equivalent dm_create_dir instead
Detect stream write failure reliably; new fn: lvm_fclose; use dm_fclose
--- LVM2/lib/activate/activate.c 2007/07/02 11:17:21 1.124
+++ LVM2/lib/activate/activate.c 2007/08/01 20:29:07 1.125
@@ -963,7 +963,7 @@
memlock_dec();
fs_unlock();
- if (!monitor_dev_for_events(cmd, lv, 1))
+ if (r && !monitor_dev_for_events(cmd, lv, 1))
stack;
return r;
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2006-12-20 16:19 agk
0 siblings, 0 replies; 15+ messages in thread
From: agk @ 2006-12-20 16:19 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2006-12-20 16:19:01
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Fix some activate.c prototypes when compiled without devmapper.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.524&r2=1.525
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.114&r2=1.115
--- LVM2/WHATS_NEW 2006/12/20 14:34:04 1.524
+++ LVM2/WHATS_NEW 2006/12/20 16:19:01 1.525
@@ -1,5 +1,6 @@
Version 2.02.18 -
====================================
+ Fix some activate.c prototypes when compiled without devmapper.
Fix dmeventd mirror to cope if monitored device disappears.
Version 2.02.17 - 14th December 2006
--- LVM2/lib/activate/activate.c 2006/10/03 17:55:19 1.114
+++ LVM2/lib/activate/activate.c 2006/12/20 16:19:01 1.115
@@ -141,7 +141,7 @@
{
return 0;
}
-int target_present(const char *target_name)
+int target_present(const char *target_name, int use_modprobe)
{
return 0;
}
@@ -211,7 +211,7 @@
return 1;
}
-int pv_uses_vg(struct cmd_context *cmd, struct physical_volume *pv,
+int pv_uses_vg(struct physical_volume *pv,
struct volume_group *vg)
{
return 0;
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2005-12-22 16:13 agk
0 siblings, 0 replies; 15+ messages in thread
From: agk @ 2005-12-22 16:13 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-12-22 16:13:39
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Always print warning if activation is disabled.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.339&r2=1.340
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.101&r2=1.102
^ permalink raw reply [flat|nested] 15+ messages in thread
* LVM2 ./WHATS_NEW lib/activate/activate.c
@ 2004-05-11 17:09 agk
0 siblings, 0 replies; 15+ messages in thread
From: agk @ 2004-05-11 17:09 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2004-05-11 17:09:09
Modified files:
. : WHATS_NEW
lib/activate : activate.c
Log message:
Only include visible LVs in active/open counts.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.27&r2=1.28
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.86&r2=1.87
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-01-25 22:16 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-21 14:34 LVM2 ./WHATS_NEW lib/activate/activate.c zkabelac
-- strict thread matches above, loose matches on Subject: below --
2012-01-25 22:16 zkabelac
2011-02-18 14:26 zkabelac
2010-08-16 23:29 agk
2010-07-12 11:37 prajnoha
2010-01-27 13:24 mbroz
2009-12-03 19:23 mbroz
2009-12-01 19:10 mbroz
2009-10-30 13:07 agk
2009-09-29 18:50 agk
2009-09-29 15:17 mbroz
2007-08-01 20:29 jbrassow
2006-12-20 16:19 agk
2005-12-22 16:13 agk
2004-05-11 17:09 agk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).