summaryrefslogtreecommitdiffstats
path: root/libdm/libdm-common.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Use void parameter for function definition.Zdenek Kabelac2010-08-031-2/+2
|
* Add check for kernel semaphore support and disable udev_sync if not available.Peter Rajnoha2010-08-031-4/+29
| | | | | | | | | | udev_sync feature requires semaphores (part of System V IPC) to be configured in kernel (CONFIG_SYSVIPC). Check whether it is supported and if not, give a warning message and disable udev synchronisation code automatically to avoid any further error states and associated problems. One should use the kernel with System V IPC support enabled or libdevmapper with udev_sync feature disabled.
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-4/+4
|
* Use expected union semun for arguments in selected semaphore operations.Peter Rajnoha2010-05-271-1/+16
| | | | | This is standard and expected use. It also prevents errors related with misalignment of the arguments for semaphore operations on some architectures.
* Synchronize "remove" dm task while reverting unsuccessful "create" dm taskPeter Rajnoha2010-05-031-1/+1
| | | | | | | | (with table provided). This remove ioctl generates udev events like any other hence it needs to be synchronized properly as well. Also, add dm task type in debug log when setting a cookie (for better debugging).
* Strictly require libudev if udev_sync is used.Peter Rajnoha2010-03-231-16/+3
| | | | | | | | 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.
* Several changes in dmsetup and libdevmapper:Peter Rajnoha2010-02-151-0/+10
| | | | | | | | | | | | | - 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)
* Add support to disable udev checking: DM_UDEV_DISABLE_CHECKING=1 env. variable.Peter Rajnoha2010-01-111-4/+31
| | | | | | | | | | | 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.
* Support udev flags even when udev_sync is disabled or not compiled in.Peter Rajnoha2009-11-131-3/+7
| | | | | | | | | | | 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).
* Add support for querying a device's inactive table.Alasdair Kergon2009-11-061-0/+1
| | | | | Currently this data is invisible to userspace. Requires dm >= 4.16 (likely to be in linux 2.6.33).
* Cleanup of previous commit with latest changes in udev support code.Peter Rajnoha2009-10-261-1/+2
|
* Several changes to udev support code:Peter Rajnoha2009-10-261-24/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Add udev flags support in libdevmapper and provide 'dmsetup udevflags' ↵Peter Rajnoha2009-10-221-5/+5
| | | | command to decode them.
* Merge Debian patch 05 debian: keep libdm-abi consistent.Fabio M. Di Nitto2009-10-121-4/+2
| | | | | | | This appears to be the only user visible feature that can change libdm ABI at build time. Thanks to Bastian Blank for the patch.
* missing dm_snprintfAlasdair Kergon2009-09-251-1/+5
|
* ensure dm_strdup succeedsAlasdair Kergon2009-09-251-1/+3
|
* remove unused var & rename fnAlasdair Kergon2009-09-251-3/+3
|
* Handle any path supplied to dm_task_set_name() by looking up in /dev/mapper.Alasdair Kergon2009-09-251-7/+68
|
* dm release cleanupAlasdair Kergon2009-09-151-10/+14
|
* Move dm_cookie_supported check into dm_udev_get_sync_supprt function.Peter Rajnoha2009-09-111-4/+4
| | | | | | 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).
* Add one define that is necessary for older (experimental) libudev to work.Peter Rajnoha2009-09-111-0/+1
|
* Check that udev is running and set internal state appropriately.Peter Rajnoha2009-09-111-1/+49
|
* Restore umask when device node creation fails.Dave Wysochanski2009-09-031-0/+1
| | | | | Author: Florian Zumbiehl <florz@florz.de> Acked-by: Dave Wysochanski <dwysocha@redhat.com>
* Add 'udevcomplete_all' command for dmsetup. Export DM_COOKIE_MAGIC in ↵Peter Rajnoha2009-08-061-3/+5
| | | | libdevmapper.h.
* Detect udev problems in _rename_dev_node.Peter Rajnoha2009-08-061-23/+41
|
* Additional loggingAlasdair Kergon2009-08-051-15/+40
|
* Add udev checks.Alasdair Kergon2009-08-031-1/+6
|
* Manage without dm_udev_cleanup?Alasdair Kergon2009-08-031-21/+7
|
* cleanup some ignored return values & 'stack'sAlasdair Kergon2009-08-031-1/+1
|
* deal with error-related FIXMEsAlasdair Kergon2009-08-031-23/+42
|
* Add udevcomplete and --noudevwait to dmsetup.Alasdair Kergon2009-07-311-2/+2
|
* another fixmeAlasdair Kergon2009-07-311-0/+1
|
* Add libdevmapper functions to support synchronisation with udev.Alasdair Kergon2009-07-311-0/+289
|
* Add dm_log_with_errno and dm_log_with_errno_init, deprecating the oldAlasdair Kergon2009-07-101-7/+45
| | | | | 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.
* Fix backward compatibility for major:minor query.Milan Broz2009-06-171-0/+12
| | | | | | | 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).
* Add checks for device names in dmsetup and show proper error messages.Peter Rajnoha2009-01-071-2/+11
| | | | | | | | | | 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.
* more fixesAlasdair Kergon2008-11-041-1/+0
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-11/+11
|
* more tweaking to get things to compile - dmlib.h for log fns, list.hAlasdair Kergon2008-11-031-1/+1
|
* further progressAlasdair Kergon2008-11-011-2/+1
|
* rename some config varsAlasdair Kergon2008-06-061-3/+3
|
* more readahead node fixes/debug messagesAlasdair Kergon2007-12-141-1/+21
|
* Add node operation stack debug messages.Alasdair Kergon2007-12-141-0/+10
|
* Report error when empty device name passed to readahead functions.Alasdair Kergon2007-12-131-0/+10
|
* Fix minimum readahead debug message.Alasdair Kergon2007-12-051-2/+2
|
* fix ioctls to use long not intAlasdair Kergon2007-12-051-5/+8
| | | | update dm-ioctl.h after compat tidy-up
* fixesAlasdair Kergon2007-12-031-3/+3
|
* missing #includeAlasdair Kergon2007-12-031-0/+1
|
* fixAlasdair Kergon2007-11-301-1/+1
|
* readahead support completed - untestedAlasdair Kergon2007-11-301-2/+68
|