| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The context to finish can be class C_Client_PutInode, which may drop
inode's last reference. So we should first drop object's reference,
then finish contexts.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
|
|
|
|
|
|
|
| |
This makes it possible to converse about op_cancel and cancel_linger_op
without getting too confused.
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|\
| |
| | |
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we get back a redirect reply, we clean up the Op's external references
and re-send using the target_oloc and target_oid. To facilitate this,
recalc_op_target() now only fills them in and overrides them with pool
cache semantics if they're empty.
Keep in mind that this is a pretty simple redirect formula -- the
Objecter will keep following redirects forever if that's what the OSDs
send back. The client is not providing any synchronization right now.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We have a little block to clean them up if we get back EAGAIN, but it's
actually leaking map references; we will also use this for redirects
from the OSDs.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
| |
| |
| |
| |
| |
| |
| | |
For now it's just a copy of base_oid, but soon we will allow it
to be overwritten for OSD-driven redirects.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Analagous to the oloc->base_oloc rename we did in
e2fcad09d94d965867147627b73e99da9454436f, we may specify a different
target name for a redirect. Rename the existing oid to base_oid to
avoid any confusion.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|/
|
|
|
|
|
|
| |
- Enabling subdir objects
- Created a Makefile-env.am with basic automake init
- Created .am files per subdir, included from src/Makefile.am
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This operation will copy an entire object (data, attrs, omap)
atomically. If the src_version does not match the source object, or
the source object is updated while the copy is in progress, we will
fail with a suitable error code. By atomic we mean that it will either
successfully copy the entire object in its entirety or it will fail (and
require no cleanup).
Add to C++ librados API only for now.
Signed-off-by: Sage Weil <sage@inktank.com>
Conflicts:
src/include/ceph_strings.cc
src/include/rados.h
src/osd/osd_types.cc
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure we don't dereference a NULL pointer. Note that we check a
bit further down if the target pool does not exist and return the proper
error.
Bug was reliably reproduced by
./ceph_test_rados_api_watch_notify --gtest_filter=LibRadosWatchNotify.WatchNotifyTimeoutTestPP
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
Add new rados operation to copy all user-visible content for an object
in a simple, safe way. Use a new object_copy_cursor_t to keep track of
our position.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
This is useful in general, and specifically will be useful for the
rados COPY operation.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
Normal clients have no map and need one to get started. If we are the
OSD, we will already have one and will get fed maps as they come in.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
Create a separate union in the args and clean up the code a bit so that
this doesn't reuse the (unrelated) watch helpers. No change in
protocol.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
We overwrite target_oloc.pool with the appropriate [read|write]_tier.
write_tier wins if it matches both.
We don't handle any sort of redirect yet.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|
|
|
|
|
|
|
|
|
| |
The only current user of the precalc_pgid field is list_objects. That's
fine, but we don't want new users to inadvertently appear and somehow
break the caching/tiering stuff by forcing us to go to the base pool
when we should be talking to somebody else. Add an assert to catch
these cases.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|
|
|
|
|
|
| |
For now we simply set target_oloc = base_oloc in recalc_op_target(), but
we will shortly be doing more interesting things with it there.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|
|
|
|
|
|
|
| |
We want to be able to target other pools for caching and tiering, so
we need to take an oloc from the client and translate it into an
actual target. Rename oloc to base_oloc to make clear which one it is.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|\
| |
| |
| |
| | |
Conflicts:
src/librados/AioCompletionImpl.h
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The registering flag no longer exists, and registered was using the
wrong property due to a copy-paste error.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Plain Ops that haven't finished yet need to be resent if the osdmap
transitions from full or paused to unpaused. If these Ops are
triggered by LingerOps, they will be cancelled instead (since
should_resend = false), but the LingerOps that triggered them will not
be resent.
Fix this by checking the registered flag for all linger ops, and
resending any of them that aren't paused anymore.
Fixes: #6070
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
|
| |\ \
| | |/ |
|
| | |\
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We do not try to merge rx buffers currently. Make that explicit and
documented in the code that it is not supported. (Otherwise the
last_read_tid values will get lost and read results won't get applied
to the cache properly.)
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Consider a sequence like:
1- start read on 100~200
100~200 state rx
2- truncate to 200
100~100 state rx
3- start read on 200~200
100~100 state rx
200~200 state rx
4- get 100~200 read result
Currently this makes us crash on
osdc/ObjectCacher.cc: 738: FAILED assert(bh->length() <= start+(loff_t)length-opos)
when processing the second 200~200 bufferhead (it is too big). The
larger issue, though, is that we should not be looking at this data at
all; it has been truncated away.
Fix this by marking each rx buffer with the read request that is sent to
fill it, and only fill it from that read request. Then the first reply
will fill the first 100~100 extend but not touch the other extent; the
second read will do that.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We don't want users to ever see the replay_version, which is about
to become private RADOS data.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There are a lot of pointers throughout our request infrastructure used solely
for exporting the version to users. The interfaces we actually expose only
provide a uint64_t (leaving off eversion_t's epoch), and that's all we're
going to maintain in our new user_version scheme, so don't pretend we'll
have more in our internal interfaces.
I audited this pretty carefully; in particular:
Op::objver is only used for passing data back to users via the calling
functions IoCtxImpl::last_objver, etc
IoCtxImpl::last_objver is used only for the set_sync_op_version() call, which
provides data only for the uint64_t get_last_version() and
rados_get_last_version() calls.
AioCompletionImpl::objver is used only for the uint64_t get_version() call.
LingerOp::pobjver is used only for referencing things that are now version_t.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is used for replay, so let's be more precise!
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have been returning the object's "user version" and using that
for replay, but that is in fact incorrect. In preparation for fixing
up the user version semantics, rename get_version to get_replay_version
and set_version to set_replay_version.
Signed-off-by: Greg Farnum <greg@inktank.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
This patch implements fallocate and punch hole support for Ceph fuse client.
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|/
|
|
|
|
| |
Keep consistency in the code to not generate warnings of this type.
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also: One redundant flush in AuthMonitor, two in PGMonitor, and
a ds << that should have been conditional in Monitor.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Signed-off-by: David Zafman <david.zafman@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Call op_cancel_map_check before cancel_op() in send_linger()
Fixes: #5784
Signed-off-by: David Zafman <david.zafman@inktank.com>
|
| |
| |
| |
| |
| |
| | |
Clarify locking by indicating that client_lock is held
Signed-off-by: David Zafman <david.zafman@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes regression in daemon commands with arguments; also resolves
reported bug with existing daemon code for arguments with
embedded spaces.
Fixes: #5503
Fixes: #5800
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise, we might leave a session attached to the
CommandOp for an down OSD. handle_osd_map will then
delete the session for the down OSD. tick() will then
attempt to follow the invalid pointer to find a
connection over which to send a MPing.
Fixes: #5798
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All call() routines get a format parameter; all places where
JSONFormatter was created get a new_formatter() instead.
'plain' formatting is unsupported, and help is forced to be
'json-pretty' as it was.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
|/
|
|
|
| |
Signed-off-by: Samuel Just <sam.just@inktank.com>
Fixes: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
The field is not used or useful since the monitor does not even look
at it (in Monitor::handle_command()). Avoid populating it and the
subsequent confusion for poor developers.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
fixes: #4982
fixes: #4983
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add rados_ioctx_namespace_set_key() and librados::IoCtx::namespace_set_key()
Add namespace to admin-daemon operations
Support namespace in osd map command
Add namespace to object_locator_t and hobject_t
Add random namespaces to psim program
Feature: #4982 (OSD: namespaces pt 1 (librados/osd, not caps))
Signed-off-by: David Zafman <david.zafman@inktank.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/Makefile.am
src/include/rados/librados.hpp
src/rgw/rgw_admin.cc
src/rgw/rgw_bucket.cc
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_json_enc.cc
src/rgw/rgw_main.cc
src/rgw/rgw_op.h
src/rgw/rgw_rados.cc
src/rgw/rgw_tools.cc
src/rgw/rgw_user.cc
src/rgw/rgw_user.h
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We already do this for Ops and LingerOps, but missed this when we added
CommandOps to the mix. The result is that an ill-timed mon disconnect will
leave a command map check (and thus the command) hanging.
This misbehavior was introduced when CommandOp was introduced, back in
commit 2e172225b01561bb7988b6d86d96ff4b9c1c5762, and we failed to fix it
in 8808ca57c652502d9cf803b0dc53673ca9dd62af.
Fixes: #5493
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|