Alasdair Kergon
21bc366486
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
be6845999b
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Jim Meyering
941e4f5567
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
c93e6b5f79
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
57015b12e2
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
e7ddf4168d
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
817afaad5e
pre-release
2007-06-15 20:46:04 +00:00
Petr Rockai
7379c67839
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
5d47ed1161
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
2e1b92e3ea
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
8a37910d51
register->monitor etc.
2007-01-19 22:21:45 +00:00
Patrick Caulfield
e3e6eba1aa
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
a951e97ae9
clvmd ia64 alignment fixes etc. (pjc)
2006-12-01 23:10:26 +00:00
Alasdair Kergon
4dc0ec2253
Adjust some alignments for ia64 and sparc.
...
(Some of the changes are probably unnecessary.)
2006-11-30 23:11:42 +00:00
Alasdair Kergon
04dabc1562
Fall back to internal locking if external locking lib is missing or fails.
2006-10-14 16:37:54 +00:00
Alasdair Kergon
dc4d7417f7
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
a45da5f676
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
0550c1b618
Move lvm_snprintf into libdevmapper.
2006-08-21 12:54:53 +00:00
Patrick Caulfield
8228b50882
Fix "Unaligned access" when using clvm
...
bz#194626
2006-06-12 09:46:35 +00:00
Alasdair Kergon
2293567c8c
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
Alasdair Kergon
3e3d5d8593
Add --monitor to vgcreate and lvcreate to control dmeventd registration.
...
Propagate --monitor around cluster.
Filter LCK_NONBLOCK in clvmd lock_vg.
2006-05-12 19:16:48 +00:00
Alasdair Kergon
6560de21e2
fix compile
2006-05-12 13:33:22 +00:00
Alasdair Kergon
526a3c2186
Propagate nosync flag around cluster.
2006-05-11 19:05:21 +00:00
Alasdair Kergon
898e6f8e41
Add mirror_library description to example.conf.
...
More compile-time cleanup.
2006-05-11 17:58:58 +00:00
Alasdair Kergon
2c7fbadeef
more coverity fixes
2006-05-10 17:49:25 +00:00
Alasdair Kergon
72b2cb613a
Make SIZE_SHORT the default for display_size().
...
Fix some memory leaks in error paths found by coverity.
Use C99 struct initialisers.
Move DEFS into configure.h.
Clean-ups to remove miscellaneous compiler warnings.
2006-05-09 21:23:51 +00:00
Alasdair Kergon
8a2fc58645
Check for libsepol.
...
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
1a01b0c103
Suppress locking library load failure message if --ignorelockingfailure.
2006-04-03 18:43:55 +00:00
Alasdair Kergon
9f5d8283a9
Propagate partial mode around cluster.
2006-03-09 22:34:13 +00:00
Alasdair Kergon
2262b32057
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Patrick Caulfield
fe6c78629d
clvmd no longer takes out locks for non-clusteed LVs,
...
and non-clustered LVs are only activated on the local node.
2005-08-16 08:25:09 +00:00
Alasdair Kergon
4c60a35226
Add clustered VG flag to LV lock requests.
2005-08-15 13:24:46 +00:00
Alasdair Kergon
0fb173aa3a
Change LV locking macros to take lv instead of lvid.
2005-08-15 12:00:04 +00:00
Alasdair Kergon
07d318310b
Prepare tools to support clustered mirrors.
2005-08-14 23:18:28 +00:00
Alasdair Kergon
60f13f01d2
Basic support for mirrors.
2005-06-01 16:51:55 +00:00
Alasdair Kergon
343a8c920d
Add clustered attribute so vgchange can identify clustered VGs w/o locking.
2005-03-21 22:55:12 +00:00
Alasdair Kergon
779b7713cf
Tighten signal handlers.
2005-03-21 14:16:16 +00:00
Patrick Caulfield
6f4d25ec7f
Fix clvmd startup bug introduced in cman/gulm amalgamation. bz#145729
...
Improve reporting of node-specific locking errors so you'll get
somthing a little more helpfiul than "host is down" - it will now tell
you /which/ host it thinks is down.
2005-01-21 11:35:24 +00:00
Patrick Caulfield
b9fb9b206e
Fix off-by-one error in cluster_locking that could case read hangs.
2005-01-07 14:22:49 +00:00
Alasdair Kergon
cab8ea7c62
Cluster-extension-only installation.
2004-08-18 18:57:40 +00:00
Alasdair Kergon
11a4112cb9
Missing .exported_symbols
2004-06-24 08:16:09 +00:00
Alasdair Kergon
d3c8211fef
Add cluster support.
2004-06-24 08:02:38 +00:00
Alasdair Kergon
b86ef8e2cb
Add local activation support.
2004-06-16 17:13:41 +00:00
Alasdair Kergon
b61702ce8c
Add reset_fn to external_locking.
2004-05-18 21:57:24 +00:00
Alasdair Kergon
23289e6d14
Revise internal locking semantics.
2004-05-05 12:03:07 +00:00
Alasdair Kergon
4922197a33
Begin to separate out segment types.
2004-05-04 21:25:57 +00:00
Alasdair Kergon
6606c3ae81
Update copyright notices.
2004-03-30 19:35:44 +00:00
Alasdair Kergon
8e1e14ee8a
missing definition
2004-03-26 21:46:01 +00:00
Alasdair Kergon
93af0a4a51
indent
2004-03-26 21:07:30 +00:00
Alasdair Kergon
2da02bbd16
move lock_lvs; add lock memlock code
2004-03-26 20:49:35 +00:00
Alasdair Kergon
05896e787c
Add locking flags + memlock option.
2004-03-26 20:17:11 +00:00
Alasdair Kergon
814643d8a2
rename config file vars & always use / as separator
2004-03-08 18:28:45 +00:00
Alasdair Kergon
e19f549a11
Fix support for PVs on read only devices. [Still must set LVs read only]
2003-11-21 19:54:40 +00:00
Alasdair Kergon
3eb135f550
Fit locking bits into 1 byte.
2003-11-06 17:08:18 +00:00
Alasdair Kergon
914c97239f
Another sync point - numerous fixes & clean ups.
2003-07-04 22:34:56 +00:00
Alasdair Kergon
8b99c8b6ec
reset_locking()
2003-05-06 12:03:13 +00:00
Alasdair Kergon
b896caa19b
Improve build robustness.
2003-04-15 13:24:42 +00:00
Alasdair Kergon
26e7f2e0c4
Tidy various pre-processing incl. making libdl optional.
2003-03-24 18:08:53 +00:00
Alasdair Kergon
4e268ceacb
Also lock memory during LV updates.
2003-01-03 21:10:28 +00:00
Alasdair Kergon
8ef2b021ed
Default stripesize 64k & config file setting for it;
...
Clear many compiler warnings (i386) & associated bugs - hopefully without
introducing too many new bugs:-) (Same exercise required for other archs.)
Default compilation has optimisation - or else use ./configure --enable-debug
2002-12-19 23:25:55 +00:00
Alasdair Kergon
d1d9800ef1
Refactoring.
2002-11-18 14:01:16 +00:00
Alasdair Kergon
f2187638dc
Don't let LVM2 access a VG if the original LVM driver appears to be using it.
2002-11-01 19:57:25 +00:00
Patrick Caulfield
7a0ed4a40c
Rename lock_resource to file_lock_resource to avoid name clashes
2002-07-25 09:04:30 +00:00
Alasdair Kergon
48ad31920d
Add --ignorelockingfailure
2002-07-10 20:43:32 +00:00
Alasdair Kergon
25b733809a
Merge with text format branch.
...
Lots of changes/very little testing so far => there'll be bugs!
Use 'vgcreate -M text' to create a volume group with its metadata stored
in text files. Text format metadata changes should be reasonably atomic,
with a (basic) automatic recovery mechanism if the system crashes while a
change is in progress.
Add a metadata section to lvm.conf to specify multiple directories if
you want (recommended) to keep multiple copies of the metadata (eg on
different filesystems).
e.g. metadata {
dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"]
}
Plenty of refinements still in the pipeline.
2002-04-24 18:20:51 +00:00
Alasdair Kergon
7e3d403b88
Implement a no_locking module that *does* attempt activation.
2002-04-11 14:10:32 +00:00
Patrick Caulfield
426bc429ef
Remove \n from log messages.
2002-04-10 15:49:47 +00:00
Patrick Caulfield
2fab033e9b
Implement an external locking interface.
2002-04-08 16:04:50 +00:00
Patrick Caulfield
ae70673752
Make lock type numbers match the DLM numbers in use, and move UNLOCK out
...
of the way.
2002-04-04 13:31:21 +00:00
Alasdair Kergon
8856889d10
Rename LCK_NONE to LCK_UNLOCK
2002-04-04 11:18:45 +00:00
Alasdair Kergon
c1b5fc6673
Fix typo.
2002-03-25 18:50:37 +00:00
Alasdair Kergon
568d7229bf
Review locking: block signals instead of ignoring them and restore state
...
afterwards; avoid race condition with unlink; add LCK_HOLD to process_each_vg.
2002-03-15 16:07:38 +00:00
Alasdair Kergon
be326a2f1b
o activate/reactivate merge
...
o unlocking macro
2002-03-11 15:08:39 +00:00
Alasdair Kergon
15c325f06a
o Use new LCK_HOLD flag to indicate whether lock should be held on return
...
from lock_vol() - otherwise it now attempts to acquire the lock and then
immediately releases it.
o Extend the id field in struct logical_volume to hold VG uuid + LV uuid
for format1. This unique lvid can be used directly when calling lock_vol().
o Add the VG uuid to vgcache to make VG uuid lookups possible. (Another
step towards using them instead of VG names internally.)
2002-03-05 20:03:09 +00:00
Alasdair Kergon
f4cbeaf0ac
o Lock mechanism for LV activation
...
o #defines for common lock flag combinations
o Try out hyphens instead of colons in device-mapper names - does this
make messages containing filenames easier to read?
2002-02-27 12:26:41 +00:00
Alasdair Kergon
413cc9189e
Begin conversion so LV id is passed to activation unit instead of
...
struct logical_volume.
2002-02-25 12:56:16 +00:00
Alasdair Kergon
cc8b2cd706
Try out using LV locking for reactivation.
2002-02-20 21:30:27 +00:00
Alasdair Kergon
7d0e6e800e
o Support locking with local lock files
...
o Disable control-c during updates (except if blocked waiting for a lock)
2002-02-11 15:42:34 +00:00
Joe Thornber
03888774a5
o Added functions to display what's in the archive.
...
o For now vgcfgrestore -l <vg> displays this list.
A bit hacky, but it'll get better.
2002-02-11 11:43:17 +00:00
Alasdair Kergon
d1ad45cc41
Locking prototypes.
2002-02-08 14:30:37 +00:00