In self/unmanaged snaps mode, optimize removed_snaps comparison
for cases where removed_snaps has not changed. This exploits the
fact that remove_unmanaged_snap adds a dummy removed snapshot
to the end of removed_snaps, allowing for inexpensive detection
of changes. In cases where removed_snaps is very large, this
optimization improves performance dramatically.
Signed-off-by: Zac Medico <zmedico@gmail.com>
to avoid problems when admin sets system clock.
see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53901 for the reason
why we cannot use atomic<time_point>.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Xinze Chi <xinze@xsky.com>
This showed up during downstream testing for luminous. We are doing
getattr on the sysfs lnk files and the current policy does not allow
this.
Signed-off-by: Boris Ranto <branto@redhat.com>
** 1406089 Unused value
CID 1406089 (#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from this->read_line
(bl, chunk_size, reached_boundary, done) to r here,
but that stored value is overwritten before it can be used.
Signed-off-by: Amit Kumar <amitkuma@redhat.com>
Fixed the warning:
ceph/src/mgr/Mgr.cc: In lambda function:
ceph/src/mgr/Mgr.cc:413:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int osd_id = 0; osd_id < osd_map.get_max_osd(); ++osd_id) {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jos Collin <jcollin@redhat.com>
Fixed the warning :
ceph/src/osd/OSDMap.cc: In member function ‘int OSDMap::validate_crush_rules(CrushWrapper*, std::ostream*) const’:
ceph/src/osd/OSDMap.cc:3278:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pool.get_size() < (int)newcrush->get_rule_mask_min_size(ruleno) ||
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ceph/src/osd/OSDMap.cc:3279:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
pool.get_size() > (int)newcrush->get_rule_mask_max_size(ruleno)) {
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jos Collin <jcollin@redhat.com>
When deactivating mds, MDLog::trim() may start scatter-gather
process on mdsdir inode. Locker::scatter_writebehind() submits
log entry. So mds should make sure there is no scatter-gather
before capping log.
Fixes: http://tracker.ceph.com/issues/21467
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
This reverts commit f95798b3ad.
The config_path method wasn't available through inheritance as I thought. Oops.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/remotes/upstream/pull/17791/head:
client: set client_try_dentry_invalidate to false by default
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/remotes/upstream/pull/17768/head:
ceph: do link/rename semantic checks after srcdn is readable
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
The only caller currently is when we get as far as we can with backfill
or recovery but still have unfound objects. In this case, go back into
the *_wait state instead of appearing as though we are still doing
something.
Signed-off-by: Sage Weil <sage@redhat.com>
Luminous does a block_size granularity freelist, and assumes that
0~ROUND_UP_TO(SUPER_RESERVED,block_size) is used. Current master uses
min_alloc_size granularity and changes that assumption to
0~ROUND_UP_TO(SUPER_RESERVED,min_alloc_size). That means if master
fsck's a luminous-created bluestore, it will think 0x2000~2000 is used
(current baked-in min_alloc_size-based assumption) but the old freelist
says it is free (old mkfs assumption). The disparity is harmless since
the extent is below min_alloc_size, so ignore it.
Fixes: http://tracker.ceph.com/issues/21408
Signed-off-by: Sage Weil <sage@redhat.com>
Last_p should point to the _buffers.begin() when push front a ptr to _buffers,
which make the bufferlist can be full amount copied.
Fixes: http://tracker.ceph.com/issues/21338
Signed-off-by: Guan yunfei <yunfei.guan@xtaotech.com>
Some old bug (e.g., http://tracker.ceph.com/issues/20751) could
result in an UP+EXISTS osd having features==0. If that happens,
we shouldn't crash the mon, which (reasonably) does
if (osdmap.get_epoch()) {
if (osdmap.get_num_up_osds() > 0) {
assert(osdmap.get_up_osd_features() & CEPH_FEATURE_MON_STATEFUL_SUB);
check_subs();
}
}
Signed-off-by: Sage Weil <sage@redhat.com>
common: lockdep fixes
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>