1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

605 Commits

Author SHA1 Message Date
Alasdair Kergon
4b801e21e3 pre-release 2010-04-14 17:50:49 +00:00
Alasdair Kergon
687603a144 Fix incorrect removal of symlinks after LV deactivation fails. 2010-04-07 20:04:41 +00:00
Milan Broz
7b030379ec Wipe dm-ioctl parameters in memory after use. 2010-04-07 15:57:20 +00:00
Peter Rajnoha
940c32c5dd Strictly require libudev if udev_sync is used.
This prevents some confusion when libudev was not found so udev_sync was disabled
automatically. Configure was successful though giving only a tiny warning.

Also, if "dmsetup udevcreatecookie" is used, never return 0x000000 as a result if
udev is not running and keep the output blank.
2010-03-23 14:43:18 +00:00
Peter Rajnoha
14ad41a065 Add support for ioctl's DM_UEVENT_GENERATED_FLAG.
We need to know whether we should wait for any uevent or not when
using udev_sync. A kernel patch was posted recently that changed the
way uevents are sent on dm device resume - it is sent only if the
device has been suspended before. There's also a new DM_UEVENT_GENERATED_FLAG
in the ioctl to notify userspace whether the event was generated.

If the uevent was not generated (e.g. the situation where the device is
*not* suspended and we call a resume), we just call dm_udev_complete
explicitly from within libdevmapper itself to prevent infinite waiting
while trying to synchronise with udev processing.
2010-03-23 14:38:37 +00:00
Alasdair Kergon
aab6f07d14 post-release 2010-03-09 14:01:47 +00:00
Alasdair Kergon
23b3f55bfb pre-release 2010-03-09 13:13:07 +00:00
Milan Broz
985d87b5eb Add --help dmsetup option as the synonym for help command. 2010-03-08 16:05:07 +00:00
Milan Broz
0be2dfefdb Add --showkeys parameter description into dmsetup man page.
Also fix minor warning (-c is parameter) in man page formatting.
2010-03-08 16:04:32 +00:00
Alasdair Kergon
def0511361 post-release 2010-02-16 00:27:01 +00:00
Alasdair Kergon
29b8138482 pre-release 2010-02-15 23:53:15 +00:00
Peter Rajnoha
276d32973f Several changes in dmsetup and libdevmapper:
- add DM_UDEV_DISABLE_LIBRARY_FALLBACK udev flag to rely on udev only

 - export dm_udev_create_cookie function to create new cookies on demand

 - add --udevcookie, udevcreatecookie and udevreleasecookie for dmsetup
   (to support "udev transactions" where one cookie value can be used for
    several dmsetup calls)

 - don't use DM_UDEV_DISABLE_CHECKING env. var. anymore and set the state
   automatically (based on udev and libdevmapper dev path comparison)
