1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

6977 Commits

Author SHA1 Message Date
Zdenek Kabelac
fd417db274 check: add internal errors for unexpected paths
Adding couple INTERNAL_ERROR reports for unwanted parameters:

Ensure the 'top' metadata node cannot be NULL for lvmetad.

Make obvious vginfo2 cannot be NULL.

Report internal error if handler and vg is undefined.

Check for handle in poll_vg().

Ensure seg is not NULL in dev_manager_transient().

Report missing read_ahead for _lv_read_ahead_single().

Check for report handler in dm_report_object().

Check missing VG in _vgreduce_single().
2012-08-23 14:37:52 +02:00
Zdenek Kabelac
15891d366d cleanup: add error message and simplify creation
Report error for malloc failure, and use zeroed allocation
to initialize handler structure.
2012-08-23 14:37:38 +02:00
Zdenek Kabelac
195fe03075 cleanup: use proper activation_change_t 2012-08-23 14:37:38 +02:00
Zdenek Kabelac
449c092010 cleanup: use static char[] array 2012-08-23 14:37:38 +02:00
Zdenek Kabelac
90191e6ff2 cleanup: cast to matching type 2012-08-23 14:37:38 +02:00
Zdenek Kabelac
14d2b5a13f cleanup: use return_NULL
Function returns pointer, so use NULL.
2012-08-23 14:37:38 +02:00
Zdenek Kabelac
c8ad1f3e3a cleanup: ignore write/close output
Intentionaly ignore write and close errors.
2012-08-23 14:37:37 +02:00
Zdenek Kabelac
93f36fb77f cleanup: add va_end
Pair va_start with va_end.
2012-08-23 14:37:21 +02:00
Zdenek Kabelac
bd67a3151a cleanup: uint64_t casts 2012-08-23 14:37:21 +02:00
Zdenek Kabelac
ff86c6ed00 cleanup: keep MKNOD type cast clean
Setup major already a dev_t type before it gets shifted.
2012-08-23 14:37:21 +02:00
Zdenek Kabelac
ba309e0da5 cleanup: add standard GPL file header
Add FIXME about DEBUG define colission.
2012-08-23 14:37:20 +02:00
Zdenek Kabelac
b0b507b197 cleanup: use <> for system header file 2012-08-23 14:37:20 +02:00
Zdenek Kabelac
286cd2006b cleanup: drop unneeded included header files
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
2012-08-23 14:37:20 +02:00
Zdenek Kabelac
6d0abc6b48 cmirrord: check for result of chdir
Error exit if chdir fails.
2012-08-23 14:37:20 +02:00
Zdenek Kabelac
b1640df5e6 dmsetup: check if new_name is non NULL 2012-08-23 14:37:18 +02:00
Zdenek Kabelac
b9ae22d758 dmsetup: fix udev warning message
Configure option is --enable-udev_sync.
2012-08-23 14:36:12 +02:00
Zdenek Kabelac
7e318dad42 dmsetup: fix memleak in _get_split_name
Free allocated buffer in _get_split_name error path.
2012-08-23 14:36:10 +02:00
Zdenek Kabelac
59ca324c35 clvmd: release excl_uuid hash
Release allocated hash before exit.
2012-08-23 14:34:56 +02:00
Zdenek Kabelac
ed53b4b674 lvmetad: do not deref NULL pointer
Call log only for req.cft != NULL.
2012-08-23 14:34:54 +02:00
Zdenek Kabelac
3685701529 lvmetad: fix memleak on error path
Release allocated buffer on error path.
2012-08-23 14:33:27 +02:00
Zdenek Kabelac
8edc0e450d lvmetad: fix memleaks
Release allocated buffers in daemon_logf, daemon_log_parse
2012-08-23 14:33:23 +02:00
Peter Rajnoha
00877fe47b mirror: reconfigure_mirror_images not used 2012-08-15 10:44:19 +02:00
Zdenek Kabelac
54c24193f5 thin: lvcreate --discards 2012-08-09 16:25:52 +02:00
Zdenek Kabelac
80bf4eb035 thin: fix man page for lvs
Renamed discard -> discards
2012-08-09 16:25:25 +02:00
Zdenek Kabelac
b8a6efbcc0 thin: fix condition for kernels without discards
Report warning if the kernel is not support given discards settings.
(In this case the behavior is equal to IGNORE.)
2012-08-09 16:24:42 +02:00
Zdenek Kabelac
1f1c664b78 thin: default discards for old mda is IGNORE
If the discard was not set in metadata, use IGNORE, as this
is the equivalent behavior for this case.
2012-08-09 16:23:32 +02:00
Jonathan Brassow
de3b1c4506 RAID: Improve RAID argument handling.
Disallow '-m' for RAID types that have no mirror component and disallow
'-i' argument for RAID types that have no stripe component.
2012-08-08 12:32:27 -05:00
Petr Rockai
b61be64370 libdaemon: Draft logging infrastructure.
- logging is not controlled by "levels" but by "types"; types are
  independent of each other... implementation of the usual "log level"
  user-level semantics can be simply done on top; the immediate
  application is enabling/disabling wire traffic logging independently
  of other debug data, since the former is rather bulky and can easily
  obscure almost everything else
