summaryrefslogtreecommitdiffstats
path: root/lib/filters/filter.c
Commit message (Collapse)AuthorAgeFilesLines
* filters: move device_info_t definition to headerAlasdair G Kergon2012-07-261-7/+2
|
* filters: Add Micron PCIe SSDs (mtip32xx)Alasdair G Kergon2012-07-261-40/+2
| | | | Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
* Support improperly formated device numbersZdenek Kabelac2012-03-201-2/+15
| | | | | | | | | | | | | There are kernel drivers (smblk) which set '-1' as their device major number. This number is listed in /proc/devices then - but the kernel itself is using just 12 bits - thus device is accessible via 4095 - there is posted patch for 3.4 to fix this behavior (0 for auto allocation was mean to be used). However to still allow using such devices with older kernels add some code to use same behavior - so cut 12 bits from the major number from /proc/devices. For now use log_warn() - maybe the severity of the message could be lowered to just verbose level.
* Better structure layout for device_infoZdenek Kabelac2012-03-121-19/+19
| | | | | | Save some relocation entries and use directly char[]. Since we do not need yes more then 127 partitions per device, use just int8_t. Move lvm_type_filter_destroy into local static function.
* Add some stack traces for dev_close error pathsZdenek Kabelac2012-02-281-1/+2
|
* Remove duplicit testZdenek Kabelac2012-02-131-2/+2
| | | | When it's space it's also not a '\0'.
* Add range test for device numberZdenek Kabelac2012-02-081-1/+1
| | | | Check the output of atoi is in valid range.
* Give priority to emcpower devices with duplicate PVIDs.Alasdair Kergon2012-01-111-0/+11
|
* Remove constant expression checkZdenek Kabelac2011-11-181-3/+0
| | | | | | | | | | | | "result_independent_of_operands: ((dev->dev & 0xfff00UL) >> 8) == 18446744073709551615UL /* -1 */ is always false regardless of the values of its operands (logical operand of if)." 'dev->dev' is set in dev-cache.c _insert() and it's not expectable st_rdev would have '-1' This code has been introduced with drbd support commit and code never worked - so eliminated.
* Fix major number filter structure boundary test.Milan Broz2011-11-111-3/+3
|
* Do not scan device if it is part of active multipath.Milan Broz2011-11-111-8/+26
| | | | | | | | | | | | | | | | | | | Add filter which tries to check if scanned device is part of active multipath. Firstly, only SCSI major number devices are handled in filter. Then it checks if device has exactly one holder (in sysfs) and if it is device-mapper device and DM-UUID is prefixed by "MPATH-". If so, this device is filtered out. The whole filter can be switched off by setting mpath_component_detection in lvm.conf. https://bugzilla.redhat.com/show_bug.cgi?id=597010 Signed-off-by: Milan Broz <mbroz@redhat.com>
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-301-5/+5
| | | | | | | leaving behind the LVM-specific parts of the code (convenience wrappers that handle `struct device` and `struct cmd_context`, basically). A number of functions have been renamed (in addition to getting a dm_ prefix) -- namely, all of the config interface now has a dm_config_ prefix.
* Add and use dev_open_readonly and variations.Alasdair Kergon2011-05-241-1/+1
|
* Replace PV_MIN_SIZE with function pv_min_size()Zdenek Kabelac2011-02-181-1/+1
| | | | | | | | | | | | | | | | | Add configurable option to define minimal size of of block device usable as a PV. pv_min_size() is added to lvm-globals and it's being initialized through _process_config. Macro PV_MIN_SIZE is unused and removed. New define DEFAULT_PV_MIN_SIZE_KB is added to lvm-global and unlike PV_MIN_SIZE it uses KB units. Should help users with various slow devices attached to the system, which cannot be easily filtered out (like FDD on /dev/sdX): https://bugzilla.redhat.com/show_bug.cgi?id=644578
* Use O_DIRECT when reading block devices.Alasdair Kergon2011-01-271-1/+1
|
* add fioAlasdair Kergon2011-01-121-1/+2
|
* Add more strict const pointers around config treeZdenek Kabelac2010-12-201-2/+2
| | | | | | To have better control were the config tree could be modified use more const pointers and very carefully downcast them back to non-const (for config tree merge).
* Track recursive filter iteration to avoid refreshing while in use. (2.02.56)Alasdair Kergon2010-09-221-0/+4
|
* Recognise and give preference to md device partitions (blkext major).Peter Rajnoha2010-08-111-0/+10
| | | | | | | We can already detect MD devices internally. But when using MD partitions, these have "block extended major" (blkext) assigned (259). Blkext major is also used in general, so we need to check whether the original device is an MD device actually.
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-1/+1
|
* Always pass unsuspended dm devices through persistent filter to other filters.Alasdair Kergon2010-07-021-8/+5
| | | | Move test for suspended dm devices ahead of other filters.
* pre-releaseAlasdair Kergon2010-05-171-0/+1
|
* Skip also special lvm devices in scan (if ignore suspended is used).Milan Broz2010-05-131-2/+2
| | | | | | This should avoid various races between dmeventd on multiple nodes in cluster where one node already repairing device and another run full scan and locks the device.
* Cleanup returns for void functions.Zdenek Kabelac2009-12-111-1/+0
|
* Recognise DRBD device part and handle it similar to MD devices.Milan Broz2009-10-271-0/+30
| | | | | | | | | | | | | The DRBD uses underlying device so code should prefer top device if duplicate is found. Patch also introduce dev_subsystem_part_major and dev_subsytem_name functions to easily handle all these replication susbystems and not hardcode md_major call. See https://bugzilla.redhat.com/show_bug.cgi?id=530881 for full problem description.
* Fix pvcreate on a partition (regressed in 2.02.51).Mike Snitzer2009-08-191-0/+10
| | | | | | | | | | | Eliminate busy loop during pvcreate of a "normal" partition. _md_sysfs_attribute_snprintf() would busy loop if the device it was given was not a blkext-based MD partition. Rather than being cute with a busy-loop prone 'goto check_md_major' in _md_sysfs_attribute_snprintf(): explicitly check if the provided device is a blkext-based partition (blkext_major()); and then check that the get_primary_dev() determined parent is an MD device (md_major()).
* Add extended device (blkext) and MD partition (mdp) types to filters.Mike Snitzer2009-07-091-0/+2
| | | | | Both types were added with a 'max_partitions' of 1 because these devices are _not_ partitionable (they are the partitions).
* Add MMC device type to filters.Milan Broz2009-04-161-0/+1
|
* fix vd->virtblkAlasdair Kergon2008-04-031-1/+1
|
* add vd to filtersAlasdair Kergon2008-03-051-0/+1
|
* Use stack return macros throughout.Alasdair Kergon2008-01-301-2/+1
|
* Clean up numerous compiler warnings that crept in recently.Alasdair Kergon2007-08-221-1/+1
| | | | Remove several unused parameters from _allocate().
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Add ps3disk devices.Alasdair Kergon2007-07-261-0/+1
|
* Add SUN's LDOM virtual block device to filtersPatrick Caulfield2007-07-191-0/+1
| | | | Thanks to Fabio Massimo Di Nitto
* also ignore mirrorsAlasdair Kergon2007-01-251-1/+1
|
* Add devices/ignore_suspended_devices to ignore suspended dm devices.Alasdair Kergon2007-01-251-1/+14
|
* Add some missing close() and fclose() return code checks.Alasdair Kergon2007-01-251-4/+10
| | | | Fix exit statuses of reporting tools (2.02.19).
* Move lvm_snprintf into libdevmapper.Alasdair Kergon2006-08-211-1/+1
|
* Make SIZE_SHORT the default for display_size().Alasdair Kergon2006-05-091-0/+4
| | | | | | | 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.
* xen xvdAlasdair Kergon2005-11-091-0/+1
|
* Use dm_is_dm_major instead of local copy.Alasdair Kergon2005-10-251-19/+1
| | | | Allow mapped devices to be used as PVs safely.
* Use hash, bitset, malloc, pool from libdevmapper.Alasdair Kergon2005-10-161-9/+8
|
* Add is_dm_major() for use in duplicate device detection in lvmcache_add().Alasdair Kergon2005-09-161-0/+19
|
* Recognise aoe devices.Alasdair Kergon2005-08-081-0/+1
|
* Add ramdisk.Alasdair Kergon2005-04-061-0/+1
|
* Suppress 'open failed' error messages during scanning.Alasdair Kergon2005-03-031-1/+1
|
* Recognise gnbd.Alasdair Kergon2005-01-191-0/+1
|
* Skip devices that are too small to be PVs.Alasdair Kergon2004-12-211-3/+19
|
* Additional device-handling debug messages.Alasdair Kergon2004-12-101-5/+16
| | | | | | | | Additional verbosity level -vvvv includes line numbers and backtraces. Verbose messages now go to stderr not stdout. Close any stray file descriptors before starting. Refine partitionable checks for certain device types. Allow devices/types to override built-ins.