summaryrefslogtreecommitdiffstats
path: root/lib/device
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix error handling of device-related stat() calls to be ENOENT aware.Mike Snitzer2009-08-012-6/+23
| | | | Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Retrieve MD sysfs attributes for MD partitionsMike Snitzer2009-08-013-8/+22
| | | | | | | | Rename private _primary_dev() to a public get_primary_dev() and reuse it to allow retrieval of the MD sysfs attributes (raid level, etc) for MD partitions. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Improve ability to lookup primary device associated with a partitionMike Snitzer2009-08-011-5/+56
| | | | | | | | | | Improve lib/device/device.c:_primary_dev()'s ability to look up the primary device associated with all partitions; including blkext (e.g. partitions directly on MD). The same will also work for obscure sysfs paths; e.g.: paths with mangled names like the HP cciss driver uses: /sys/block/cciss!c0d0/cciss!c0d0p1/ Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Add devices/data_alignment_detection to lvm.conf.Mike Snitzer2009-08-012-5/+76
| | | | | | | | | | | | | | Adds 'data_alignment_detection' config option to the devices section of lvm.conf. If your kernel provides topology information in sysfs (linux >= 2.6.31) for the Physical Volume, the start of data area will be aligned on a multiple of the ’minimum_io_size’ or ’optimal_io_size’ exposed in sysfs. minimum_io_size is used if optimal_io_size is undefined (0). If both md_chunk_alignment and data_alignment_detection are enabled the result of data_alignment_detection is used. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Add devices/data_alignment_offset_detection to lvm.conf.Mike Snitzer2009-08-012-0/+74
| | | | | | | | | If the pvcreate --dataalignmentoffset option is not specified the start of a PV's aligned data area will be shifted by the associated 'alignment_offset' exposed in sysfs (unless devices/data_alignment_offset_detection is disabled in lvm.conf). Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Cast MINOR() in _md_sysfs_attribute_snprintf()'s dm_snprintf() call.Mike Snitzer2009-07-201-1/+1
|
* Cast MAJOR() and MINOR() to int when used with "%d" in dm_snprintf() call.Mike Snitzer2009-07-201-2/+2
| | | | Fixes SEGV in _md_sysfs_attribute_snprintf() on 32-bit systems.
* Use log_error macro consistently throughout in place of log_err.Alasdair Kergon2009-07-151-5/+5
|
* Check MD devices for a partition table during device scan.Mike Snitzer2009-07-091-0/+4
|
* Use the MD device's stripe-width, instead of chunk_size, to align theMike Snitzer2009-07-062-29/+155
| | | | | data blocks of a Physical Volume that is placed directly upon an MD device.
* Use readahead of underlying device and not default (smaller) one.Milan Broz2009-05-203-0/+48
| | | | | | | | | | | | | | | When we are stacking LV over device, which has for some reason increased read_ahead (e.g. MD RAID), the read_ahead hint for libdevmapper is wrong (it is zero). If the calculated read_ahead hint is zero, patch uses read_ahead of underlying device (if first segment is PV) when setting DM_READ_AHEAD_MINIMUM_FLAG. Because we are using dev-cache, it also store this value to cache for future use (if several LVs are over one PV, BLKRAGET is called only once for underlying device.) This should fix all the reamining problems with readahead mismatch reported for DM over MD configurations (and similar cases).
* Missed file from previous checkin.Petr Rockai2009-03-171-0/+87
|
* Detect and wipe swap signatures in pvcreate.Petr Rockai2009-03-171-0/+1
|
* Display a 'dev_size' of zero for missing devices in reports.Alasdair Kergon2009-01-101-0/+3
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-033-37/+37
|
* Fix conversion of md chunk size into sectors.Alasdair Kergon2008-10-031-5/+5
|
* .Alasdair Kergon2008-09-191-1/+1
|
* adjust pe_align for md chunk sizeAlasdair Kergon2008-09-192-1/+65
|
* Remove dead code, is_lvm_partition() - no functional change.Dave Wysochanski2008-07-231-5/+0
| | | | | This code does nothing. The function is #defined to 1 which ensures the only two if statements referencing it will never be true.
* Suppress invalid 'sb_offset' compiler warning (FC8) with uninitialized_var().Dave Wysochanski2008-06-231-1/+1
| | | | device/dev-md.c:61: warning: ‘sb_offset’ may be used uninitialized in this function
* Suppress 'sb_offset' compiler warning by using enum for md superblock versions.Dave Wysochanski2008-06-231-6/+15
| | | | | | | | | The warning is bogus and is only seen on certain versions of gcc. However using the enum does seem to clarify the intent of the code - only 3 possible md minor superblock versions. Related compiler warning: device/dev-md.c:53: warning: 'sb_offset' may be used uninitialized in this function
* Avoid spurious duplicate VG messages referring to VGs that are gone.Alasdair Kergon2008-05-281-1/+2
| | | | (untested)
* Some whitespace tidy-ups.Alasdair Kergon2008-01-303-14/+14
|
* Use stack return macros throughout.Alasdair Kergon2008-01-303-66/+33
|
* Rely upon internally-cached PV labels while corresponding VG lock is held.Alasdair Kergon2008-01-291-1/+1
|
* explanation of md superblock location & avoid compilation warningsAlasdair Kergon2007-10-241-4/+11
|
* Detect md superblocks version 1.0, 1.1 and 1.2.Alasdair Kergon2007-10-241-10/+41
|
* refactor dev-md.c, separating out the magic number detectionAlasdair Kergon2007-10-241-7/+24
|
* Include strerror string in dev_open_flags' stat failure message.Jim Meyering2007-09-071-4/+9
| | | | | | * lib/device/dev-io.c (dev_open_flags): Use log_sys_error after failed stat to report strerror(errno). Use a slightly different diagnostic to report mismatched device number.
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-206-16/+16
|
* Fix loading of persistent cache if cache_dir is used. (2.02.23)Milan Broz2007-07-231-2/+2
| | | | Move lstat warning in _compare_paths to verbose output only.
* Move regex functions into libdevmapper.Alasdair Kergon2007-04-271-5/+4
|
* add preferred_names to man page.Alasdair Kergon2007-04-261-0/+3
|
* Add devices/preferred_names config regex list for displayed device names.Alasdair Kergon2007-04-262-2/+106
| | | | | | Free a temporary dir string in fcntl_lock_file() after use. Fix a dm_pool_destroy() in matcher_create(). Introduce goto_bad macro.
* Add dev_read_circular, read 2 regions on same device.Dave Wysochanski2007-04-192-0/+31
|
* Fix md signature check to handle both endiannesses.Alasdair Kergon2007-01-261-1/+3
|
* Add some missing close() and fclose() return code checks.Alasdair Kergon2007-01-251-2/+5
| | | | Fix exit statuses of reporting tools (2.02.19).
* Fix partition table processing after sparc changes (introduced in 2.02.16).Alasdair Kergon2007-01-151-1/+1
| | | | Fix cmdline PE range processing segfault (introduced in 2.02.13).
* Adjust some alignments for ia64 and sparc.Alasdair Kergon2006-11-302-3/+3
| | | | (Some of the changes are probably unnecessary.)
* Add lvm_getpagesize wrapper.Alasdair Kergon2006-08-171-1/+1
|
* Add --trustcache option to reporting commands in preparation for supportingAlasdair Kergon2006-08-011-2/+1
| | | | | | event-driven model. Without changes to the way the cache gets updated, the option is currently unreliable without a global lock to prevent any lvm2 commands from running concurrently.
* Create a log header for replacement in-sync mirror log.Alasdair Kergon2006-05-112-3/+3
| | | | | Use set_lv() and dev_set() to wipe sections of devices. Add mirror_in_sync() flag to avoid unnecessary resync on activation.
* Add mirror_library description to example.conf.Alasdair Kergon2006-05-111-1/+1
| | | | More compile-time cleanup.
* Check for libsepol.Alasdair Kergon2006-04-192-12/+15
| | | | | | Add some cflow & scope support. Separate out DEFS from CFLAGS. Remove inlines and use unique function names.
* Fix open RO->RW promotions.Alasdair Kergon2005-11-231-4/+1
|
* Only keep devices open if known to belong to a locked VG now.Alasdair Kergon2005-10-271-2/+8
|
* Use hash, bitset, malloc, pool from libdevmapper.Alasdair Kergon2005-10-165-40/+38
|
* Refuse to run pvcreate/pvremove on devices we can't open exclusively.Alasdair Kergon2005-10-032-7/+42
|
* Various allocation-related pvmove fixes.Alasdair Kergon2005-06-141-0/+6
|
* Basic support for mirrors.Alasdair Kergon2005-06-011-10/+6
|