- all logs go to "outlets", of which we currently have 2: syslog and
  stderr; which "types" go to which "outlets" is entirely configurable
2012-08-08 09:44:19 +02:00
Alasdair G Kergon
7ecccc3099 thin: fix recent commits 2012-08-07 21:59:06 +01:00
Alasdair G Kergon
701b4a8363 thin: use discards as plural rather than singular
Global change from --discard to --discards, as that feels more natural.
2012-08-07 21:24:41 +01:00
Alasdair G Kergon
df452b47a1 release: update version/WHATS_NEW 2012-08-07 20:41:45 +01:00
Alasdair G Kergon
3a6bea990b thin: tidy thin discard code
Always store discard setting in LV metadata.  (Note that lvcreate_params
doesn't yet use --discard to set the initial value.)
Remove undocumented env var LVM_THIN_VERSION_MIN that has no use on a
live system.
Change verbose 'feature not found' messages to debug.
Use discard_str for string value of discard.
2012-08-07 20:40:19 +01:00
Alasdair G Kergon
597590da74 man: expand lvchange --discard entry 2012-08-07 20:20:16 +01:00
Alasdair G Kergon
1ca813083f thin: tidy commands.h arg lists
args are listed alphabetically.
lvconvert -T is covered in the second section not the first.
It could be tidied further or split out.
2012-08-07 20:10:06 +01:00
Alasdair G Kergon
b51241a346 thin: mention discard/zero in lvchange errmsg 2012-08-07 20:08:14 +01:00
Alasdair G Kergon
d01f8ee684 whitespace 2012-08-07 19:04:52 +01:00
Alasdair G Kergon
e4fdfa9d31 report: provide discard field value in full
I think it's better not to abbreviate human-readable fields like
'discard' to a single character.  Users can truncate it to the
first character themselves if they wish.

It's confusing to use the variable name discard for different things in
different places - use discard_str when it's a string not the enum.
2012-08-07 18:48:34 +01:00
Alasdair G Kergon
0650a16a22 activation: log target version present
Log (very verbose) the target version present in target_version.
2012-08-07 18:47:33 +01:00
Alasdair G Kergon
7b5ea9a5a8 thin: tighten discard string conversions
Respond with "unknown" rather than a NULL pointer if there's an
internal error and the discard value is invalid.

Don't accept 'no_passdown' or 'no-passdown' variants in the LVM
metadata: this is written by the program so should only ever contain
"nopassdown" and should be validated strictly against that.
2012-08-07 18:37:35 +01:00
Alasdair G Kergon
adfa778a58 thin: order discard enum alphabetically 2012-08-07 18:36:40 +01:00
Alasdair G Kergon
4dab0d3175 comments: misc updates
Miscellaneous clarifications to comments.
2012-08-07 18:34:30 +01:00
Alasdair G Kergon
016997acaf man: document allocation process in lvm.8 2012-08-07 02:06:42 +01:00
Peter Rajnoha
6e55201144 args: increase major:minor limit to 4095:1048575
Remove the limit for major and minor number arguments used while specifying
persistent numbers via -My --major <major> --minor <minor> option which
was set to 255 before. Follow the kernel limit instead which is 12 bits
for major and 20 bits for minor number (kernel >= 2.6 and LVM formats
that does not have FMT_RESTRICTED_LVIDS - so still keep the old limit
of 255 for lvm1 format).
2012-08-06 18:01:01 +02:00
Marian Csontos
3843f54974 [lvmetad] Continue reading/writing on EINTR 2012-08-02 16:50:37 +02:00
Marian Csontos
55c9286dea Remove redundant (potentially harmful) semicolon 2012-08-02 16:50:37 +02:00
Marian Csontos
49ae67cba3 lvmetad: Skip redundant checks on no input 2012-08-02 16:50:37 +02:00
Peter Rajnoha
9952331d5d make: fix make in scripts dir for --disable-applib 2012-08-01 15:48:53 +02:00
Zdenek Kabelac
286f298bb7 Fix dependecy build for scripts dir
Since now scripts builds binaries, build needs to wait for libs.
2012-08-01 13:57:23 +02:00
Peter Rajnoha
e309586aeb systemd: O_CLOEXEC not needed in activation generator
O_CLOEXEC not actually needed, this is just a simple program,
it is not supposed to fork/exec anywhere and anytime in the future.
2012-08-01 08:57:12 +02:00
Peter Rajnoha
c6cc871df8 make: use proper libs to make scripts subdir 2012-08-01 08:42:49 +02:00