zkabelac
bbf486f890
Add fflush for the case the log is redirected to the buffered file.
...
Without this patch it have not been obvious, why the application
waits on the stdin as the prompt might be still buffered in memory.
2009-11-03 10:50:57 +00:00
Alasdair Kergon
2d1118a26f
Permit snapshots of mirrors. (brassow)
2009-10-26 10:01:56 +00:00
Alasdair Kergon
2ccdb165e3
Introduce percent_range_t and centralise snapshot full/mirror in-sync checks.
2009-10-01 00:35:29 +00:00
Alasdair Kergon
bce3ac2c73
Distinguish between powers of 1000 and powers of 1024 in unit suffixes.
2009-09-30 14:19:00 +00:00
Alasdair Kergon
fe67a86a5f
Treat input units of both 's' and 'S' as 512-byte sectors. (2.02.49)
...
's' and 'S' are special suffixes representing sectors and are always 512 bytes,
regardless of whether you're using powers of 1000 or 1024.
2009-09-28 16:36:03 +00:00
Alasdair Kergon
4d85bb13d1
Add global/si_unit_consistency to enable cleaned-up use of units in output.
...
Add configure --enable-units-compat to set si_unit_consistency off by default.
Use standard output units for 'PE Size' and 'Stripe size' in pv/lvdisplay.
2009-09-28 16:23:44 +00:00
Dave Wysochanski
62d8848bee
Add vg_is_resizeable() and cleanup references.
...
Clean up VG_RESIZEABLE flag by creating vg_is_resizeable().
Update comment - we no longer have ALLOW_RESIZEABLE.
Also use vg_is_exported() in one place missed by earlier patch.
Should be no functional change.
2009-09-15 18:35:13 +00:00
Dave Wysochanski
1b3f8a4c18
Use vg_is_exported(vg) macro everywhere.
...
This patch is all just cleanup and no other patch depends on it.
Replace explicit dereference and check with vg_is_exported().
Update a few copyrights and remove unnecessary whitespace.
Should be no functional change.
2009-09-14 19:44:15 +00:00
Dave Wysochanski
594fbed146
Update display.c to use vg_free(vg) instead of duplicating the calculation.
...
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-27 10:18:31 +00:00
snitzer
69da2ac0c7
Continue to make --units and --size consistent (in code and man pages):
...
Update units_to_bytes() to support (S)ectors: 500 bytes.
- 500 byte (S)ectors is of questionable value but it adds to consistency
if a user happens to use --units S. This seems better than an error.
Updated test/t-covercmd.sh to test --units [hS]
Document the units that can be displayed via --units uniformly.
- (p)etabytes and (e)xabytes were missing in pvs, vgs and lvs man pages.
Made lvreduce man page "... in units of megabytes." consistent (with the
lvextend and lvresize man pages).
2009-07-07 19:28:57 +00:00
Milan Broz
c94f02648c
Merge lv_is_displayable and lv_is_visible.
...
Displayable and visible is the same thing.
volumes_count(vg) is now vg_visible_lvs() and always
returns number of LVs from user perspective.
2009-05-13 21:27:43 +00:00
prajnoha
481618826d
Added displayable_lvs_in_vg and lv_is_displayable functions to deal with
...
the counts of visible LVs from user's perspective consistently throughout
the code.
2008-12-04 15:54:26 +00:00
Alasdair Kergon
b71bf9332c
Fix uninitialised lv_count in vgdisplay -c
2008-12-01 17:38:35 +00:00
Alasdair Kergon
a2bfad1c29
Right, a simple build (without options) is working again.
2008-11-03 22:14:30 +00:00
Alasdair Kergon
05329c885a
more tweaking to get things to compile - dmlib.h for log fns, list.h
2008-11-03 18:59:59 +00:00
Alasdair Kergon
95d43e17b3
Improve the way VGs with PVs missing are handled so manual intervention
...
is required in fewer circumstances. (mornfall)
2008-09-19 06:42:00 +00:00
Zdeněk Kabeláč
22d6121099
added const modifiers
...
switched const char* to const char[] elements to save few relocation entries
2008-08-07 14:01:17 +00:00
Alasdair Kergon
7f40f09f10
fix 3rd copy
2008-04-10 19:16:35 +00:00
Alasdair Kergon
10bf8fd2cd
Fix vgdisplay 'Cur LV' field to match lvdisplay output.
...
Fix lv_count report field to exclude hidden LVs.
2008-04-10 17:19:02 +00:00
Dave Wysochanski
57cb22ff3c
Add vg_is_clustered() helper function.
...
Should be no functional change.
2008-04-10 17:09:32 +00:00
Dave Wysochanski
fb2f92df1d
Add pvseg_is_allocated() for identifying a PV segment allocated to a LV.
2008-03-26 16:48:10 +00:00
Alasdair Kergon
71b3b1ff4c
split orphan VG by format type
2008-02-06 15:47:28 +00:00
Alasdair Kergon
1ddd4509dc
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Alasdair Kergon
6af3f4f4cf
Use stack return macros throughout.
2008-01-30 13:19:47 +00:00
Alasdair Kergon
c74fa11518
readahead activation code (but no dm support yet)
2007-11-12 20:51:54 +00:00
Alasdair Kergon
971f233fb7
attempt to fix human-readable unit output when number of sectors is odd
2007-11-05 17:13:54 +00:00
Alasdair Kergon
730301b34d
adjust sizes for metadata
2007-11-05 02:10:39 +00:00
Alasdair Kergon
c443bcf43c
Show 'not usable' space when PV is too large for device in pvdisplay.
...
Ignore and fix up any excessive device size found in metadata.
2007-11-05 01:47:49 +00:00
Dave Wysochanski
9691ecc839
Add pv_dev_name() to access PV device name.
...
Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
2007-10-12 14:29:32 +00:00
Alasdair Kergon
3f507a26fb
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Dave Wysochanski
53fbce932b
Move lv_remove_single() into library (lv_manip.c, metadata-exported.h).
...
Move yes_no_prompt() into library (display.c, display.h).
Fixup includes as a result of movement of prior two functions.
Fixup force_t enum to be more descriptive.
2007-08-20 17:04:53 +00:00
Jim Meyering
7454664997
Add "const" attributes where possible: first cut.
2007-08-07 09:06:05 +00:00
Alasdair Kergon
10d3496a17
Split metadata-external.h out from metadata.h for the tools to use.
2007-07-18 15:38:58 +00:00
Dave Wysochanski
6768f64e2f
Fix pvdisplay --maps to not display segment header for orphan PVs.
2007-05-31 20:26:11 +00:00
Dave Wysochanski
f1813b1cc6
Fix redundant segment display when PV is given to 'pvdisplay --maps' cmdline.
2007-05-31 20:10:25 +00:00
Dave Wysochanski
fb665bd0dd
Remove 'Type' from pvdisplay --maps as there is no 'Type' of a physical segment, only logical segments
2007-05-31 15:18:44 +00:00
Dave Wysochanski
65dda2ef3d
Small fixes to pvdisplay --maps: 1) rename struct pv_segment vars from 'seg' to 'pvseg', 2) Change heading
2007-05-31 14:19:57 +00:00
Dave Wysochanski
b162b992af
Add --maps to pvdisplay.
...
Modified original patch from David Robinson <zxvdr.au@gmail.com>.
2007-05-30 20:43:09 +00:00
Alasdair Kergon
ee68d715bf
Adjust some alignments for ia64 and sparc.
...
(Some of the changes are probably unnecessary.)
2006-11-30 23:11:42 +00:00
Alasdair Kergon
997fa756ad
Add some missing bounds checks on 32 bit extent counters.
...
Add Petabyte and Exabyte support.
Fix lvcreate error message when 0 extents requested.
2006-11-10 18:24:11 +00:00
Alasdair Kergon
bb3605518d
add cling allocation policy
2006-10-08 12:01:13 +00:00
Alasdair Kergon
45dca55fc8
Make SIZE_SHORT the default for display_size().
...
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.
2006-05-09 21:23:51 +00:00
Alasdair Kergon
e092ce51f6
Attempt to load missing targets using modprobe.
...
Simplify dev_manager_info().
2005-10-17 18:00:02 +00:00
Alasdair Kergon
67eb7723d6
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Alasdair Kergon
39fbb844f9
Various allocation-related pvmove fixes.
2005-06-14 17:54:48 +00:00
Alasdair Kergon
99df4f892d
Basic support for mirrors.
2005-06-01 16:51:55 +00:00
Alasdair Kergon
87dbf462cb
Reinstate full PV size when removing from VG.
...
Support loopfiles for testing.
Complete the pv_segment support.
2005-05-03 17:28:23 +00:00
Alasdair Kergon
f8782ee2d7
Internal snapshot code restructuring.
2005-04-07 12:39:44 +00:00
Alasdair Kergon
9284f973f1
More 64-bit display/report fixes.
2005-02-01 16:19:48 +00:00
Alasdair Kergon
369549d23f
Only ask libdevmapper for open_count when we need it.
2005-01-12 22:58:21 +00:00