Hongtong Liu [Sun, 22 Jan 2017 09:25:04 +0000 (17:25 +0800)]
os/bluestore: fix NVMEDevice::open failure if serial number ends with a number
buf in effect is the serial number in ceph.conf and
the serial number consists of 16 hexadecimal characters.
1. In order to avoid ignoring the numbers, scan buf
with isxdigit.
2. In order to ignore all the potential garbage,
scan buf from the beginning.
Signed-off-by: Hongtong Liu <hongtong.liu@istuary.com>
Jason Dillaman [Fri, 20 Jan 2017 19:26:43 +0000 (14:26 -0500)]
journal: don't hold future lock during assignment
It's possible that the future raced with its owner and reaches
an empty reference count. This was resulting in the future being
destructed while its lock was still held.
Fixes: http://tracker.ceph.com/issues/18618 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Venky Shankar [Thu, 1 Dec 2016 04:57:30 +0000 (10:27 +0530)]
librbd: Create few empty objects during copyup
This is based out of Doug's (@fullerdj) work (PR #9329)
as an attempt to avoid creating empty objects when
flattening an image and otherwise whenever unnecessary.
This gives good optimization benefit when a parent image
is sparsely populated. Moreover, this change is required
for correct behavior when checking disk usage of a clone
(which used to report fully allocated image due to all,
including empty objects being created during flatten).
Signed-off-by: Douglas Fuller dfuller@redhat.com Signed-off-by: Venky Shankar <vshankar@redhat.com>
Venky Shankar [Mon, 5 Dec 2016 09:20:06 +0000 (14:50 +0530)]
librbd: make has_parent() prone to callers from copyup
This is required when CopyupRequest would need to invoke
pre_object_map_update() as part of upcoming changes to
create fewer child image objects whenever possible.
CopyupRequest constructor accepts image extents as an
rvalue forcing the caller to transfer ownership to it
and leaving the original variable in an unspecified
stated making has_parent() return incorrect state when
invoked from CopyupRequest. Therefore, introduce a
private tracking state that can be used in place of
checking emptiness of parent image extents.
Sage Weil [Fri, 20 Jan 2017 03:09:35 +0000 (21:09 -0600)]
osdc/Objecter: infer ptruncated on old OSDs via max_entries
If we do not get an explicit 'more' value from the OSD, infer it by
checking whether we got the max requested entries. On old OSDs, which
don't enforce a limit, this will work. On new OSDs, we will get the
explicit result.
common/pick_address.cc: Copy public_netw to cluset_netw if cluster empty
- When public network is set, but cluster network is not, then
the cluster-bindings would be on 0.0.0.0 which could be unexpeted.
In this commit we copy the public network into the cluster network
to make sure that the cluster backend is not bound on 0.0.0.0
Which could be consideren an insecure, or unexpected, action.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Sage Weil [Mon, 16 Jan 2017 18:48:06 +0000 (13:48 -0500)]
osdc/Objecter: add pmore argument to omap_get_{keys,vals}
Note that the MDS callers have new #warnings indicating that they
are not providing the pmore argument and are thus broken. (They
were already broken.)
Sage Weil [Sun, 15 Jan 2017 04:23:11 +0000 (23:23 -0500)]
osd/PrimaryLogPG: tell client if we truncate results
If we truncate the results of the omap read commands,
provide a flag so that the caller knows there is more
to be read. We don't need to provide the name of the
next key because the interface is defined as
"start_after" (not "start_with"), allowing them to use
the last key they received.
Sage Weil [Wed, 18 Jan 2017 23:02:54 +0000 (17:02 -0600)]
mon/OSDMonitor: make 'osd crush move ...' work on osds
Currently it only allows you to move buckets, which is annoying and much
less useful. To move an OSD you need to use create-or-move, which is
harder to use.
Fixes: http://tracker.ceph.com/issues/18587 Signed-off-by: Sage Weil <sage@redhat.com>
Nathan Cutler [Wed, 18 Jan 2017 21:17:49 +0000 (22:17 +0100)]
doc: clarify SubmittingPatches.rst
This commit clarifies that folks opening bugfix PRs that need backporting to
one or more stable branches should always target master, and that the
backporting itself takes place only after the master PR is merged.
rgw: fix handling RGWUserInfo::system in RGWHandler_REST_SWIFT.
Before this patch the flag was wrongly handled in the Swift API
implementation. In rare conditions this might result in setting
req_state::system_request.
This may happen only if both of those conditions are fulfilled:
* RadosGW is running in a multi-site configuration (at least
one user with the system flag turned on is present),
* the "rgw_swift_account_in_url" configurable has been switched
to true. The value is false by default and our documentation
doesn't actually mention about the option.
The issue doesn't affect Jewel nor any previous release.
Matt Benjamin [Wed, 18 Jan 2017 04:27:41 +0000 (23:27 -0500)]
librgw: remove call to crypto::shutdown
The call is cognate to removed code in radosgw, and triggers an
assert that the crypto module has already been shutdown. With this
and preceding changes, I see clean shutdown on abnormal termination
of nfs-ganesha during startup.
Fixes: http://tracker.ceph.com/issues/18585 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Sage Weil [Tue, 17 Jan 2017 15:20:07 +0000 (10:20 -0500)]
os/bluestore: return blocks allocated from allocate()
Instead of having a separate output argument with the number of
blocks allocated, just return it via the return value. Simplifies
the calling convention.
Sage Weil [Tue, 17 Jan 2017 15:56:13 +0000 (10:56 -0500)]
os/bluestore: manage vector from ExtentList
ExtentList was previous relying the caller to preallocate/size the
vector to be large enough for the worst case allocation of extents,
and keeping it's own manual count of the extent list size. Instead,
manage that from ExtentList, and remove the preallocation from the
callers.
Fixes: http://tracker.ceph.com/issues/18573 Signed-off-by: Sage Weil <sage@redhat.com>
Ricardo Dias [Fri, 13 Jan 2017 20:15:02 +0000 (20:15 +0000)]
cmake: fix rpath on shared libraries and executables
The problem was due to the attempt of CMake to rewrite the RPATH of
the executables, or shared libraries, that didn't have any RPATH linked
during the building phase.
Currently INSTALL_RPATH is already set for all binaries. This patch
sets an empty INSTALL_RPATH for all binaries that don't depend on
any internal (also being built) target.
Mingxin Liu [Fri, 13 Jan 2017 07:12:34 +0000 (15:12 +0800)]
OSDMonitor: drop report message from all another reporters is not reasonable
if osd failed finally, this may make these reporters cannot receive lastest
update right away, besides, it's not effective to make a traverse of all reporters