2010-02-15 16:21:33 +00:00
Alasdair Kergon
adf7081163 Remove pointless versioned symlinks to dmeventd plugin libraries. 2010-02-02 14:09:17 +00:00
Alasdair Kergon
a50b7c55d3 Fix dmeventd snapshot plugin build dependency. 2010-02-02 14:03:50 +00:00
Alasdair Kergon
448f8c4240 pre-release 2010-01-23 02:14:30 +00:00
Alasdair Kergon
8e44e884a2 post-release 2010-01-22 01:09:09 +00:00
Alasdair Kergon
6107f4a02a pre-release 2010-01-21 23:55:17 +00:00
Jonathan Earl Brassow
4a13ae4c95 udpate WHATS_NEW* 2010-01-15 16:18:14 +00:00
Alasdair Kergon
f6d95e19c4 post-release 2010-01-14 14:42:06 +00:00
Alasdair Kergon
801eff0c52 pre-release 2010-01-14 14:02:34 +00:00
Mike Snitzer
b4affd607d update WHATS_NEW and WHATS_NEW_DM to include snapshot-merge changes 2010-01-13 21:48:39 +00:00
Alasdair Kergon
af6dd44048 post-release 2010-01-12 14:46:59 +00:00
Alasdair Kergon
d30ec9fd1e pre-release 2010-01-12 14:39:07 +00:00
Alasdair Kergon
627409ec38 Revert so-called "redundant" log until after next release. 2010-01-12 14:00:51 +00:00
Alasdair Kergon
4ead572462 . 2010-01-11 21:44:36 +00:00
Alasdair Kergon
42783a54db Add missing items to WHATS_NEW files.
Continue to use 'field' to describe reporting elements.
2010-01-11 21:28:04 +00:00
Peter Rajnoha
a8ed16de33 Define {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests.
We need to disable udev checking for our tests since they use their own
location for device nodes and symlinks.
2010-01-11 15:48:49 +00:00
Peter Rajnoha
ee0a4914d5 Enable udev_sync and udev_rules in lvm.conf by default while running tests. 2010-01-11 15:43:19 +00:00
Peter Rajnoha
8e7c6b60fb Add support to disable udev checking: DM_UDEV_DISABLE_CHECKING=1 env. variable.
Sometimes it is really needed to switch off udev checking and the warnings we show when
we detect that udev has not done its job right - the messages like "Udev should have done
this and that. Falling back to direct node creation/removal. " etc.

This would be especially handy while setting DM_DEV_DIR env var that could be set to a
different location than standard /dev (udev can't create nodes/symlinks out of that one
directory that is configured into udevd). The exact same situation happens while we're
running our tests.
2010-01-11 15:36:24 +00:00
Peter Rajnoha
e829c626da Add activation/udev_rules config option in lvm.conf.
Add dm_tree_add_dev_with_udev_flags to provide wider support for udev flags.
2010-01-07 19:54:21 +00:00
Peter Rajnoha
837adeea7f Add --noudevrules option for dmsetup to disable /dev node management by udev. 2010-01-07 19:45:12 +00:00
zkabelac
9fea2798e3 Show all fields for 'dmsetup info -c -o all'. 2010-01-07 14:30:47 +00:00
Mike Snitzer
f84d2eeec9 update WHATS_NEW and WHATS_NEW_DM with previous commits' changes 2010-01-05 21:32:59 +00:00
zkabelac
0331a34d58 Fix unlocking vg in some pvresize and toollib error paths. 2009-12-11 13:11:56 +00:00
Peter Rajnoha
7ab8b44b6c Disable udev rules on change event with DISK_RO=1.
There's a new change udev event generated since kernel 2.6.32 that
notifies userspace about a change in read-only attribute for block
devices (with DISK_RO=1 environment variable set).

We need to detect this and disable the rule application so the
meaning of this change event is not interchanged with the regular
change event used while resuming/renaming DM devices.

If there's anybody awaiting this notification in foreign rules,
he can still check for this env var and do the appropriate actions
separately.
2009-12-07 12:03:47 +00:00
Alasdair Kergon
0c0e1fbbeb Post-release.
Fingers crossed this one's more successful that the last one!
2009-11-24 19:04:23 +00:00
Alasdair Kergon
e400f6eab9 pre-release 2009-11-24 18:26:08 +00:00
Alasdair Kergon
58a8b00086 post-release 2009-11-19 19:53:58 +00:00
Alasdair Kergon
50a27398b0 . 2009-11-19 19:42:57 +00:00
Alasdair Kergon
eab7cba1f3 pre-release 2009-11-19 19:00:34 +00:00
Milan Broz
cdc905cc16 Fix install_device-mapper Makefile target to not build dmeventd plugins. 2009-11-13 12:48:01 +00:00
Peter Rajnoha
88b0c82a0d Support udev flags even when udev_sync is disabled or not compiled in.
This provides better support for environments where udev rules are installed
but udev_sync is not compiled in (however, using udev_sync is highly
recommended). It also provides consistent and expected functionality even
when '--noudevsync' option is used.

There is still requirement for kernel >= 2.6.31 for the flags to work though
(it uses DM cookies to pass the flags into the kernel and set them in udev
event environment that we can read in udev rules).
2009-11-13 12:43:21 +00:00
Peter Rajnoha
01d3349587 Remove 'last_rule' from udev rules.
'last_rule' option has been removed from udev (version >= 147).

From now on, we require foreign rules to check and honor
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG} instead. Foreign
rules should be skipped totally when this flag is set.
2009-11-13 12:33:27 +00:00
Alasdair Kergon
21ed352ac5 Add support for querying a device's inactive table.
Currently this data is invisible to userspace.
Requires dm >= 4.16 (likely to be in linux 2.6.33).
2009-11-06 00:43:08 +00:00
Alasdair Kergon
44e1f095d1 Tidy some uses of arg_count and introduce arg_is_set. 2009-11-03 15:50:42 +00:00
Alasdair Kergon
b74e5b870c post-release 2009-10-27 01:13:20 +00:00
Alasdair Kergon
bcb021296f . 2009-10-27 00:52:45 +00:00
Alasdair Kergon
972b11e39e pre-release 2009-10-26 21:56:23 +00:00
Peter Rajnoha
2c0df9552f Use udev flags in the rules and cleanup the rules:
- remove default permissions set in 95-dm-notify.rules (and add a hint in 12-dm-permissions.rules to set it by the user directly)
 - add multipath DM_ACTION=="PATH_FAILED" filter
 - remove unnecessary filters in the headers of the rules (we can simply use DM_UDEV_RULES_VSN instead)
 - fix symlink priorities in /dev/disk/ (snapshot volumes have low priority for FS UUID symlinks so it will not overwrite symlinks for the origin)
2009-10-22 13:11:33 +00:00
Peter Rajnoha
68069c70e1 Add udev flags support in libdevmapper and provide 'dmsetup udevflags' command to decode them. 2009-10-22 12:55:47 +00:00
fabbione
1dbfe1e856 Merge Debian patch 05 debian: keep libdm-abi consistent.
This appears to be the only user visible feature that can change libdm ABI
at build time.

