Wrap partprobe with flock to stop udev from issuing BLKRRPART because
this is racy and frequently fails with a message like:
Error: Error informing the kernel about modifications to partition
/dev/vdc1 -- Device or resource busy. This means Linux won't know about
any changes you made to /dev/vdc1 until you reboot -- so you shouldn't
mount it or use it in any way before rebooting.
Opening a device (/dev/vdc for instance) in write mode indirectly
triggers a BLKRRPART ioctl from udev (starting version 214 and up)
when the device is closed (see below for the udev release note).
However, if udev fails to acquire an exclusive lock (with
flock(fd, LOCK_EX|LOCK_NB); ) the BLKRRPART ioctl is not issued.
045e00cf16/src/udev/udevd.c (L1042)
Acquiring an exclusive lock before running the process that opens the
device in write mode is therefore an effective way to control this
behavior.
git clone git://anonscm.debian.org/pkg-systemd/systemd.git
systemd/NEWS:
CHANGES WITH 214:
* As an experimental feature, udev now tries to lock the
disk device node (flock(LOCK_SH|LOCK_NB)) while it
executes events for the disk or any of its partitions.
Applications like partitioning programs can lock the
disk device node (flock(LOCK_EX)) and claim temporary
device ownership that way; udev will entirely skip all event
handling for this disk and its partitions. If the disk
was opened for writing, the close will trigger a partition
table rescan in udev's "watch" facility, and if needed
synthesize "change" events for the disk and all its partitions.
This is now unconditionally enabled, and if it turns out to
cause major problems, we might turn it on only for specific
devices, or might need to disable it entirely. Device Mapper
devices are excluded from this logic.
Fixes: http://tracker.ceph.com/issues/15176
Signed-off-by: Marius Vollmer <marius.vollmer@redhat com>
Signed-off-by: Loic Dachary <loic@dachary.org>
mds execv() when handling the "respawn" command, to avoid fd leakage,
and enormous CLOSE_WAIT connections after respawning, we need to set
FD_CLOEXEC flag for the socket fds.
Fixes: http://tracker.ceph.com/issues/16390
Signed-off-by: Kefu Chai <kchai@redhat.com>
mds execv() when handling the "respawn" command, to avoid fd leakage,
and enormous CLOSE_WAIT connections after respawning, we need to set
FD_CLOEXEC flag for the socket fds.
Fixes: http://tracker.ceph.com/issues/16390
Signed-off-by: Kefu Chai <kchai@redhat.com>
Require the net gain of compression at least to be at a specified ratio,
otherwise we don't compress.
Ask for compressing at least 12.5% off, by default.
This is for the sake of performance because if the compression turns out
to be meaningless(saving little space), we can simply shut it down, as we
know the compression/decompression can be rather CPU-consuming.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* crush: so we don't see the reference after the removing, this keeps
check_item_loc() happy, and move_bucket() use check_item_loc() to see if
the removed bucket disappears after the removal.
* test: also add unittest_crush_wrapper::CrushWrapper.insert_item
Fixes: http://tracker.ceph.com/issues/16525
Signed-off-by: Kefu Chai <kchai@redhat.com>
* some of the libs shares the same .cc which has static C++ variables. if
we link against the different libs sharing the same static C++
variables, and the dtor of the C++ variables has side-effects, among
other things, deallocates a memory chunk. then, we are in the trouble of
double free. so "osd" lib is removed.
* some of the libs are referenced by the linked lib, so no need to link
against them again. for example, BLKID_LIBRARIES are linked by
libcommon, so we can remove it from the linked libs list.
* and lib "os" and "cls_references_objs" are not used by libcephfs at all,
so remove them.
Fixes: http://tracker.ceph.com/issues/16556
Signed-off-by: Kefu Chai <kchai@redhat.com>
Fixes: http://tracker.ceph.com/issues/16494
Needed to keep input data around to be forwarded correctly. Also, master
does not send any data back, so don't try to parse anything.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
...and restructure the "early adopters" page
into a "best practices" guide. Early adopters
are now just adopters :-)
Signed-off-by: John Spray <john.spray@redhat.com>
Deleted README.cmake.md and put any helpful
information it had into README.md.
Also a added note about which tests get executed
by ctest.
Signed-off-by: Ali Maredia <amaredia@redhat.com>