use SEEK_HOLE/SEEK_DATA for sparse copy
Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
everytime I print radosgw-admin help message, it's too long, and I wanna add | more,
but the help message prints to cerr, so I can only add 2>&1 again, so I think it's
so inconvenient.
Signed-off-by: shawn chen <cxwshawn@gmail.com>
systemctl does not have a nice way to enumerate (active) units so we can
reload them. On centos7, the is-active wildcard syntax does not appear to
be supported. On fedora 22, it prints the state only but not which unit
the state belongs to.
Simply killall -1 instead.
Signed-off-by: Sage Weil <sage@redhat.com>
"--keyring" has higher priority than "--keyfile".
"--keyfile" option is overridden by "--keyring"
if latter is also specified.
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
In commit ff99af38df we changed
the value of hobject_t() (the min value) but did not handle
compatibility properly. Compensate by correctly decoding older
OSDs' notion of hobject_t min and mapping it to ours.
The hammer stable branch will have to compensate similarly so that
it can map our min value to its old min.
Fixes: #12536
Signed-off-by: Sage Weil <sage@redhat.com>
Don't link with 'global' from rbd (to match
autotools update fa78739). Fixes "g_ceph_context
defined twice" error.
Signed-off-by: John Spray <john.spray@redhat.com>
mds_rank_t is no longer a BOOST_STRONG_TYPEDEF, because that was
preventing the conversion between pairs of int and pairs of mds_rank_t
Signed-off-by: Casey Bodley <cbodley@redhat.com>
stream output operators for the stream types are not part of the standard,
so this statement no longer works:
std::stringstream stream;
std::cout << stream;
instead, use the streambuf's stream operator:
std::cout << stream.rdbuf();
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Currently do_autogen.sh does not allow to pass parameters
of configure to disable/enable components during building, which is not
flexible, this patch add the ability to it.
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Reviewed-by: Li Wang <liwang@ubuntukylin.com>
CLient::make_request() returns pointer of target inode, but it does not
increase reference count of the returned inode. The inode may get freed
when CLient::make_request() releases MetaRequest.
he fix is hold a reference for the returned inode. Since there are many
of places use CLient::make_request() directly or indirectly, it's easy
to leak reference. This patch uses intrusive_ptr to track the reference.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
The udev(7) man page states:
RUN
...
This can only be used for very short-running foreground tasks. Running
an event process for a long period of time may block all further
events for this or a dependent device.
Starting daemons or other long-running processes is not appropriate
for udev; the forked processes, detached or not, will be
unconditionally killed after the event handling has finished.
ceph-disk activate is far from a short-running task:
- check whether path is a block dev, for dirs call through to
activate_dir()
- call blkid to obtain the filesystem type for the block dev
- pull mount options from hard-coded ceph.conf file
- mount the OSD dev at a temporary path
- check the ceph magic for mounted filesystem
- read cluster uuid and locate corresponding /etc/ceph/{cluster}.conf
path
- read or generate (if missing) the OSD uuid
- create a file indicating init system usage (systemd)
- mount the device at a second (final) location
- umount (lazy) the temporary mount path
- enable the systemd ceph-osd@{osd_id} service
- start the systemd ceph-osd@{osd_id} service
This logic is therefore best left in a systemd service for execution. As
it is less limited in terms of execution time, and also allows for
improved event handling in future (fsck, dmcrypt mapping etc.).
This change sees 95-ceph-osd.rules.systemd trigger ceph-disk activate or
ceph-disk activate-journal via new ceph-disk-activate-journal@.service,
ceph-disk-activate@.service and ceph-disk-dmcrypt-activate@.service
systemd service files.
ceph-disk-dmcrypt-activate@.service makes use of the newly added
--dmcrypt parameter for ceph-disk activate.
Signed-off-by: David Disseldorp <ddiss@suse.de>