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

6613 Commits

Author SHA1 Message Date
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
Peter Rajnoha
41d8247b51 Add support for systemd socket handover for common daemon-server code and also add support for new OOM killer adjustment interface.
This code is already a part of dmeventd, but it's modified slightly to check
sockets instead of FIFOs.
2012-02-28 13:05:21 +00:00
Zdenek Kabelac
a22be5e2e9 Test dm_hash_insert() failures mem failures 2012-02-28 11:12:58 +00:00
Zdenek Kabelac
0098904026 Check error from _lv_each_dependency
_lv_mark_if_partial_collect cannot fail, however it's good to keep
checking here as we do in all other cases.
2012-02-28 11:10:45 +00:00
Zdenek Kabelac
c0d7975bb2 Check result of export_vg_to_buffer
and avoid usage of failed buffer.
2012-02-28 11:09:06 +00:00
Zdenek Kabelac
22266ea325 Add stacktrace for init_lvmcache_orphans fail path 2012-02-28 11:08:04 +00:00
Zdenek Kabelac
77e9346a06 Ensure clvmd message is always \0 terminated
Drop whole buffer clearing (most messages at <100 bytes).
Just make sure we have always \0 terminated string for strlen() operations.
(before for PIPE_BUF sized messages this was not set).
2012-02-28 11:06:56 +00:00
Zdenek Kabelac
c998f7d27a Better detection of missing dmeventd fifo connection 2012-02-28 11:03:24 +00:00
Zdenek Kabelac
c9d0627af6 Missed to properly merge patch for definition of MAX_MISSING_LEN
(fix previous commit)
2012-02-28 10:42:20 +00:00
Zdenek Kabelac
49d8753caf Add log_sys_error for close 2012-02-28 10:14:06 +00:00
Zdenek Kabelac
fdc31c7a8a Add some stack traces for dev_close error paths 2012-02-28 10:11:35 +00:00
Zdenek Kabelac
535fbc2256 Explicitely ignore errors in label_read iteration.
We don't want stack traces here, so mark as void.
2012-02-28 10:10:07 +00:00
Zdenek Kabelac
9cdfa9e854 Explicitely check list size of segments
instead of checking for NULL from last_seg and first_seg.
2012-02-28 10:08:20 +00:00
Zdenek Kabelac
c3cb4bb872 Duplicate standard in/out descriptors for daemon
Addressing somewhat tricky bug here.
Since stdin,stdout,stderr were closed it's been occasionally possible to
see some unexpected messages to be flowing into a clvmd and generating some
randomly sized allocation of many megabytes. Since the message was not
being generated by standard send_message() construction, after some more
testing it apperead to be a debug log message - thus something has flown
to local socket opened on strandard out descriptor.

To fix the issue - use standard file descriptor duplication code for daemons.

For making easier debugging of polling daemon - developer might want to recompile
without modifition of standard file descriptors.
2012-02-28 10:06:53 +00:00
Zdenek Kabelac
da0f745cb6 Limit max size of clvmd message
This could be seen as some sort of simple validation - it's not easy to
recognize a valid message for now - but we definitely do not want to
allocate a lot of megabytes in  clvmd memory locked daemon when broken
message gets in.

Size of 8000 is just selected for now - possibly there could be much
lower value put in.
2012-02-28 09:58:19 +00:00