Peter Rajnoha
584d1fb7d1
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
9c20c7af59
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
9abf5e70be
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
eb82f939ee
Fix hash lookup segfault when keys compared are different lengths.
2009-11-03 00:45:35 +00:00
Peter Rajnoha
b040e267a2
Cleanup of previous commit with latest changes in udev support code.
2009-10-26 21:38:35 +00:00
Peter Rajnoha
421671b1c2
Several changes to udev support code:
...
- we have these levels when the udev rules are processed:
10-dm.rules --> [11-dm-<subsystem>.rules] --> [12-dm-permissions.rules] -->
13-dm-disk.rules --> [...all the other foreign rules...] --> 95-dm-notify.rules
- each level can be disabled now by
DM_UDEV_DISABLE_{DM, SUBSYSTEM, DISK, OTHER}_RULES_FLAG
- add DM_UDEV_DISABLE_DM_RULES_FLAG to disable 10-dm.rules
- add DM_UDEV_DISABLE_OTHER_RULES_FLAG to disable all the other (non-dm) rules.
We cutoff these rules by using the 'last_rule', so this one should really be
used with great care and in well-founded situations. We use this for lvm's
hidden and layer devices now.
- add a parameter for add_dev_node, rm_dev_node and rename_dev_node so it's
possible to switch on/off udev checks
- use DM_UDEV_DISABLE_DM_RULES_FLAG and DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG
if there's no cookie set and we have resume, remove and rename ioctl.
This could happen when someone uses the libdevmapper that is compiled with
udev_sync but the software does not make use of it. This way we can switch
off the rules and fallback to libdevmapper node creation so there's no
udev/libdevmapper race.
2009-10-26 14:29:33 +00:00
Peter Rajnoha
f16aea9ebd
Use udev flags support in LVM and provide dm_tree_add_new_dev_with_udev_flags wrapper for dm_tree_add_new_dev.
2009-10-22 13:00:07 +00:00
Peter Rajnoha
5f1f31f942
Add udev flags support in libdevmapper and provide 'dmsetup udevflags' command to decode them.
2009-10-22 12:55:47 +00:00
Fabio M. Di Nitto
2cec0e4562
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
e1b8a236b7
Only include selinux libs in libdevmapper.pc when selinux build enabled.
2009-10-05 12:11:30 +00:00
Alasdair Kergon
db8b5af9d9
Allow for a build directory separate from the source.
2009-10-02 19:10:31 +00:00
Alasdair Kergon
2b33edfcf7
missing dm_snprintf
2009-09-25 19:06:05 +00:00
Alasdair Kergon
536f0e0881
pre-release
2009-09-25 18:30:27 +00:00
Alasdair Kergon
42870d441d
ensure dm_strdup succeeds
2009-09-25 18:19:09 +00:00
Alasdair Kergon
c0b23a1491
remove unused var & rename fn
2009-09-25 18:13:17 +00:00
Alasdair Kergon
1178220354
Handle any path supplied to dm_task_set_name() by looking up in /dev/mapper.
2009-09-25 18:08:04 +00:00
Peter Rajnoha
96e46b8edb
Use the same default umask for /dev dirs (DM_DEV_DIR_UMASK).
2009-09-25 11:58:00 +00:00
Jonathan Earl Brassow
3c74075fb1
'_emit_areas_line' returns 1 for success and 0 for failure. This always
...
confuses me, so I've added a comment at the top of the function to
remind me of this.
I also found that 'mirror_emit_segment_line' was returning 0 (return_0)
on failure /and/ success. It now returns 1 for success and 0 for failure -
just like '_emit_areas_line' and its calling function, '_emit_segment_line'.
2009-09-22 16:26:59 +00:00
Alasdair Kergon
6087b1581d
dm release cleanup
2009-09-15 11:41:38 +00:00
Peter Rajnoha
221b941eb5
Move dm_cookie_supported check into dm_udev_get_sync_supprt function.
...
We don't have to call dm_cookie_supported with dm_udev_get_sync_support
this way. Also, it's necessary for the current code to work properly on
systems without cookie support (older kernels).
2009-09-11 16:11:25 +00:00
Peter Rajnoha
9b77df2ae7
Add one define that is necessary for older (experimental) libudev to work.
2009-09-11 15:57:51 +00:00
Peter Rajnoha
93d1fdba4b
Check that udev is running and set internal state appropriately.
2009-09-11 15:56:06 +00:00
Dave Wysochanski
5f1c57d008
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
afa8ea4078
Cluster log server (clogd): Add new build files.
...
Might be a good idea to add the new files to the repository. :(
2009-08-13 20:51:41 +00:00
Jonathan Earl Brassow
8f26e18c13
Cluster log daemon (clogd): use LVM bitops in place of ext2 bitops
...
Eliminate dependency on outside library, since the same functionality
exists in our tree.
[It is important that the bitops work in the same way, as the bitmaps
must remain backwards compatible. I haven't tested every architecture,
but the x86* archs work. My test involved using the old ext2fsprogs
bitops, memcpy'ing the bits over to the LVM bitset array and ensuring
that only the bits set via the old methods were set.]
2009-08-13 16:31:01 +00:00
Alasdair Kergon
7cec175dfc
pre-release
2009-08-06 17:08:01 +00:00
Peter Rajnoha
f9ff23dffe
Add 'udevcomplete_all' command for dmsetup. Export DM_COOKIE_MAGIC in libdevmapper.h.
2009-08-06 15:04:30 +00:00
Peter Rajnoha
2be430435f
Fix failure situations in dm_task_run for udev sync.
2009-08-06 15:02:01 +00:00
Peter Rajnoha
1879e85672
Detect udev problems in _rename_dev_node.
2009-08-06 15:00:25 +00:00
Alasdair Kergon
fa5617d7f5
Additional logging
2009-08-05 19:50:08 +00:00
Alasdair Kergon
252239bdac
Add default udev rules.
...
Update dm-ioctl.h comments.
2009-08-03 18:44:54 +00:00
Alasdair Kergon
f9e17e36aa
Add udev checks.
2009-08-03 18:33:08 +00:00
Alasdair Kergon
a74be32bf6
Manage without dm_udev_cleanup?
2009-08-03 18:01:45 +00:00
Alasdair Kergon
f86117e3d5
cleanup some ignored return values & 'stack's
2009-08-03 11:20:15 +00:00
Alasdair Kergon
b59c9854e8
deal with error-related FIXMEs
2009-08-03 11:01:26 +00:00
Alasdair Kergon
bd90c6b2c2
Set cookies in activation code and wait for udev to complete processing.
2009-07-31 18:30:31 +00:00
Alasdair Kergon
2c0dfdf839
Add udevcomplete and --noudevwait to dmsetup.
2009-07-31 17:51:45 +00:00
Alasdair Kergon
b634751cc4
another fixme
2009-07-31 16:57:06 +00:00
Alasdair Kergon
4d8c4ea7e6
Add libdevmapper functions to support synchronisation with udev.
2009-07-31 15:53:11 +00:00
Alasdair Kergon
9fac443591
Add log_errno to set a specific errno and replace log_error in due course.
2009-07-16 00:52:06 +00:00
Alasdair Kergon
b8f47d5f69
Use log_error macro consistently throughout in place of log_err.
2009-07-15 20:02:46 +00:00
Alasdair Kergon
eac6599c5e
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
a9cb6969b0
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
609faae9a5
Fix whitespace in linear target line to fix identical table line detection.
...
(only tested with linear so far)
2009-07-07 16:36:05 +00:00
Alasdair Kergon
4b2cae463e
Add device number to more log messages during activation.
2009-07-03 12:45:55 +00:00
Milan Broz
6391d03f54
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
12ca060e9f
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
c9ee46569c
Make mempool optional in dm_split_lvm_name()
2009-06-03 11:40:23 +00:00
Milan Broz
eb91c4eee3
Use suspend with flush when device size was changed during table preload.
...
This allows online mirror resize, also removes condition to preventing
code to do this.
2009-05-20 09:52:37 +00:00
Milan Broz
d828b9a4d7
Helper function to catch memory pool leaks.
2009-04-10 09:56:58 +00:00
Zdenek Kabelac
beeae21dbb
Do not create some dm and lvm static librarie when they are not requested
...
by configure option
Add dependency for static dmeventd library
2009-04-08 14:04:35 +00:00
Milan Broz
fe41c21be9
Fix debug pool grow object to properly support delta=0
...
(It prints garbage for some reports)
2009-04-02 15:02:18 +00:00
Milan Broz
aa8111b3cd
fix some issues when compiling with -D DEBUG_POOL
...
- fix compilation issues
- fix wrong pool object maipulation (lvm dumpconfig triggers assert)
- second iteration in loop _log_parallel_areas operates on non-existing object
2009-03-26 09:25:18 +00:00
Dave Wysochanski
d917c98cd8
Fix some clean rules, fix previous distclean checkin.
...
In libdm/Makefile.in, we need to cleanup the symlink properly.
Adding to CLEAN_TARGETS seemed like the simplest way to do this
in the current build framework. We could redo dependencies for
VERSIONED_SHLIB, but for now just add to CLEAN_TARGETS.
For scripts/Makefile.in, we should be adding to DISTCLEAN_TARGETS.
The generic rule in make.tmpl.in takes care of the cleanup.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Takahiro Yasui <tyasui@redhat.com>
2009-03-16 20:00:10 +00:00
Alasdair Kergon
0f817d38f7
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
Milan Broz
ea0cdd28c1
Separate PV label attributes which do not need parse metadata when reporting.
...
When reporting explicitly label attributes (pv_uuid for example), we do not
need to read metadata.
This patch separate the label fileds and removes scan_vgs_for_pvs
in process_each_pv() if not needed.
(There should be no user visible change in output.)
2009-02-09 09:45:49 +00:00
Dave Wysochanski
1a0280b313
Rename _parse_options() to _parse_fields() for naming consistency.
...
In libdm, we only ever use 'fields', while the tools use 'options' and
'fields' interchangeably.
Ideally it would be good to use 'fields' consistently everywhere.
However, 'options' most likely comes from the tool commandline '-o' and
'--options' which cannot be changed.
2009-01-19 20:53:35 +00:00
Alasdair Kergon
1c96ddd735
Add <report_type>_all to help text.
2009-01-10 03:14:24 +00:00
Alasdair Kergon
1f1aaf43ea
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
Peter Rajnoha
c48e40391b
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
Alasdair Kergon
7b6c011c54
Use dm_snprintf to avoid duplicating the snprintf compatibility code.
2008-12-12 18:45:58 +00:00
Zdenek Kabelac
ffa9b6a571
Replace _dm_snprintf with EMIT_PARAMS macro for creating target lines
2008-12-11 16:25:51 +00:00
Alasdair Kergon
cee9a8d87e
some makefile fixes for liblvm2cmd & remove some hardcoded .so
2008-11-14 20:59:56 +00:00
Alasdair Kergon
77b69aa724
make install_device-mapper
2008-11-04 17:25:32 +00:00
Alasdair Kergon
56d8844068
more fixes
2008-11-04 15:07:45 +00:00
Alasdair Kergon
e50d0e97b1
more missing bits
2008-11-04 14:57:06 +00:00
Alasdair Kergon
2c44337bd5
Right, a simple build (without options) is working again.
2008-11-03 22:14:30 +00:00
Alasdair Kergon
28f60ff82f
add list fns
2008-11-03 20:03:00 +00:00
Alasdair Kergon
3e5b6ed214
more tweaking to get things to compile - dmlib.h for log fns, list.h
2008-11-03 18:59:59 +00:00
Alasdair Kergon
597c3f8e0f
Use simple x.y.z library version in libdevmapper.pc
2008-11-01 20:48:09 +00:00
Alasdair Kergon
0782ad5002
further progress
2008-11-01 02:19:19 +00:00
Alasdair Kergon
301fd74ecf
Add dm-logging.h ready for libdevmapper.
2008-10-30 17:54:12 +00:00
Alasdair Kergon
0b1bf1f56b
Split out dm-logging.h from log.h
2008-10-30 17:24:04 +00:00
Alasdair Kergon
10a9579a63
Add libdm subdir to begin merging the device-mapper tree.
2008-10-30 15:31:33 +00:00
Alasdair Kergon
3776c4941a
Fix last checkin - tested wrong dnode.
2008-09-18 22:55:33 +00:00
Alasdair Kergon
bb875bb9e4
Only resume devices in dm_tree_preload_children if size changes.
2008-09-18 18:34:53 +00:00
Alasdair Kergon
7d7d93ac6c
Extend deptree buffers so the largest possible device numbers fit.
2008-09-02 12:16:07 +00:00
Alasdair Kergon
b6943304c9
Underline longer report help text headings.
2008-06-25 19:52:52 +00:00
Alasdair Kergon
6e1898a5a2
pre-commit
2008-06-25 14:24:17 +00:00
Alasdair Kergon
9070816ebb
Align struct memblock in dbg_malloc for sparc.
2008-06-25 14:10:33 +00:00
Alasdair Kergon
aa882ea539
Cope with missing field values.
2008-06-25 00:10:36 +00:00
Alasdair Kergon
ca8d363d2c
Add --rows to dmsetup.
2008-06-24 22:53:48 +00:00
Alasdair Kergon
f1839ac87c
dmsetup --unquoted
2008-06-24 20:16:47 +00:00
Alasdair Kergon
afbf31eba9
Fix inverted no_flush debug message. (mpatocka)
2008-06-10 11:19:19 +00:00
Alasdair Kergon
2bd5b63f4a
rename some config vars
2008-06-06 20:44:35 +00:00
Alasdair Kergon
9df5c6e987
switch to single quotes rather than double for nameprefixes
2008-06-06 19:07:47 +00:00
Alasdair Kergon
12ea7cb133
Initialise params buffer to empty string in _emit_segment.
2008-06-05 19:10:35 +00:00
Alasdair Kergon
b947f34393
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
c791f186ce
Add field name prefix option to reporting functions.
2008-04-20 00:11:08 +00:00
Alasdair Kergon
f44e3ff46a
Calculate string size within dm_pool_grow_object.
2008-04-19 15:50:18 +00:00
Alasdair Kergon
0b2a795ece
make list_move consistent with other list fns
2008-04-10 19:14:27 +00:00
Dave Wysochanski
43aa463780
Add list_move() support function for list manipulation.
2008-03-26 16:20:54 +00:00
Alasdair Kergon
ad1fc08312
Use log_warn for reporting field help text instead of log_print.
2008-01-20 01:14:38 +00:00
Jonathan Earl Brassow
d6d4661517
- 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
fc795d8701
more readahead node fixes/debug messages
2007-12-14 19:49:27 +00:00
Alasdair Kergon
bafa2f39cf
Fix deptree to pass new name to _resume_node after a rename.
2007-12-14 17:57:04 +00:00
Alasdair Kergon
4a41a93a7a
Add node operation stack debug messages.
2007-12-14 17:26:09 +00:00
Alasdair Kergon
3a2234162d
Report error when empty device name passed to readahead functions.
2007-12-13 02:25:45 +00:00
Alasdair Kergon
de4ddace2e
Fix minimum readahead debug message.
2007-12-05 18:57:34 +00:00
Alasdair Kergon
a8524c3942
clarify when read_ahead may be set
2007-12-05 16:28:19 +00:00
Alasdair Kergon
9a22e746b5
work out device name to use for read ahead request
2007-12-05 16:24:41 +00:00
Alasdair Kergon
fec8f8382a
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
0b7d16bc09
fixes
2007-12-03 22:48:36 +00:00
Alasdair Kergon
15d2547427
missing #include
2007-12-03 17:56:36 +00:00
Alasdair Kergon
1d4e9f245b
fix
2007-11-30 16:44:42 +00:00
Alasdair Kergon
e81af2f3fe
readahead support completed - untested
2007-11-30 16:42:26 +00:00
Alasdair Kergon
2d1eead2e8
read_ahead node ops
2007-11-30 14:59:57 +00:00
Alasdair Kergon
52b8440916
add read_ahead functions to library and dmsetup --readahead
...
(Not live yet.)
2007-11-27 20:57:05 +00:00
Alasdair Kergon
6dd60469ba
Add DM_READ_AHEAD_MINIMUM_FLAG
2007-11-12 20:47:18 +00:00
Alasdair Kergon
14772580cd
Define DM_READ_AHEAD_AUTO and DM_READ_AHEAD_NONE.
2007-11-09 16:52:36 +00:00
Jim Meyering
06b8fee542
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
4ab5b20654
Arrange for "make clean" to remove the symlink, too.
...
* make.tmpl.in ($(VERSIONED_SHLIB)): Move rule to...
* lib/Makefile.in ($(VERSIONED_SHLIB)): ...here, removing the
$(interface)/ prefix.
Reported by Milan Broz.
Author: Jim Meyering <meyering@redhat.com>
2007-10-03 10:48:27 +00:00
Jim Meyering
78ecdf8d65
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
Alasdair Kergon
1f84815c12
Remove obsolete dmfs code from tree and update INSTALL.
2007-08-21 18:41:58 +00:00
Alasdair Kergon
147d5faccf
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-21 16:26:07 +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
08c9ff434b
Add "const" attributes where possible: first cut.
2007-08-07 09:06:05 +00:00
Alasdair Kergon
ee80c0f0e3
improve changelog
2007-08-06 13:09:46 +00:00
Jim Meyering
3f311f1daa
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
1c200869d9
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
87518d850b
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
0c3cd7e292
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
Petr Rockai
ba117ad80e
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
42c798229f
Standardise protective include file #defines.
2007-04-27 19:07:43 +00:00
Alasdair Kergon
38862fcd3f
Add regex functions to library.
2007-04-27 18:40:23 +00:00
Alasdair Kergon
af998ff6c2
Avoid trailing separator in reports when there are hidden sort fields.
2007-04-27 15:22:27 +00:00
Alasdair Kergon
8d2b0f24d3
Deal with some more compiler warnings. Hope this doesn't break anything...
2007-04-27 14:52:41 +00:00
Alasdair Kergon
7b74504f40
Introduce _add_field() and _is_same_field() to libdm-report.c.
2007-04-19 20:24:00 +00:00
Alasdair Kergon
012869d6d2
Fix a few leaks in reporting error paths.
2007-02-14 15:12:16 +00:00
Alasdair Kergon
9f069f7bef
Use fixed-size fields in report interface.
2007-01-29 17:23:54 +00:00
Alasdair Kergon
820810da65
don't remove libdm-common.h any more
2007-01-25 15:45:10 +00:00
Alasdair Kergon
232da7ecc7
Add some missing close() and fclose() return value checks.
2007-01-25 14:16:20 +00:00
Alasdair Kergon
5c46d66871
Adjust report field help description layout.
2007-01-24 16:41:33 +00:00
Alasdair Kergon
66ed1bc5e1
fix earlier checkin
2007-01-23 23:58:55 +00:00
Alasdair Kergon
85feafd996
Add descriptions to reporting field definitions.
2007-01-23 19:18:52 +00:00
Alasdair Kergon
d28dfb5720
add a dso-private variable to dmeventd interface
...
more inline docn
2007-01-23 17:38:39 +00:00
Alasdair Kergon
4dcaa2300c
Add dm_event_handler_[gs]et_timeout functions.
...
Streamline dm_report_field_* interface.
2007-01-22 15:03:57 +00:00
Alasdair Kergon
866a1a0836
Add DM_LIB_VERSION definition to configure.h.
2007-01-19 15:53:01 +00:00
Alasdair Kergon
09e206d393
Suppress 'Unrecognised field' error if report field is 'help'.
2007-01-18 22:15:04 +00:00
Alasdair Kergon
122337ba0d
fix last checkin
2007-01-18 21:59:02 +00:00
Alasdair Kergon
03c6979264
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
f6af1a67b5
more little fixes
2007-01-16 21:13:07 +00:00
Alasdair Kergon
61997bb9bb
Add basic reporting functions to libdevmapper.
2007-01-16 18:04:15 +00:00
Alasdair Kergon
931d24a4b1
More libdevmapper-event interface changes and fixes.
...
Rename dm_saprintf() to dm_asprintf().
2007-01-15 18:21:01 +00:00
Alasdair Kergon
080f3fa1e0
Report error if NULL pointer supplied to dm_strdup_aux().
2007-01-15 14:39:12 +00:00
Alasdair Kergon
3165248642
Lots of dmeventd-related changes.
2007-01-11 21:54:53 +00:00
Alasdair Kergon
4594807a24
Use CFLAGS when linking so mixed sparc builds can supply -m64.
2007-01-11 16:23:22 +00:00
Alasdair Kergon
b9ffd32cd3
Add dm_tree_use_no_flush_suspend().
2007-01-09 19:44:07 +00:00
Alasdair Kergon
616c3eccfd
fix last checkin
2007-01-08 15:35:08 +00:00
Alasdair Kergon
5b95f17814
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
b700541f3b
Avoid deptree attempting to suspend a device that's already suspended.
2006-10-13 14:03:35 +00:00
Alasdair Kergon
9dd3071462
noflush code fixes: missing debug log; non-standard variable name
2006-10-12 17:29:05 +00:00
Alasdair Kergon
f916f0a7b7
Add suspend noflush support.
...
Add basic dmsetup loop support.
2006-10-12 15:42:25 +00:00
Alasdair Kergon
6fb265fa3b
Reorder mm bounds_check code to reduce window for a dmeventd race. (dm_free_aux)
2006-09-19 17:30:04 +00:00
Alasdair Kergon
9e063b223e
Add dm_snprintf
2006-08-21 12:52:39 +00:00
Alasdair Kergon
7d7736b7b4
Add dm_split_words() and dm_split_lvm_name() to libdevmapper.
2006-08-21 12:07:03 +00:00
Alasdair Kergon
d6a93541b6
reorder bounds check code
2006-08-18 21:38:58 +00:00
Alasdair Kergon
433b160fad
Add lockfs indicator to debug output.
2006-08-08 21:22:31 +00:00
Alasdair Kergon
def6f767c3
Don't suppress identical table reloads if permission changes.
2006-06-14 22:00:03 +00:00
Alasdair Kergon
311d6d811b
Fix corelog segment line.
...
Suppress some compiler warnings.
2006-05-16 16:20:29 +00:00
Alasdair Kergon
9723090c92
Add DM_CORELOG flag to dm_tree_node_add_mirror_target().
2006-05-11 19:10:55 +00:00
Alasdair Kergon
7dc850db3e
coverity fixes
2006-05-10 16:23:41 +00:00
Alasdair Kergon
9e8a7c7dab
remove inlines
2006-04-19 18:12:33 +00:00
Alasdair Kergon
b4cbeca164
fix makefile
2006-04-19 17:32:05 +00:00
Alasdair Kergon
0c8ff3ad63
make pkgconfig installation step optional, and clean up generated files
2006-04-19 16:38:56 +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
d81e3d0bad
configure/makefile tidying + pkg-config support.
2006-04-19 15:23:10 +00:00
Alasdair Kergon
99048d18b9
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
73f378f226
If _create_and_load_v4 fails part way through, revert the creation.
2006-03-30 15:15:47 +00:00
Alasdair Kergon
f4db3724f9
Add file & line to dm_strdup_aux().
2006-02-23 19:11:51 +00:00
Alasdair Kergon
6ef080af04
A setgeometry implementation. [untested]
2006-02-20 23:55:58 +00:00
Alasdair Kergon
2d2b610fb9
fix mirror log parm count
2006-02-08 14:14:13 +00:00
Alasdair Kergon
67b25ed49f
add clustered log uuid
2006-02-06 20:18:10 +00:00
Alasdair Kergon
90a34450e5
Change prefix for clustered log from "clustered " to "clustered_"
2006-02-06 19:32:18 +00:00
Alasdair Kergon
b5d8ff1014
Add exported functions to set uid, gid and mode. [Bastian Blank]
2006-02-03 14:23:22 +00:00
Alasdair Kergon
044810c229
remove unnecessary 0 in format string
2006-02-02 17:23:04 +00:00
Alasdair Kergon
5e3bd86778
Rename _log to dm_log and export.
...
Fix misc compile-time warnings.
2006-01-31 14:50:38 +00:00
Alasdair Kergon
c55b141005
Add dm_tree_skip_lockfs.
2006-01-30 23:36:04 +00:00
Alasdair Kergon
c507b684ce
Fix dm_strdup debug definition.
2006-01-11 15:40:54 +00:00
Alasdair Kergon
fe94f9f170
Fix dm_strdup debug definition.
2006-01-10 22:19:41 +00:00
Alasdair Kergon
b6b0c621f6
Fix hash function to avoid using a negative array offset.
2006-01-09 20:35:24 +00:00
Alasdair Kergon
e7ab6006c5
Don't inline _find in hash.c and tidy signed/unsigned etc.
2006-01-04 16:07:27 +00:00
Alasdair Kergon
1c9b9a5ecf
Fix libdevmapper.h #endif
2006-01-04 16:05:44 +00:00
Alasdair Kergon
ce7ed2c0a9
Change dm_tree_node_add_mirror_target_log parm order
2005-12-19 21:03:17 +00:00
Alasdair Kergon
dbcb64b80f
Add sync, nosync and block_on_error mirror log parameters.
...
Add hweight32.
2005-12-13 15:49:27 +00:00
Alasdair Kergon
dd3ec4e87a
dmeventd updates
2005-12-02 15:39:16 +00:00
Alasdair Kergon
774ed5fc39
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
56c282920c
Resume snapshot-origins last.
2005-11-22 20:00:35 +00:00
Alasdair Kergon
7707ea90f4
Suppress unnecessary resumes.
2005-11-22 19:31:20 +00:00
Alasdair Kergon
ec289b64b9
Drop leading zeros from dm_format_dev.
...
Suppress attempt to reload identical table.
2005-11-22 18:43:12 +00:00
Alasdair Kergon
87f98002b5
Additional LVM- prefix matching for transitional period.
2005-11-12 22:46:48 +00:00
Alasdair Kergon
5dd9b4656f
more debug fixes
2005-11-11 16:16:37 +00:00
Alasdair Kergon
bf9c60feb5
Fix selinux compile.
2005-11-10 18:31:17 +00:00
Alasdair Kergon
91a7cf559d
fix debug linking
2005-11-10 16:33:04 +00:00
Alasdair Kergon
e422819389
remove a debugging line
2005-11-10 15:17:54 +00:00
Alasdair Kergon
e6a6954ef1
revert - alternative pvmove fix, disabling preloading completely for now
2005-11-09 23:57:40 +00:00
Alasdair Kergon
abbca21248
more mirror fixing
2005-11-09 18:13:10 +00:00
Alasdair Kergon
24b026e333
some fixes for mirrors
2005-11-09 17:32:31 +00:00
Alasdair Kergon
908db0785f
fix last checkin
2005-11-09 15:41:42 +00:00
Alasdair Kergon
b4f1578fc2
rename deptree
2005-11-09 14:10:50 +00:00
Alasdair Kergon
165e4a112b
New activation code. [Not ready to be used yet.]
2005-11-08 22:50:11 +00:00
Alasdair Kergon
872dea0401
fix strncmps
2005-10-26 18:33:47 +00:00
Alasdair Kergon
268e8dd406
Fix incorrect checkin
2005-10-26 18:32:57 +00:00
Alasdair Kergon
1a44c009b0
Fix strncmps.
2005-10-26 18:17:36 +00:00
Alasdair Kergon
19f792df43
Also suppress error if device doesn't exist with DM_DEVICE_STATUS.
2005-10-26 17:51:10 +00:00
Alasdair Kergon
2b69db1f25
attempt to cope with uuid transition
2005-10-26 15:21:13 +00:00
Alasdair Kergon
690a5da2e7
check parents suspended
2005-10-26 14:08:24 +00:00
Alasdair Kergon
db208f51fd
unfinished suspend functions
2005-10-25 19:09:41 +00:00
Alasdair Kergon
3aeb569036
Export dm_set_selinux_context.
2005-10-25 17:30:00 +00:00
Alasdair Kergon
bc70fb17c0
zero suppress
2005-10-20 20:38:18 +00:00
Alasdair Kergon
3618f6eba7
fix dev no printf
2005-10-20 20:29:58 +00:00
Alasdair Kergon
a6d97ede7b
cope with null uuid_prefix
2005-10-18 13:57:11 +00:00
Alasdair Kergon
a38bf76bab
Tidy some log mesgs.
2005-10-18 13:07:41 +00:00
Alasdair Kergon
3e8c6b731a
Add deactivation functions
2005-10-18 12:37:53 +00:00
Alasdair Kergon
ffc88f2eeb
dm_driver_version
2005-10-17 18:05:39 +00:00
Alasdair Kergon
2262b32057
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Alasdair Kergon
a3f6b2ce79
export bitset, pool, hash, malloc
2005-10-16 22:57:20 +00:00
Alasdair Kergon
3d0480ed27
Code to build and display device dependency tree.
2005-10-16 14:33:22 +00:00
Alasdair Kergon
72a444276f
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
Alasdair Kergon
59a2bf62f0
Remember increased buffer size and use for subsequent calls.
2005-09-20 18:04:28 +00:00
Alasdair Kergon
d54d93ab2e
Explicitly initialise no_open_count
2005-09-20 16:39:12 +00:00
Alasdair Kergon
4e16b1e7ad
On 'buffer full' condition, double buffer size and repeat ioctl. [Untested]
2005-09-19 14:29:17 +00:00
Alasdair Kergon
e817a0b35c
Report 'buffer full' condition with v4 ioctl as well as with v1.
2005-08-08 18:40:17 +00:00
Alasdair Kergon
c8c07bbedc
Use matchpathcon mode parameter
2005-06-13 13:11:48 +00:00
AJ Lewis
c71d140252
o print the context along with the path when setting selinux context
2005-06-10 21:30:21 +00:00
Benjamin Marzinski
5469414bf8
Timeout event implementation:
...
The daemon side of this is mostly the same as the patch I sent out. To select
a timeout period different than the default and to get the timeout period,
I added two library calls, dm_set_event_timeout() and dm_get_event_timeout().
If people are against them, the other option is to tack extra arguments onto
dm_regiser_for_event() and dm_get_registered_device(). I also added a
-t option to dmevent, so people can try out timeouts.
2005-06-09 18:40:49 +00:00
Alasdair Kergon
60f13f01d2
Basic support for mirrors.
2005-06-01 16:51:55 +00:00
Alasdair Kergon
ebf21d3f93
Call dm_lib_exit() and dm_lib_release() automatically now.
2005-05-16 15:15:34 +00:00
Alasdair Kergon
0888dc43cf
Fix contiguous allocations with linear.
2005-05-11 16:46:59 +00:00
AJ Lewis
cd4355d8f4
o stick multilog into the dm-event lib and dmeventd code again
...
o more tweaks to libmultilog calls - the api isn't set in stone yet, so
don't get too comfortable.
o not sure the dmeventd in device-mapper/dmeventd works - i've been using
the one in lib/event/
o currently both daemons are set to log only to syslog
2005-05-03 21:29:13 +00:00
Benjamin Marzinski
4ba6f5d078
changed client_path and sever_path from 'char *' to 'const char *' to stop
...
compiler warning messages.
2005-04-29 21:52:46 +00:00
Heinz Mauelshagen
96c5c1f9ea
first changes to get comms back to work after flock changes
2005-04-29 13:41:25 +00:00
Alasdair Kergon
e4fe47bc19
o adds dm_get_next_registered_device() (not functional yet)
...
to retrieve which devices got registered with the daemon;
needs locking changes as well
2005-04-28 14:02:30 +00:00
Alasdair Kergon
b0c36cbd57
Prototype for a device-mapper event-handling daemon.
2005-04-27 22:32:00 +00:00
Alasdair Kergon
06cc0dade2
more refinements
2005-04-06 15:21:28 +00:00
Alasdair Kergon
1128f56b1e
Annotate, tidy and extend list.h.
2005-04-06 14:50:37 +00:00
Alasdair Kergon
3d2aecf0ae
Add option to compile without ioctl for testing.
2005-01-27 16:16:54 +00:00
Alasdair Kergon
8e2dd0dfb2
Add dm_task_no_open_count() to skip getting open_count.
2005-01-12 22:10:14 +00:00
Alasdair Kergon
eaf48efc9c
Fix /proc/devices parsing.
2005-01-07 15:39:53 +00:00
Alasdair Kergon
f34c169a1b
Attempt to fix /dev/mapper/control transparently if it's wrong.
2005-01-06 18:22:44 +00:00
Alasdair Kergon
6b70629cc9
Configuration-time option for setting uid/gid/mode for /dev/mapper nodes.
2005-01-05 22:00:40 +00:00
Alasdair Kergon
3f096a6c45
Support device referencing by uuid or major/minor.
2004-10-01 19:11:37 +00:00
Alasdair Kergon
2d7f9f0b39
printf->fprintf
2004-10-01 19:07:41 +00:00
Alasdair Kergon
2f7b799f89
set_selinux_context() return code fix
2004-07-03 18:14:12 +00:00
Alasdair Kergon
8bad033938
Fix device number handling for 2.6 kernels.
2004-07-01 15:14:29 +00:00
Alasdair Kergon
3360958232
Fix targets string size calc in driver.
...
Fix a uuid free in libdm-iface. [Eric Taylor]
Update version.
2004-06-20 13:50:42 +00:00
Alasdair Kergon
62cec9b225
Support new target message ioctl.
2004-06-08 20:34:40 +00:00
Alasdair Kergon
a38df97fb8
config option to avoid using install -o -g
2004-04-19 13:10:06 +00:00
Alasdair Kergon
121c5c060b
Ignore error setting selinux file context if fs doesn't support it.
2004-04-16 12:24:46 +00:00
Alasdair Kergon
1aa08175ac
add some selinux support
2004-04-06 18:54:00 +00:00