That use is_truncated is simple and avoid nessesary list. We have to iterate 11
times initially if there is 100 buckets and iter_max_bucket is 10. We only need
10 times now.
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
The function called `rgw_read_user_buckets` has one option `bool *is_truncated`
which should be updated, and we could use `is_truncated` to avoid unnessesary
iteration.
Fixes: http://tracker.ceph.com/issues/19365
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
Saw a run that showed the notify_all pg_summary as the last
message for this thread; hopefully we can see if it is
blocked in notify_all() or not.
Signed-off-by: Sage Weil <sage@redhat.com>
This avoids a deadlock if some other message arrives before
the command reply and needs to take the mgr lock in dispatch.
Signed-off-by: Sage Weil <sage@redhat.com>
Add a procedure that permits reconstructing metadata in a potentially
damaged cephfs metadata pool and writing the results into a
freshly-initialized pool that refers to the same data pool. Add option
flags to override checks that would ordinarily prevent this and add
options to the recovery tools to write output to a separate pool instead of
the one selected for recovery. See docs/cephfs/disaster-recovery.rst for
details.
Fixes: http://tracker.ceph.com/issues/15068
Fixes: http://tracker.ceph.com/issues/15069
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Don't allow creation of filesystems with overlaying metadata pools unless
the user passes --allow-dangerous-pool-overlay.
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
If we go active multiple times we may already have an fsmap
subscription registered via MonClient, which means that we
won't receive a net new FSMap during the init phase. This is
trivial to reproduce; just 'ceph mgr fail x' and when it
activates the second time init() will get stuck waiting.
The core issue is that monc subs are stateful, but we forget
the various maps with the previous Mgr incarnation. Sipmle
workaround is to reset the mon connection as we init.
Signed-off-by: Sage Weil <sage@redhat.com>
rgw: Added code to correctly account for bytes sent/ received during a 'PUT' operation.
Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
rgw/lifecycle: do not send lifecycle rules when GetLifeCycle failed
Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Before this patch RGWBulkUploadOp::terminal_errors was declared as
std::initializer_list<int>. Unfortunately, a constexpr constructor
for it is available since C++14, not C++11. This was causing build
failures on FreeBSD.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
If we resize the blob we need to adjust the resolution of the
unused bitmap, and that is only possible for some bit patterns.
For now just ignore blobs with unused blocks.
Add an assert in add_tail() so that we don't forget that
add_tail is (probably) where we'd would do that adjustment.
Signed-off-by: Sage Weil <sage@redhat.com>
Refer to http://lttng.org/docs/v2.9/ on dlclose side effects. Workaround is to use
RTLD_NODELETE flag when calling dlopen.
Signed-off-by: Anjaneya Chagam <anjaneya.chagam@intel.com>
local dest_url variable was shadowing the one in the enclosing scope, so
the changes were not applied and no Location header was written on redirect
Fixes: http://tracker.ceph.com/issues/19488
Signed-off-by: Casey Bodley <cbodley@redhat.com>