Thanks to Bastian Blank for the patch.
2009-10-12 04:06:42 +00:00
Alasdair Kergon
0501c06745 post-release 2009-09-26 00:42:47 +00:00
Alasdair Kergon
0670c8f60f pre-release 2009-09-25 18:30:27 +00:00
Alasdair Kergon
dfdcb92f3d pre-release 2009-09-25 18:30:26 +00:00
Alasdair Kergon
6d2d4f72ac Handle any path supplied to dm_task_set_name() by looking up in /dev/mapper. 2009-09-25 18:08:04 +00:00
Alasdair Kergon
d32a6f15bf post-release 2009-09-15 13:54:28 +00:00
Alasdair Kergon
b1ce301520 dm release cleanup 2009-09-15 11:41:38 +00:00
Alasdair Kergon
cd93201e46 pre-release 2009-09-15 10:57:16 +00:00
Peter Rajnoha
0d98ee8916 Add y|--yes option for dmsetup to provide a default 'YES' answer to questions. 2009-09-11 15:53:57 +00:00
Peter Rajnoha
3eca5ad9a1 Fix Makefile to take into account dmsetup's reconfiguration. 2009-09-11 15:52:22 +00:00
Dave Wysochanski
3d8e149668 Restore umask when device node creation fails.
Author: Florian Zumbiehl <florz@florz.de>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
2009-09-03 21:51:26 +00:00
Jonathan Earl Brassow
01b09aab43 mirror table generating code: Properly handle 'block_on_errors' and 'cluster' features
The device-mapper mirror CTR table has been changing over time.  This has
now been corrected to handle the old and new methods for invoking the
'block_on_errors' and 'cluster' features.  (The code that does this was
accidentally committed in the previous check-in.  This check-in finishes
the job.)
2009-08-13 19:36:04 +00:00
Alasdair Kergon
f93a548fe2 post-release 2009-08-06 19:32:26 +00:00
Alasdair Kergon
a3d7f70d45 pre-release 2009-08-06 16:30:34 +00:00
Alasdair Kergon
39270f9647 Set cookies in activation code and wait for udev to complete processing. 2009-07-31 18:30:31 +00:00
Alasdair Kergon
ca897d8d15 post-release 2009-07-28 20:47:40 +00:00
Alasdair Kergon
9ae2f02842 pre-release 2009-07-28 17:22:07 +00:00
Alasdair Kergon
571cd5a94f post-release 2009-07-15 15:38:41 +00:00
Alasdair Kergon
a06d6839e1 New LOG_MESG macro to fix file/line number logging for memory leaks after
LOG_LINENO macro was added.
2009-07-15 14:18:38 +00:00
Alasdair Kergon
22ba3c7b41 pre-release 2009-07-15 13:20:06 +00:00
Alasdair Kergon
7e7274b002 Add dm_log_with_errno and dm_log_with_errno_init, deprecating the old
Change plog to use dm_log_with_errno unless deprecated dm_log_init was used.
Rename plog macro to LOG_LINE and use in dm_dump_memory_debug.
2009-07-10 09:59:37 +00:00
Alasdair Kergon
e08e69719d . 2009-07-07 17:19:38 +00:00
Alasdair Kergon
7acff3b938 Add device number to more log messages during activation. 2009-07-03 12:45:55 +00:00
Alasdair Kergon
8414c57026 post-release 2009-07-01 09:31:46 +00:00
Alasdair Kergon
ae2e7f0603 update date 2009-06-30 18:41:47 +00:00
Alasdair Kergon
7177c3b393 pre-release tidy up 2009-06-30 18:39:31 +00:00
Alasdair Kergon
273511037a pre-release 2009-06-26 10:57:30 +00:00
Milan Broz
f7c1e5f60d Fix backward compatibility for major:minor query.
Is an application uses query and set major:minor
to device, it should not fallback to default major by default.

Add new function whoich allows that (and use it in lvm2).
2009-06-17 20:55:24 +00:00
Milan Broz
dbe275ce72 Do not fork daemon when dmeventd cannot be found. 2009-06-15 12:29:41 +00:00
Milan Broz
25d9591416 Support crypt segment in libdevmapper tree.
- it can support multiple segments, but note that
to work properly, correct IV (initialization vector)
offset parameter must be set properly.

Because most usage of IV start offset is when we join
several crypto segments together (so iv_offset is the segment
start offset), DM_CRYPT_IV_DEFAULT is defined to simplify
the process.

Function accepts the string in cipher agrument (already
including chainmode and iv type; chainmode and iv parameters are NULL
in this case) or user can provide split parameters which will
join into dm-crypt cipher specification "cipher-chainmode-iv".

All these parameters must be supplied in correct dm-crypt format.
2009-06-09 16:10:20 +00:00
Alasdair Kergon
f1b30c5aff test commit 2009-06-04 13:23:10 +00:00
Alasdair Kergon
4db2593801 test commit 2009-06-04 13:16:49 +00:00
Alasdair Kergon
ad685d2153 test commit 2009-06-04 13:11:58 +00:00
Alasdair Kergon
f10d82dc30 Add splitname. 2009-06-03 20:44:42 +00:00
Alasdair Kergon
5ec942fb2a Add subsystem, vg_name, lv_name, lv_layer fields to dmsetup reports. 2009-06-03 18:35:39 +00:00
Alasdair Kergon
90cc3a0f05 Make mempool optional in dm_split_lvm_name() 2009-06-03 11:40:23 +00:00
Alasdair Kergon
cf578d50ec post-release 2009-05-22 15:23:10 +00:00
Alasdair Kergon
965c7e1200 Pre-release cleanups. 2009-05-21 03:04:52 +00:00
Alasdair Kergon
abea4f481c Missing entries. 2009-05-20 22:44:10 +00:00
Peter Rajnoha
14bd66805e Fix segfault when using -U, -G and -M options in dmsetup. 2009-04-24 11:30:49 +00:00
Alasdair Kergon
884d5a7fc8 post-release 2009-03-03 18:25:05 +00:00
Alasdair Kergon
5ab342e298 pre-release 2009-03-03 13:03:03 +00:00
Alasdair Kergon
e28d3f8cbd If kernel supports only one dm major number, use in place of any supplied.
No longer require kernel and metadata major numbers to match.
2009-02-12 20:42:07 +00:00
Alasdair Kergon
a82f2fec18 post-release 2009-01-26 14:46:08 +00:00
Alasdair Kergon
1c65c56970 pre-release 2009-01-26 13:14:22 +00:00
Alasdair Kergon
ffa1b19e26 Add an "all" field which expands to all fields of the report type.
For example in LVM2, "pv_all" gives all PV fields.
"seg_all" gives all LV segment fields.

"all" gives all fields of the final report type.  I think this is more
useful than just adding the current prefix.

So "lvs -o seg_all" gives all the LV segment fields, whilst
"lvs --segments -o all" adds in LV and VG fields too.

