PG: add a requeue_op() function to complement requeue_ops().

Signed-off-by: Greg Farnum <greg@inktank.com>
ReplicatedPG: copy: conditionally requeue copy ops when cancelled

We may need to requeue copy ops which are cancelled as part of an acting
set change but don't change the primary. To support this, add a
"requeue" flag to cancel_copy_ops() and copy_ops(), as well as to
CopyResults. The CopyCallback is then responsible for requeuing (the
higher layers can't do so as they can't know which request actually
triggered the copy).

Signed-off-by: Greg Farnum <greg@inktank.com>
Merge pull request #746 from ceph/wip-6582

Wip 6582

Reviewed-by: Sage Weil <sage@inktank.com>
common: get_command_descriptions use cout instead of dout

Using dout instead of cout creates noise and makes it more difficult for
people trying to debug a failure in test_ceph_argparse.py.

The output of get_command_descriptions is modified to only contain
parseable information and the code parsing its output
test_ceph_argparse.py is removed.

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #748 from dachary/master

autoconf: fix typo on AM_COMMON_CFLAGS
Merge remote-tracking branch 'gh/next'
Merge pull request #747 from dachary/wip-commands

common: get_command_descriptions use cout instead of dout

Reviewed-by: Sage Weil <sage@inktank.com>
client: fix invalid iterator dereference in Client::trim_caps()

trimming inode drops a reference to the inode's parent, it may cause
the inode's parent also be trimmed. If the cap iterator 'p' happens to
point to the inode's parent and the inode's parent is trimmed, the cap
iterator 'p' become invalid.

Fix the issue by delaying removing cap from the seesion cap list.
(similar to what the kclient does)

Fixes #6599
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: update backtrace when old format inode is touched

We updated inode format version to 7 when introducing inode backtrace.
If we found a inode's format version < 7 when fetching the inode, set
the inode's backtrace_version to 0, to indicate the inode's backtrace
is out of data. When touching a inode with backtrace_version == 0, we
also update its backtrace.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
common/cmdparse: fix memory leak

demangle is allocating with malloc() in this case.

Signed-off-by: Sage Weil <sage@inktank.com>
common/BackTrace: fix memory leak

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #751 from ceph/wip-6603

a couple trivial leaks
librbd: wire up flush counter

Fixes: #5668
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #753 from ceph/wip-5668-b

librbd: wire up flush counter
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
ceph-mon: add debug to ip selection

This will hopefully help us track down #5804.

Signed-off-by: Sage Weil <sage@inktank.com>
librbd: fix build error

From a10703008f7f4eb57a62658f2b9a015eb81509d0.

Signed-off-by: Sage Weil <sage@inktank.com>
librbd: parse args to ceph_test_librbd

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: turn swift COPY into PUT

Fixes: #6606
The swift COPY operation is unique in a sense that it's a write
operation that has its destination not set by the URI target, but by a
different HTTP header. This is problematic as there are some hidden
assumptions in the code that the specified bucket/object in the URI is
the operation target. E.g., certain initialization functions, quota,
etc. Instead of creating a specialized code everywhere for this case
just turn it into a regular copy operation, that is, a PUT with
a specified copy source.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: get rid of req_state.bucket_name

No need for this field, as we already have req_state.bucket_name_str.
This saves us some memory allocation / freeing through every request
processing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: init src_bucket_name, src_object in the S3 handler

Be consistent and initialize these fields also in the S3 case.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>