This is more efficient and more explicit than shared_ptr. It will also
allow us to put these in intrusive lists.
Note that before we used the shared_ptr OnDelete property only for the
live ops and left it off for the history. Here we rename is_tracked to
state and explicit note whether we are untracked, live, or history.
Also, now that we #include OpRequest in osd_types.h, we have to include
the .cc file (and ~OpRequest definition) in libcommon to avoid a link
error on all the unit tests etc.
Signed-off-by: Sage Weil <sage@redhat.com>
This seems silly now, but is needed in order to switch from shared_ptr to
intrusive_ptr. The TrackOp is the refcounted thing, and we want to be
able to cast beween MutationRefs and MDRequestRefs, so... we need to make
sure the refcounting is done via a common parent, TrackedOp.
Signed-off-by: Sage Weil <sage@redhat.com>
The current code emits a newline after swift errors, but fails
to account for it when it calculates 'content-length'. This results in
some clients (go github.com/ncw/swift) producing complaints about the
unsolicited newline such as this,
Unsolicited response received on idle HTTP channel starting with "\n"; err=<nil>
This logic eliminates the newline on flush. This makes the content length
calculation correct and eliminates the stray newline.
There was already existing separator logic in the rgw plain formatter
that can emit a newline at the correct point. It had been checking
"len" to decide if previous data had been emitted, but that's reset to 0
by flush(). So, this logic adds a new per-instance variable to separately
track state that it emitted a previous item (and should emit a newline).
Fixes: http://tracker.ceph.com/issues/18473
Signed-off-by: Marcus Watts <mwatts@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
cmake: Fix broken async/rdma compilation since move to libceph-common
Reviewed-by: Adir Lev <adirl@mellanox.com>
Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Amir Vadai <amir@vadai.me>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Build/link of zstd itself is maybe not ideal, but it works fine.
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
We can delete qp only in RDMADispatcher::handle_async_event() which call
"erase_qpn" to enable deletion.
issue: 959004
Change-Id: Iab69cb365b37a09e9608d4b3c595e05278bbe021
Signed-off-by: Sarit Zubakov <saritz@mellanox.com>
Fixes: 6e4ed291afc3 ("msg: add ms_bind_before_connect to bind before connect")
Change-Id: Ia45f215b5d59dfc8545017518e5162404059829e
Signed-off-by: Amir Vadai <amir@vadai.me>
This reverts commit dd48b972afde2dfa9ab1a6942c7961750222986d.
Fixes: http://tracker.ceph.com/issues/18624
Signed-off-by: David Zafman <dzafman@redhat.com>
We have an updated nfs-utils that is no longer
generating spurious selinux warnings on CentOS.
Fixes: http://tracker.ceph.com/issues/16397
Signed-off-by: John Spray <john.spray@redhat.com>
RGW NFS fhcache/RGWFileHandle operators assume existence of the
full chain of parents from any object to the its fs_root--this is
a consequence of the weakly-connected namespace design goal, and
not a defect.
This change ensures the invariant by taking a parent ref when
objects are interned (when a parent ref is guaranteed). Parent
refs are returned when objects are destroyed--essentially by the
invariant, such a ref must exist.
The extra ref is omitted when parent->is_root(), as that node is
not in the LRU cache.
Fixes: http://tracker.ceph.com/issues/18650
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>