1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

6827 Commits

Author SHA1 Message Date
Zdenek Kabelac
d27834ff0a Explicitely ignore fail from this label_read 2012-03-01 21:57:43 +00:00
Zdenek Kabelac
d102667b6d Add some more pointer validation
Ensure _display_name() and _add_dep() would not deref NULL names.
Switch to use internal dm_basename().
2012-03-01 21:56:44 +00:00
Zdenek Kabelac
e922a85c51 Test alloc fail 2012-03-01 21:49:32 +00:00
Zdenek Kabelac
2236c69c42 Replace goto with just log_debug
FIXME: temporal quick hack to make things green
There might be a better reaction.
2012-03-01 21:46:31 +00:00
Zdenek Kabelac
a75b0d4ee6 Check for alloc error
Simplify segtype_str usage and check for NULL segtype.
2012-03-01 21:21:54 +00:00
Zdenek Kabelac
f996955304 Log sys error for lseek 2012-03-01 21:19:20 +00:00
Zdenek Kabelac
27088d51a2 Debug log for hold_lock failure 2012-03-01 21:18:38 +00:00
Zdenek Kabelac
73ef9a7eaa Log sys errors 2012-03-01 21:17:29 +00:00
Zdenek Kabelac
48073da2b8 Backtrace for failing drop_cached_metadata 2012-03-01 21:16:44 +00:00
Zdenek Kabelac
657826a255 Check for udev_get_dev_dir result
Don't use NULL return value.
2012-03-01 21:16:05 +00:00
Zdenek Kabelac
465fe71f6c Correct enum type
Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
2012-03-01 21:14:43 +00:00
Zdenek Kabelac
0b60d3a05e Few more close and dev_close trace
Adding (void) where we cannot really report an error.
2012-03-01 21:12:37 +00:00
Petr Rockai
d84d5b113e Use 64 bit integers for device size & label sector in _pv_populate_lvmcache in
lvmetad client code. Fixes RHBZ 798267.
2012-03-01 20:04:44 +00:00
Petr Rockai
10dab1c621 Add a regression test for the PSize bug in pvs/lvmetad. 2012-03-01 20:03:45 +00:00
Petr Rockai
31128d8747 Use 64 bit integers whenever extracting numbers from daemon replies. 2012-03-01 19:54:53 +00:00
Jonathan Earl Brassow
db424996be s/CPG_/CS_: Various CPG constants are going away, even though CPG itself stays
F17 is getting rid of OpenAIS libraries (and checkpointing).  While the
CPG stuff is staying, some if its constants are being removed.  So, we
must adjust and use the remaining constants which the CPG constants were based on.

[~]# egrep 'CPG_DISPATCH_ALL|CPG_OK' /usr/include/*/*
corosync/corotypes.h:#define CPG_DISPATCH_ALL     CS_DISPATCH_ALL
corosync/corotypes.h:#define CPG_OK               CS_OK
2012-03-01 17:41:39 +00:00
Zdenek Kabelac
86d71759d0 Missed ; 2012-03-01 10:46:39 +00:00
Zdenek Kabelac
fa750fd0c5 More useful debug message 2012-03-01 10:41:48 +00:00
Zdenek Kabelac
6ebad37e9b Add _rimage as reserved suffix 2012-03-01 10:39:21 +00:00
Zdenek Kabelac
05a2d7bcfd Add cast for ptrdiff_t - cleanup gcc warning 2012-03-01 10:31:35 +00:00
Zdenek Kabelac
6732bedecb Improve error logging
Log errors instead of plain return 0.
Check for f->private strdup result.
2012-03-01 10:30:48 +00:00
Zdenek Kabelac
041c69362d Add stack trace for lv_reduce
Use common code call with stack trace.

TODO: maybe the release_lv_segment_area()
should be actually able to return error code to upper level.
2012-03-01 10:09:36 +00:00
Zdenek Kabelac
c53667ac45 Check for version string buffer
Since lvm seems to call driver_version(NULL, 0)  this would lead
to crash. Though the combination of the code is probably very hard to hit.
If the user doesn't supply version buffer, just skip printing to buffer.
2012-03-01 10:07:38 +00:00
Zdenek Kabelac
c9ab8ce0a3 Check for allocation error
return ENOMEM when malloc fails.
2012-03-01 09:54:23 +00:00
Zdenek Kabelac
f5de369e04 Log fail of pthread_join
Syslog error outside of mutex section.
2012-03-01 09:50:04 +00:00
Zdenek Kabelac
53bdfe124b Fix leak of FID structure 2012-03-01 09:46:38 +00:00
Zdenek Kabelac
052269aa2c Wipe initial 4KiB for non-zeroed thin volumes
If the thin pool has disabled zeroing  (created with -Zn), we at least
clear initial 4KiB of such thin volume (provisions 1st block).