"lvs -o all -O vg_name" has report type LVS+VGS so includes all LV and all
VG fields.
2009-01-10 03:01:35 +00:00
prajnoha
a479761be5 Add checks for device names in dmsetup and show proper error messages.
Checks added for DM device names to allow only names < DM_NAME_LEN,
otherwise a part of lengthy name would be silently ignored and could
cause confusion while using dmsetup. Also, the name should not contain
'/' character, if it is used in context of creating a new device
or renaming the existing one (because we do not consider full path
to devices, they do not exist in filesystem yet) and appropriate error
messages are shown.
2009-01-07 12:17:40 +00:00
Zdeněk Kabeláč
77ac863bb8 Replace _dm_snprintf with EMIT_PARAMS macro for creating target lines 2008-12-11 16:25:51 +00:00
Alasdair Kergon
281ee1c2bf post-release (retrospective) 2008-11-19 14:14:51 +00:00
Alasdair Kergon
4a1cd0d391 First test release of the merged code base. 2008-11-10 12:39:50 +00:00
Alasdair Kergon
43924e31b8 Split out dm-logging.h from log.h 2008-10-30 17:24:04 +00:00
Alasdair Kergon
ba7253eaf7 Use lvm-types.h 2008-10-30 15:11:16 +00:00
Alasdair Kergon
f5585e9252 Add usrsbindir to configure. 2008-10-07 19:08:46 +00:00
Alasdair Kergon
797d0f1ef1 post-release 2008-09-18 20:09:51 +00:00
Alasdair Kergon
026cc120e7 Only resume devices in dm_tree_preload_children if size changes. 2008-09-18 18:34:53 +00:00
Alasdair Kergon
874f42ad6c Extend deptree buffers so the largest possible device numbers fit. 2008-09-02 12:16:07 +00:00
Zdeněk Kabeláč
7487a7c988 Added generation of the versioned libdevmapper-event.so for LVM's test 2008-06-27 15:36:51 +00:00
Alasdair Kergon
a8c5758222 Underline longer report help text headings. 2008-06-25 19:52:52 +00:00
Alasdair Kergon
ac1373653c post-release 2008-06-25 14:44:00 +00:00
Alasdair Kergon
b097aa787b pre-commit 2008-06-25 14:24:17 +00:00
Alasdair Kergon
723be0fe69 Align struct memblock in dbg_malloc for sparc. 2008-06-25 14:10:33 +00:00
Alasdair Kergon
65f0656f54 Add --rows to dmsetup. 2008-06-24 22:53:48 +00:00
Alasdair Kergon
366e89bda0 dmsetup --unquoted 2008-06-24 20:16:47 +00:00
Jim Meyering
946d8ee046 avoid compiler warning about cast in OFFSET_OF macro
* dmsetup/dmsetup.c (OFFSET_OF): Use an equivalent definition
that does not cast a pointer value to a narrower type.
2008-06-18 10:19:25 +00:00
Alasdair Kergon
fe74f013e3 Fix inverted no_flush debug message. (mpatocka) 2008-06-10 11:19:19 +00:00
Alasdair Kergon
5c34f7847e bring list.h into line with lvm2 2008-06-08 14:53:51 +00:00
Alasdair Kergon
4d52c9233b . 2008-06-06 20:45:41 +00:00
Alasdair Kergon
2f02f1518a Bring configure.in into line with the lvm2 version. 2008-06-06 20:33:13 +00:00
Alasdair Kergon
6a336dfc69 post-release 2008-06-06 19:28:35 +00:00
Alasdair Kergon
35dec1b9e4 pre-release 2008-06-06 19:09:19 +00:00
Alasdair Kergon
599fe39749 nameprefixes 2008-06-06 18:53:26 +00:00
Alasdair Kergon
44f3fcb238 change --prefixes to --nameprefixes 2008-06-06 18:53:08 +00:00
Alasdair Kergon
6196ac7995 Initialise params buffer to empty string in _emit_segment. 2008-06-05 19:10:35 +00:00
Alasdair Kergon
0c6271dabc Skip add_dev_node when ioctls disabled.
Make dm_hash_iter safe against deletion.
Accept a NULL pointer to dm_free silently.
2008-05-21 16:14:46 +00:00
Alasdair Kergon
93cda8b6ec Add 3 new reporting colums: tables_loaded, readonly, suspended. 2008-04-21 13:16:30 +00:00
Alasdair Kergon
bb5e930684 Add --prefixes to dmsetup
E.g. dmsetup info -c --prefixes

Again, might change the name of this option.
2008-04-21 11:59:22 +00:00
Alasdair Kergon
a636299680 Add field name prefix option to reporting functions. 2008-04-20 00:11:08 +00:00
Alasdair Kergon
08e5bd5b72 Calculate string size within dm_pool_grow_object. 2008-04-19 15:50:18 +00:00
Alasdair Kergon
b59fce4393 post-release 2008-04-10 18:04:31 +00:00
Alasdair Kergon
8674a25eb8 pre-release 2008-04-10 18:00:45 +00:00
Jim Meyering
ed56aed8eb Remove redundant if-before-free tests. 2008-02-15 14:14:58 +00:00
Alasdair Kergon
05ed5c0d74 Use log_warn for reporting field help text instead of log_print. 2008-01-20 01:14:38 +00:00
Jonathan Earl Brassow
0336bc9de9 - The automatic log module loading patch proposed for the upstream kernel
works on '-'s, not '_'s.  This is due to the preference to have log
  module file names that do not mix '_'s and '-'s.
