Dave Wysochanski
7447482608
Move locking_type reading inside init_locking().
...
No functional change.
2009-02-03 16:23:19 +00:00
Dave Wysochanski
211b07a2e2
Create global is_static() to eliminate from the library init function.
...
Very simple / crude method of removing 'is_static' from initialization.
Why should we require an application tell us whether it is linked
statically or dynamically to libLVM? If the application is linked
statically, but libraries exist and dlopen() calls succeed, why
do we care if it's statically linked?
2008-12-18 05:27:17 +00:00
Dave Wysochanski
4b0e97e666
Rename 'cmd' to 'clvmd_cmd' to remove ambiguity.
...
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: James Cameron <james.cameron@hp.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
2008-12-16 12:30:39 +00:00
Zdeněk Kabeláč
aff35fea29
* minor compilator warning fix for improper function declaration.
2008-11-12 09:30:52 +00:00
Alasdair Kergon
2a550ef96d
more fixes
2008-11-04 15:07:45 +00:00
Alasdair Kergon
a2bfad1c29
Right, a simple build (without options) is working again.
2008-11-03 22:14:30 +00:00
Alasdair Kergon
22d7e60d0e
Accept locking fallback_to_* options in the global section as documented.
2008-10-24 01:16:16 +00:00
Alasdair Kergon
95d43e17b3
Improve the way VGs with PVs missing are handled so manual intervention
...
is required in fewer circumstances. (mornfall)
2008-09-19 06:42:00 +00:00
Milan Broz
91dcddbdf7
Do not scan for lvm1 entries in /proc if not running 2.4 kernel.
...
(LVM1 is only present in 2.4 kernel.)
2008-09-10 10:14:59 +00:00
Alasdair Kergon
5cd87d3d27
more cleanup
2008-05-09 19:26:58 +00:00
Alasdair Kergon
689d8a80b5
More P_ and V_ lock cleanup.
2008-05-09 18:45:15 +00:00
Alasdair Kergon
409725be24
Avoid unnecessary unlock attempts with LCK_CACHE pseudo-locks.
2008-05-08 18:35:58 +00:00
Milan Broz
867e9c51d4
Drop cached VG metadata before and after committing changes to it.
2008-04-15 14:46:19 +00:00
Alasdair Kergon
0170f7b42a
rename P_global to P_#global
2008-04-15 11:36:46 +00:00
Alasdair Kergon
74bb6ead95
Don't attempt remote metadata backups of non-clustered VGs. (2.02.29)
2008-04-14 19:49:12 +00:00
Dave Wysochanski
57cb22ff3c
Add vg_is_clustered() helper function.
...
Should be no functional change.
2008-04-10 17:09:32 +00:00
Alasdair Kergon
b4ad9a5d08
Use clustered mirror log with pvmove in clustered VGs, if available.
2008-04-09 12:56:34 +00:00
Milan Broz
194121760a
Update lvmcache VG lock state for all locking types now.
2008-04-07 19:17:29 +00:00
Alasdair Kergon
fefc655969
Add some basic internal VG lock validation.
2008-04-03 18:56:40 +00:00
Alasdair Kergon
1ddd4509dc
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Alasdair Kergon
6af3f4f4cf
Use stack return macros throughout.
2008-01-30 13:19:47 +00:00
Patrick Caulfield
8c01179075
Tidy the clvmd backup code.
...
Move the backups inside the protection of the VG lock,
Don't backup if we have a suspended LV
Correct the vg_read() call
2007-12-05 13:17:18 +00:00
Patrick Caulfield
8f21c9a920
When we unlock a VG tell the clvmds to see if a backup of the metadata needs
...
to be done.
2007-12-04 15:39:26 +00:00
Alasdair Kergon
d6e5e3d103
Decode cluster locking state in log message. (untested)
...
Change file locking state messages from debug to very verbose.
2007-11-16 21:16:20 +00:00
Alasdair Kergon
a01732ee9b
more vg_read lock fixes
2007-11-15 21:30:52 +00:00
Alasdair Kergon
590cfb77a5
define LCK_NONE for cases when vg_lock_and_read already holds lock
...
(temporary - library will use internal ref counting instead)
2007-11-15 02:55:22 +00:00
Bryn M. Reeves
ee79277774
Add is_orphan_vg() and change all hardcoded checks to use it.
2007-11-02 13:06:42 +00:00
Jim Meyering
c99204d370
Correct typo in comments: s/is part of the LVM2/is part of LVM2/.
...
Signed-off-by: Jim Meyering <jim@meyering.net>
Author: Jim Meyering <jim@meyering.net>
2007-09-21 10:16:45 +00:00
Patrick Caulfield
4cd97611e5
Locking P_global causes a cache refresh.
2007-08-23 15:43:20 +00:00
Alasdair Kergon
da27380ab5
Introduce VG_GLOBAL lock type for vgscan/pvscan to trigger clvmd -R.
2007-08-23 15:02:26 +00:00
Alasdair Kergon
d080291150
Clean up numerous compiler warnings that crept in recently.
...
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
Alasdair Kergon
3f507a26fb
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Jim Meyering
7b6248983d
Remove create_dir function; use now-equivalent dm_create_dir instead.
...
* lib/misc/lvm-file.c (_create_dir_recursive, create_dir): Remove functions.
* lib/misc/lvm-file.h (create_dir): Remove declaration.
* lib/commands/toolcontext.c (create_toolcontext): s/create_dir/dm_create_dir/
* lib/format_text/archiver.c (archive, backup): Likewise.
* lib/format_text/format-text.c (_add_dir): Likewise.
* lib/locking/file_locking.c (init_file_locking): Likewise.
Patch by Jun'ichi Nomura.
2007-07-28 12:26:21 +00:00
Jim Meyering
fa28cea152
Introduce is_same_inode macro, now including a comparison of st_dev.
...
* lib/misc/lvm-file.h (is_same_inode): Define.
* lib/filters/filter-persistent.c (persistent_filter_dump): Use is_same_inode
in place of a direct st_ino-only comparison.
* lib/locking/file_locking.c (_release_lock, _lock_file): Likewise.
2007-07-20 15:22:46 +00:00
Jim Meyering
c8da1647a1
Don't leak a file descriptor in _lock_file when flock fails.
...
* lib/locking/file_locking.c (_lock_file): Close fd upon flock failure.
2007-07-20 12:12:52 +00:00
Petr Rockai
764858fa12
Make warnings go to stderr. Change log_warn to that effect, log_print
...
continues to send messages to stdout.
2007-06-28 17:33:44 +00:00
Alasdair Kergon
9daac5c178
pre-release
2007-06-15 20:46:04 +00:00
Petr Rockai
10e4254e7d
Allow keyboard interrupts in yes_no_prompt(). Add code to toollib.c
...
loops and to pvcreate.c, lvchange.c and lvresize.c to handle
interrupted prompts.
2007-06-15 10:11:14 +00:00
Patrick Caulfield
625a671189
Flag nolocking as a clustered locking module as we need to be able
...
to look at clustered LVs at clvmd startup
2007-03-13 14:59:21 +00:00
Alasdair Kergon
f813d41a76
Add some missing close() and fclose() return code checks.
...
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
f4bd12e8e9
register->monitor etc.
2007-01-19 22:21:45 +00:00
Patrick Caulfield
9dee30ff0e
Fix gulm operation of clvmd. including a hang when attempting to
...
exclusively lock an LV that is already locked no another node.
2006-12-11 14:00:26 +00:00
Alasdair Kergon
b9ba9ffad2
clvmd ia64 alignment fixes etc. (pjc)
2006-12-01 23:10:26 +00:00
Alasdair Kergon
ee68d715bf
Adjust some alignments for ia64 and sparc.
...
(Some of the changes are probably unnecessary.)
2006-11-30 23:11:42 +00:00
Alasdair Kergon
352a66f46f
Fall back to internal locking if external locking lib is missing or fails.
2006-10-14 16:37:54 +00:00
Alasdair Kergon
6e2babc2ce
When using local file locking, skip clustered VGs.
...
Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
2006-09-02 01:18:17 +00:00
Alasdair Kergon
08e253bed1
lvm.static uses built-in cluster locking instead of external locking.
...
Don't attempt to load shared libraries if built statically.
2006-08-31 22:21:00 +00:00
Alasdair Kergon
b0b60fafd5
Move lvm_snprintf into libdevmapper.
2006-08-21 12:54:53 +00:00
Patrick Caulfield
da6cb15393
Fix "Unaligned access" when using clvm
...
bz#194626
2006-06-12 09:46:35 +00:00
Alasdair Kergon
608eedf88d
Fix lvcreate corelog validation.
...
Add --config for overriding most config file settings from cmdline.
Quote arguments when printing command line.
Remove linefeed from 'initialising logging' message.
Add 'Completed' debug message.
Don't attempt library exit after reloading config files.
Always compile with libdevmapper, even if device-mapper is disabled.
2006-05-16 16:48:31 +00:00