If lvcreate is executed with '-an' command will abort (same way like we for
normal LV - however for normal LV option -Zn may skip clearing completely,
for thin volumes this option is not supported (applies only for pools).
2012-02-29 22:08:57 +00:00
Jonathan Earl Brassow
50bdd70043 Allow cluster mirrors to handle the absence of the checkpoint lib (libSaCkpt).
The OpenAIS checkpoint library is going away; therefore, cmirrord must
operate without it.  The algorithms the handle the timing of when to send
a checkpoint, the determination of what to send, and which ongoing cluster
requests are relevent with respect to the checkpoints are unaffected.  We
need only replace the functions that actually perform the storing/transmitting
and retrieving/receiving of the checkpoint data.  Rather than store the
checkpoint data in an OpenAIS checkpoint file, we simply transmit it along
with the message that notifies the incoming node that the checkpoint is
ready.
2012-02-29 21:15:34 +00:00
Alasdair Kergon
6508cc6805 Pass 'single_device' parameter down to suppress 'Can't find uuid' messages
when reading VG text metadate and called from pvscan --lvmetad.

(Longer-term, that check needs moving outside of that code.)
2012-02-29 02:35:35 +00:00
Petr Rockai
942144f4a3 Fix a whitespace bug in the last checkin. 2012-02-29 00:19:14 +00:00
Petr Rockai
ce80d6e401 Attempt a fix for lvm shell accumulating copies of orphan PVs with each "pvs"
invocation.
2012-02-29 00:18:27 +00:00
Alasdair Kergon
193d697ba4 expose new include files to build 2012-02-28 18:35:32 +00:00
Alasdair Kergon
ba23f9e71f Reflect new file locations, include file updates etc. 2012-02-28 18:35:04 +00:00
Alasdair Kergon
3af3a9a68b remove old makefile 2012-02-28 18:31:28 +00:00
Alasdair Kergon
09977e0364 move daemon files 2012-02-28 18:30:39 +00:00
Alasdair Kergon
33af17af76 new makefiles 2012-02-28 18:26:40 +00:00
Alasdair Kergon
2f9161a1e2 Series of commits to move daemon code into separate top-level dir and
fix build deps etc.
2012-02-28 18:25:48 +00:00
Alasdair Kergon
b10489f568 Invert some return codes (which used to get ignored anyway) in cases when
lvmetad is not being used.
2012-02-28 18:23:56 +00:00
Alasdair Kergon
0c598c8270 Bypass lvmetad fns when not configured to use lvmetad. 2012-02-28 18:22:52 +00:00
Alasdair Kergon
d7d948eacc Add LVMETAD_SUPPORT 2012-02-28 18:20:58 +00:00
Alasdair Kergon
dea586a587 If lvmetad fails, don't set _has_scanned 2012-02-28 18:20:17 +00:00
Alasdair Kergon
d7ca49059f Define LVMETAD_SUPPORT in source code 2012-02-28 18:18:48 +00:00
Alasdair Kergon
830057e338 spacing 2012-02-28 18:17:37 +00:00
Alasdair Kergon
98711b45c7 I don't think -u is meant to be used with lvmetad 2012-02-28 18:16:23 +00:00
Alasdair Kergon
b009e2235e Check return values after calling new lvmetad fns
(Haven't checked error path handling though)
2012-02-28 18:08:08 +00:00
Alasdair Kergon
7a3de26248 Fix empty string warning logic in _find_config_str. (1.02.68)
pvcreate gives
WARNING: Ignoring unsupported value for metadata/pvmetadataignore.

It was warning if there is no config file entry instead of only if the node
exists but is empty.
2012-02-28 17:46:47 +00:00
Zdenek Kabelac
505c0cbb2e Check for failing dm_asprintf 2012-02-28 14:25:37 +00:00
Zdenek Kabelac
f2cbcb027e Using enum types for enums
alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
2012-02-28 14:24:57 +00:00
Zdenek Kabelac
7ed8790301 Revert free of allocated segtype
lvm_register_segtype takes ownership of segtype and call destructor
for it in error path.
2012-02-28 14:23:41 +00:00
Peter Rajnoha
3db3d4d895 LVMetaD socket operates in non-blocking mode. 2012-02-28 13:07:03 +00:00