2008-01-15 22:48:11 +00:00
Alasdair Kergon
48ba9734aa post-release 2007-12-20 15:16:14 +00:00
Alasdair Kergon
897fc59f72 pre-release 2007-12-20 15:12:57 +00:00
Alasdair Kergon
50827a5f69 more readahead node fixes/debug messages 2007-12-14 19:49:27 +00:00
Alasdair Kergon
2d6444c924 Fix deptree to pass new name to _resume_node after a rename. 2007-12-14 17:57:04 +00:00
Alasdair Kergon
1d2675d9aa Add node operation stack debug messages. 2007-12-14 17:26:09 +00:00
Alasdair Kergon
ad98990a8e Report error when empty device name passed to readahead functions. 2007-12-13 02:25:45 +00:00
Alasdair Kergon
556a4a2395 clarify 2007-12-05 22:45:56 +00:00
Alasdair Kergon
fb806f61d4 Fix minimum readahead debug message. 2007-12-05 18:57:34 +00:00
Alasdair Kergon
6ce306661c post-release 2007-12-05 17:14:30 +00:00
Alasdair Kergon
3c08ff94d4 pre-release 2007-12-05 17:05:04 +00:00
Alasdair Kergon
82bb0e8dda fix ioctls to use long not int
update dm-ioctl.h after compat tidy-up
2007-12-05 14:11:26 +00:00
Alasdair Kergon
49b2006824 add read_ahead functions to library and dmsetup --readahead
(Not live yet.)
2007-11-27 20:57:05 +00:00
Petr Rockai
8c6f96faab Fix a possible double-free in libdevmapper-event. 2007-11-27 12:26:06 +00:00
Alasdair Kergon
ceec4455df Add DM_READ_AHEAD_MINIMUM_FLAG 2007-11-12 20:47:18 +00:00
Alasdair Kergon
ccb85cc719 Define DM_READ_AHEAD_AUTO and DM_READ_AHEAD_NONE. 2007-11-09 16:52:36 +00:00
Alasdair Kergon
a3d3ce82e4 Fix configure --with-dmeventd-path substitution. 2007-10-10 00:02:03 +00:00
Jim Meyering
d4b1003a97 Allow $DM_DEV_DIR envvar to override default of "/dev".
* dmsetup/dmsetup.c (DEV_PATH): Remove definition.
(parse_loop_device_name): Add parameter: dev_dir.
Declare the "dev" parameter to be "const".
Use dev_dir, not DEV_PATH.  Handle the case in which dev_dir
does not end in a "/".
(_get_abspath): Declare "path" parameter "const", to match.
(_process_losetup_switches): Add parameter: dev_dir.
Pass dev_dir to parse_loop_device_name.
(_process_switches): Add parameter: dev_dir.
Pass dev_dir to _process_losetup_switches.
(main): Set dev_dir from the DM_DEV_DIR envvar, else to "/dev".
Call dm_set_dev_dir.
* lib/libdm-common.c (dm_set_dev_dir): Rewrite to be careful
about boundary conditions, now that dev_dir may be tainted.
* man/dmsetup.8: Mention $DM_DEV_DIR.


Author: Jim Meyering <meyering@redhat.com>
2007-10-09 12:14:48 +00:00
Jim Meyering
c8c4dbb409 Create a symlink, e.g., libdevmapper.so.1.02, in the build dir,
alongside the .so file.  This helps build dynamically linked LVM.

* lib/Makefile.in (VERSIONED_SHLIB): Define.
* make.tmpl.in (TARGETS): Append $(VERSIONED_SHLIB).
($(VERSIONED_SHLIB)): New rule.


Author: Jim Meyering <jim@meyering.net>
2007-09-18 13:02:58 +00:00
Jim Meyering
06c69c56ba Avoid static link failure with some SELinux libraries. 2007-08-21 20:32:29 +00:00
Alasdair Kergon
ebc26c7421 Remove obsolete dmfs code from tree and update INSTALL. 2007-08-21 18:41:58 +00:00
Alasdair Kergon
a50957443e post-release 2007-08-21 17:03:07 +00:00
Alasdair Kergon
a6a52a128b pre-release 2007-08-21 16:33:18 +00:00
Alasdair Kergon
1ad58e1121 Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-21 16:26:07 +00:00
Alasdair Kergon
fbccd12924 Update to use autoconf 2.61, while still supporting 2.57. 2007-08-14 19:11:31 +00:00
Alasdair Kergon
541ea4dc63 improve changelog 2007-08-06 13:09:46 +00:00
Petr Rockai
eec17858c4 Fix a possible segfault in libdevmapper-event. Thanks to Brian J. Wood
for noticing this.
2007-08-02 22:31:59 +00:00
Jim Meyering
4d418dee0e Export dm_create_dir (was create_dir) to help fix LVM2 link error
* lib/libdm-file.c (dm_create_dir): Rename from create_dir.
* lib/libdevmapper.h (dm_create_dir): Declare.
* lib/.exported_symbols: Add dm_create_dir.
* lib/ioctl/libdm-iface.c (_create_control): Update sole use.
Patch by Jun'ichi Nomura.  Details in
http://www.redhat.com/archives/lvm-devel/2007-July/msg00040.html
2007-07-28 10:48:36 +00:00
Jim Meyering
06fe319347 Make the libdevmapper version of create_dir equivalent to the LVM2 one.
(_create_dir_recursive): Refrain from logging a mkdir failure due to EROFS.
Patch by Jun'ichi Nomura.
2007-07-28 10:27:34 +00:00
Jim Meyering
9dd7e3fb24 Introduce log_sys_* macros from LVM2.
Convert existing "<string>: <function> failed: <strerror>" type messages
to use this macro.  Patch by Jun'ichi Nomura.
2007-07-28 10:23:02 +00:00
Jim Meyering
6fa6ce35da libdevmapper, dmeventd: be paranoid about detecting write failure
* dmeventd/dmeventd.c (_set_oom_adj): When writing to /proc/self/oom_adj,
detect failure even if it's hidden behind ferror.  [Using dm_fclose's
extra ferror test here is probably not needed, since the amount written
is nowhere near BUFSIZ, but use it regardless, for consistency. ]
* lib/fs/libdevmapper.c (do_suspend): Detect fclose failure when
writing to suspend.
2007-07-24 14:16:48 +00:00
Jim Meyering
b14b97599d dm_fclose: new function
* lib/libdevmapper.h: Declare it.
* lib/libdm-file.c (dm_fclose): Define it.
* lib/.exported_symbols: Add dm_fclose.
2007-07-24 14:15:45 +00:00
Alasdair Kergon
cbfe6e8fcc post-release 2007-07-13 16:10:24 +00:00
Alasdair Kergon
5571ff35d8 pre-release 2007-07-13 16:07:30 +00:00
Petr Rockai
5ee976d276 Make warnings go to stderr. Adds log_warn macro for that purpose,
log_print continues to print to stdout.
2007-06-28 17:27:02 +00:00
Alasdair Kergon
094e9fb45d Fix dmsetup -o devno string termination. (1.02.20) 2007-06-19 15:47:20 +00:00
Alasdair Kergon
972dc39d00 post-release 2007-06-15 20:49:30 +00:00
Alasdair Kergon
dd2a3f40e1 pre-release 2007-06-15 19:05:02 +00:00
Alasdair Kergon
78f76c1690 Fix default dmsetup report buffering and add --unbuffered.
Add tree-based and dependency fields to dmsetup reports.
2007-06-15 18:20:28 +00:00
Alasdair Kergon
2155c93426 Add capability for tree-based fields to dmsetup reports. 2007-06-11 13:20:29 +00:00
Alasdair Kergon
3934c1d437 post-release 2007-04-27 20:58:45 +00:00
Alasdair Kergon
e366b68ad3 pre-release 2007-04-27 20:47:14 +00:00
Alasdair Kergon
a249de3b72 Standardise protective include file #defines. 2007-04-27 19:07:43 +00:00
Alasdair Kergon
b9f5a18a76 Add regex functions to library. 2007-04-27 18:40:23 +00:00
Alasdair Kergon
d7ba0e01a5 Avoid trailing separator in reports when there are hidden sort fields. 2007-04-27 15:22:27 +00:00
Alasdair Kergon
b6172b53fd Fix segfault in 'dmsetup status' without --showkeys against crypt target. [nec] 2007-04-27 15:12:26 +00:00
Alasdair Kergon
477ec611d5 Deal with some more compiler warnings. Hope this doesn't break anything... 2007-04-27 14:52:41 +00:00
Petr Rockai
228486a971 Fix some memory leaks in dmeventd. 2007-04-23 15:06:03 +00:00
Alasdair Kergon
369ab1e0b2 Introduce _add_field() and _is_same_field() to libdm-report.c. 2007-04-19 20:24:00 +00:00
Milan Broz
2e21519a10 Fix libdevmapper-event memory leaks 2007-04-19 19:10:19 +00:00
Alasdair Kergon
bf83527b64 Remove unnecessary memset() return value checks. [Jim Meyering] 2007-03-16 14:36:14 +00:00
Alasdair Kergon
b1b6c97f7c Fix a few leaks in reporting error paths. 2007-02-14 15:12:16 +00:00
Alasdair Kergon
baee28ab5c post-release 2007-02-13 16:16:15 +00:00
Alasdair Kergon
83edf68ff9 pre-release 2007-02-13 16:12:24 +00:00
Alasdair Kergon
a223c3fea3 Improve dmeventd messaging protocol: drain pipe and tag messages. 2007-02-02 17:08:51 +00:00
Alasdair Kergon
b881c372bc post-release 2007-01-29 20:25:19 +00:00
Alasdair Kergon
94c5e7deb0 pre-release 2007-01-29 19:57:24 +00:00
Alasdair Kergon
c344766f3c Add recent reporting options to dmsetup man page.
Revise some report fields names.
2007-01-29 19:35:24 +00:00
Alasdair Kergon
cd79e58eda Add dmsetup 'help' command and update usage text. 2007-01-29 18:18:41 +00:00
Alasdair Kergon
6fa801f3d8 reorder report field definitions 2007-01-29 17:45:32 +00:00
Alasdair Kergon
684eecba1d Use fixed-size fields in report interface. 2007-01-29 17:23:54 +00:00
Alasdair Kergon
80ed029c17 post-release 2007-01-25 23:40:33 +00:00
Alasdair Kergon
34a74e81e3 pre-release 2007-01-25 23:36:59 +00:00
Alasdair Kergon
d851289d8a Add some missing close() and fclose() return value checks. 2007-01-25 14:16:20 +00:00
Alasdair Kergon
d6d597e3dd Migrate dmsetup column-based output over to new libdevmapper report framework. 2007-01-24 18:09:07 +00:00
Alasdair Kergon
9b021ba057 Add descriptions to reporting field definitions. 2007-01-23 19:18:52 +00:00
Alasdair Kergon
b1d32a03c7 add a dso-private variable to dmeventd interface
more inline docn
2007-01-23 17:38:39 +00:00
Alasdair Kergon
63e4217271 Add dm_event_handler_[gs]et_timeout functions.
Streamline dm_report_field_* interface.
2007-01-22 15:03:57 +00:00
Alasdair Kergon
2d74110feb Add cmdline debug & version options to dmeventd.
Fix oom_adj handling.
2007-01-19 17:22:17 +00:00
Alasdair Kergon
19d102082d Add DM_LIB_VERSION definition to configure.h. 2007-01-19 15:53:01 +00:00
Alasdair Kergon
82980149fa Suppress 'Unrecognised field' error if report field is 'help'. 2007-01-18 22:15:04 +00:00
Alasdair Kergon
26376ac1c9 Some internal renaming.
Add --separator and --sort to dmsetup (unused as yet).
Make alignment flag optional when specifying report fields.
2007-01-18 17:47:58 +00:00
Alasdair Kergon
8459f99341 post-release 2007-01-17 17:56:15 +00:00
Alasdair Kergon
e5bdb0e0b5 pre-release 2007-01-17 17:51:51 +00:00
Alasdair Kergon
954bd9257b Add basic reporting functions to libdevmapper. 2007-01-16 18:04:15 +00:00
Alasdair Kergon
f48648552e Fix a malloc error path in dmsetup message. 2007-01-15 22:05:50 +00:00
Alasdair Kergon
3184ff75c4 More libdevmapper-event interface changes and fixes.
Rename dm_saprintf() to dm_asprintf().
2007-01-15 18:21:01 +00:00
Alasdair Kergon
43243f4d30 Report error if NULL pointer supplied to dm_strdup_aux(). 2007-01-15 14:39:12 +00:00
Alasdair Kergon
02bf389425 Reinstate dm_event_get_registered_device 2007-01-12 20:22:11 +00:00
Alasdair Kergon
bcb9a3dd04 post-release 2007-01-11 23:19:08 +00:00
Alasdair Kergon
cce3baa275 pre-release 2007-01-11 22:49:43 +00:00
Alasdair Kergon
d554b2bc94 Lots of dmeventd-related changes. 2007-01-11 21:54:53 +00:00
Alasdair Kergon
c1952bf257 Use CFLAGS when linking so mixed sparc builds can supply -m64. 2007-01-11 16:23:22 +00:00
Alasdair Kergon
7831665417 Add dm_tree_use_no_flush_suspend(). 2007-01-09 19:44:07 +00:00
Alasdair Kergon
cbdccf0a9c Lots of dmevent changes.
Export dm_basename().
Cope with a trailing space when comparing tables prior to possible reload.
2007-01-08 15:18:52 +00:00
Alasdair Kergon
66e623fb2a Fix dmeventd mirror to cope if monitored device disappears. 2006-12-20 14:35:02 +00:00
Alasdair Kergon
a40c7dff5d post-release 2006-11-28 22:51:01 +00:00
Alasdair Kergon
e8e00630d3 pre-release 2006-11-28 22:49:58 +00:00
Alasdair Kergon
e33720c854 Update dmsetup man page (setgeometry & message) 2006-11-23 20:34:16 +00:00
Alasdair Kergon
3cd2f28975 getline debug free 2006-10-19 16:50:05 +00:00
Alasdair Kergon
2179a72c3a Suppress encryption key in 'dmsetup table' output unless --showkeys supplied. 2006-10-19 15:34:50 +00:00
Alasdair Kergon
f4c582472b post-release.
Note that I've dropped the 2.4 kernel files from the release tarballs now.
2006-10-13 19:01:30 +00:00
Alasdair Kergon
1485586f7e pre-release 2006-10-13 18:43:53 +00:00
Alasdair Kergon
d5c9024335 Avoid deptree attempting to suspend a device that's already suspended. 2006-10-13 14:03:35 +00:00
Alasdair Kergon
897ff3161f post-release 2006-10-12 18:20:45 +00:00
Alasdair Kergon
32d9126094 . 2006-10-12 17:42:40 +00:00
Alasdair Kergon
db43314e50 missing mesg 2006-10-12 17:41:21 +00:00
Alasdair Kergon
68d2baeb65 pre-release 2006-10-12 17:37:42 +00:00
Alasdair Kergon
45abade7fc Add suspend noflush support.
Add basic dmsetup loop support.
2006-10-12 15:42:25 +00:00
Alasdair Kergon
c42c8c5192 Test. Future commit messages should now also go to the dm-devel list
(450 subscribers) for discussion as well as the read-only dm-cvs list
(just 15 subscribers).
2006-10-03 21:51:28 +00:00
Alasdair Kergon
29eb92446e post-release 2006-09-19 17:50:58 +00:00
Alasdair Kergon
ae6918742e pre-release 2006-09-19 17:43:03 +00:00
Alasdair Kergon
8d98b02ba2 Add dm_snprintf 2006-08-21 12:52:39 +00:00
Alasdair Kergon
a93fe79bc4 Add dm_split_words() and dm_split_lvm_name() to libdevmapper. 2006-08-21 12:07:03 +00:00
Alasdair Kergon
a945f1fde2 reorder bounds check code 2006-08-18 21:38:58 +00:00
Alasdair Kergon
8607a74206 post-release 2006-08-15 17:43:10 +00:00
Alasdair Kergon
8339f3ceb3 pre-release 2006-08-15 17:38:38 +00:00
Alasdair Kergon
81f4813c29 Add --table argument to dmsetup for a one-line table.
Abort if errors are found during cmdline option processing.
2006-08-10 14:11:03 +00:00
Alasdair Kergon
54fb2ebbe0 Add lockfs indicator to debug output. 2006-08-08 21:22:31 +00:00
Alasdair Kergon
05dd42f443 post-release 2006-07-17 14:39:54 +00:00
Alasdair Kergon
36d816d5cb pre-release 2006-07-17 14:32:00 +00:00
Alasdair Kergon
f9eb4e7487 test 2006-07-05 21:07:35 +00:00
Alasdair Kergon
d0b9f33aeb test 2006-07-05 21:03:15 +00:00
Alasdair Kergon
718583b241 Append full patch to checkin emails. 2006-07-05 21:01:06 +00:00
Alasdair Kergon
6737127e9a Avoid duplicate dmeventd subdir with 'make distclean'. 2006-07-05 17:29:12 +00:00
Alasdair Kergon
1e4b82cc94 Add --force to dmsetup remove* to load error target. [Untested.]
Update dmsetup man page.
2006-06-18 11:35:04 +00:00
Alasdair Kergon
3426f31184 dmsetup remove_all also performs mknodes. 2006-06-17 16:12:41 +00:00
Alasdair Kergon
b4fb7af1df Don't suppress identical table reloads if permission changes. 2006-06-14 22:00:03 +00:00
Alasdair Kergon
a564ca82be Fix corelog segment line.
Suppress some compiler warnings.
2006-05-16 16:20:29 +00:00
Alasdair Kergon
abe3cfcf41 post-release 2006-05-12 20:32:39 +00:00
Alasdair Kergon
6a09e64195 Pre-release. 2006-05-11 20:24:07 +00:00
Alasdair Kergon
d3f2f00c25 Add DM_CORELOG flag to dm_tree_node_add_mirror_target(). 2006-05-11 19:10:55 +00:00
Alasdair Kergon
bacfb913a0 Avoid a dmeventd compiler warning. 2006-05-11 19:08:02 +00:00
Alasdair Kergon
abf67914c4 post-release 2006-05-10 20:46:28 +00:00
Alasdair Kergon
127884e9dd pre-release 2006-05-10 20:14:15 +00:00
Alasdair Kergon
654f5049eb Move DEFS into configure.h.
Remove dmsetup line buffer limitation.
2006-05-10 19:38:25 +00:00
Alasdair Kergon
b8d32a0d33 coverity fixes 2006-05-10 16:23:41 +00:00
Alasdair Kergon
800f747570 Increase dmsetup line buffer to 4k. 2006-04-19 20:43:30 +00:00
Alasdair Kergon
d1ecebdb52 post-release 2006-04-19 17:21:39 +00:00
Alasdair Kergon
3bf190c8ab update version 2006-04-19 16:41:03 +00:00
Alasdair Kergon
db88210289 configure/makefile tidying + pkg-config support. 2006-04-19 15:23:10 +00:00
Alasdair Kergon
d2e0d96cc3 post-release 2006-04-14 21:39:32 +00:00
Alasdair Kergon
3feba82ccc pre-release 2006-04-14 21:11:38 +00:00
Alasdair Kergon
30323b253f Bring dmsetup man page up-to-date. 2006-04-06 16:20:40 +00:00
Alasdair Kergon
abed57cb53 Use name-based device refs if kernel doesn't support device number refs.
Fix memory leak (struct dm_ioctl) when struct dm_task is reused.
2006-04-03 15:56:02 +00:00
Alasdair Kergon
c01a800a6b If _create_and_load_v4 fails part way through, revert the creation. 2006-03-30 15:15:47 +00:00
Alasdair Kergon
5d02f60bde dmeventd thread/fifo fixes. 2006-03-09 21:33:59 +00:00
Alasdair Kergon
42635c3938 Add file & line to dm_strdup_aux(). 2006-02-23 19:11:51 +00:00
Alasdair Kergon
ed43dc842b A setgeometry implementation. [untested] 2006-02-20 23:55:58 +00:00
Alasdair Kergon
49d4db6cd2 post-release 2006-02-08 23:24:02 +00:00
Alasdair Kergon
846befa7e0 release 2006-02-07 16:33:48 +00:00
Alasdair Kergon
ed036598a9 Add exported functions to set uid, gid and mode. [Bastian Blank] 2006-02-03 14:23:22 +00:00
Alasdair Kergon
d031a374f9 Rename _log to dm_log and export.
Fix misc compile-time warnings.
2006-01-31 14:50:38 +00:00
Alasdair Kergon
55f69c98cb Add dm_tree_skip_lockfs. 2006-01-30 23:36:04 +00:00
Alasdair Kergon
efe1c8a070 Fix dm_strdup debug definition. 2006-01-10 22:19:41 +00:00
Alasdair Kergon
1575844344 Fix hash function to avoid using a negative array offset. 2006-01-09 20:35:24 +00:00
Alasdair Kergon
57442db759 Don't inline _find in hash.c and tidy signed/unsigned etc. 2006-01-04 16:07:27 +00:00
Alasdair Kergon
96f259726c Fix dmsetup version driver version 2006-01-03 20:53:57 +00:00
Alasdair Kergon
a82775f544 Add sync, nosync and block_on_error mirror log parameters.
Add hweight32.
2005-12-13 15:49:27 +00:00
Alasdair Kergon
cf703b0433 Fix dmeventd build. 2005-12-05 11:16:48 +00:00
Alasdair Kergon
370f368b1a post-release 2005-12-02 17:24:06 +00:00
Alasdair Kergon
8288b45b4f 1.02.02 2005-12-02 15:44:18 +00:00
Alasdair Kergon
fe529faf8e dmeventd 2005-12-02 15:41:14 +00:00
Alasdair Kergon
9aa3465513 Export dm_task_update_nodes.
Use names instead of numbers in messages when ioctls fail.
2005-12-01 23:11:41 +00:00
Alasdair Kergon
6c70fc1a6c Add some FIXMEs to libdm-event. 2005-11-30 18:35:03 +00:00
Alasdair Kergon
5d2615c56f post-release 2005-11-23 18:44:59 +00:00
Alasdair Kergon
dcb8415b7a 1.02.01 2005-11-23 18:36:33 +00:00
Alasdair Kergon
6db4dcff7a Drop leading zeros from dm_format_dev.
Suppress attempt to reload identical table.
2005-11-22 18:43:12 +00:00
Alasdair Kergon
3eeaef00ec Additional LVM- prefix matching for transitional period. 2005-11-12 22:46:48 +00:00
Alasdair Kergon
5146641848 post-release 2005-11-10 16:06:29 +00:00
Alasdair Kergon
cdd0ac42cf pre-release 2005-11-10 15:27:19 +00:00
Alasdair Kergon
0b43754d60 rename deptree 2005-11-09 14:10:50 +00:00
Alasdair Kergon
17d13dd084 Also suppress error if device doesn't exist with DM_DEVICE_STATUS. 2005-10-26 17:51:10 +00:00
Alasdair Kergon
2e8a9c9874 Export dm_set_selinux_context. 2005-10-25 17:30:00 +00:00
Alasdair Kergon
e8af32ec2b dm_driver_version 2005-10-17 18:05:39 +00:00
Alasdair Kergon
251d138474 export bitset, pool, hash, malloc 2005-10-16 22:57:20 +00:00
Alasdair Kergon
f569abd28a Code to build and display device dependency tree. 2005-10-16 14:33:22 +00:00
Alasdair Kergon
088f9687c0 Add dmsetup --nolockfs support for suspend/reload.
Requires kernel patches to have any effect.
Library version incremented.
2005-10-04 20:12:32 +00:00