Commit Graph

78740 Commits

Author SHA1 Message Date
Sage Weil
a53e731f8f osd/PrimaryLogPG: trim_object: simplify a bit more for post-snapdir world
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-21 14:29:32 -04:00
Sage Weil
203cd6fe81 osd/PrimaryLogPG: trim_object: drop legacy SnapSet handling
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-21 14:29:32 -04:00
Sage Weil
08d2c8875b common/AsyncReserver: get a cct
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-21 14:22:18 -04:00
Sage Weil
31a34946f7 osd: PG_STATE_BACKFILL -> PG_STATE_BACKFILLING
Match user-facing string

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-21 14:21:42 -04:00
Sage Weil
6fa40e44dc osd/osd_types: make BACKFILL <-> "backfilling" for parser
We render BACKFILL as "backfilling"; make sure parse works that
way too.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-21 14:21:41 -04:00
Sage Weil
5bcfaf4bd4 osd/osd_types: remove weird BACKFILL state hack
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-21 14:21:41 -04:00
Sage Weil
2e45497a20 osd/PG: Cancel{Recovery,Backfill} -> Defer{Recovery,Backfill}
"Defer" is more accurate here; we aren't canceling anything, just
rescheduling the work.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-21 14:21:33 -04:00
Zac Medico
caf6803b13 PGPool::update: optimize removed_snaps comparison when possible
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>
2017-09-21 10:33:23 -07:00
Kefu Chai
344f112bb3 common: use mono clock for HeartbeatMap
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>
2017-09-22 01:12:13 +08:00
Boris Ranto
394c26adb9 selinux: Allow getattr on lnk sysfs files
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>
2017-09-21 17:24:10 +02:00
amitkuma
c6737e1b8a rgw: Error check on return of read_line()
** 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>
2017-09-21 19:46:23 +05:30
Xie Xingguo
7d7993fd37 Merge pull request #17872 from joscollin/wip-osdmap-signed-unsigned-warning
osd: silence warnings from -Wsign-compare

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-09-21 21:02:57 +08:00
kungf
a2ac3078cc osd: make scrub right now when pg stats_invalid is true
Signed-off-by: kungf <yang.wang@easystack.cn>
2017-09-21 19:40:10 +08:00
Jos Collin
a38ad9714a mgr: silence warning from -Wsign-compare
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>
2017-09-21 14:36:38 +05:30
Jos Collin
85d6e4b09b osd: silence warnings from -Wsign-compare
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>
2017-09-21 12:45:15 +05:30
bspark
046d7390a1 osd: use dmclock library client_info_f function dynamically
to be able to apply QoS parameter changes at runtime in Ceph.

Signed-off-by: bspark <bspark8@sk.com>
2017-09-21 13:23:26 +09:00
Kefu Chai
998bf1b43c Merge pull request #17833 from mogeb/cache-tiering-doc
doc: update link to placing-different-pools

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-09-21 11:10:10 +08:00
Yan, Zheng
6ea85b3f8e mds: check ongoing catter-gather process before capping log
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>
2017-09-21 11:05:59 +08:00
Patrick Donnelly
82e63350c2
Merge PR #17849 into master
* refs/remotes/upstream/pull/17849/head:
	qa: get config only on running MDS

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 18:33:45 -07:00
Patrick Donnelly
a5d97ad257
client: use unique_ptr for locks
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 16:21:54 -07:00
Patrick Donnelly
fe0354a9b1
client: use unique_ptr for Formatter
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 16:15:58 -07:00
Patrick Donnelly
614b0d9368
qa: revert "qa: use config_path property instead of literal"
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>
2017-09-20 16:09:40 -07:00
Patrick Donnelly
8a535d9c72
qa: get config only on running MDS
Fixes: http://tracker.ceph.com/issues/21466

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 15:47:28 -07:00
Patrick Donnelly
8242210def
Merge PR #17791 into master
* refs/remotes/upstream/pull/17791/head:
	client: set client_try_dentry_invalidate to false by default

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 12:38:25 -07:00
Patrick Donnelly
fabdb55be3
Merge PR #17784 into master
* refs/remotes/upstream/pull/17784/head:
	vstart: create MDSs before filesystems

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 12:38:23 -07:00
Patrick Donnelly
a133f26945
Merge PR #17783 into master
* refs/remotes/upstream/pull/17783/head:
	mon/MDSMonitor: fix clog msgs on MDS rank add/rm

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 12:38:21 -07:00
Patrick Donnelly
ca775fd02d
Merge PR #17778 into master
* refs/remotes/upstream/pull/17778/head:
	client: move Fh init to ctor

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-09-20 12:38:18 -07:00
Patrick Donnelly
1b4f1168db
Merge PR #17768 into master
* refs/remotes/upstream/pull/17768/head:
	ceph: do link/rename semantic checks after srcdn is readable

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-20 12:38:16 -07:00
Sage Weil
597dfd1172 osd/PG: specify delay in Cancel{Recovery,Backfill}
For now it is always the retry interval, but later perhaps not!

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-20 14:32:21 -04:00
Sage Weil
3eadfa087f osd/PG: make some trivial events TrivialEvent
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-20 14:32:21 -04:00
Sage Weil
4b216771bd osd/PG: set {backfill,recovery}_wait when canceling backfill/recovery
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>
2017-09-20 14:32:21 -04:00
Sage Weil
4959ad310a os/bluestore: ignore 0x2000~2000 extent oddity from luminous upgrade
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>
2017-09-20 12:38:46 -04:00
Sage Weil
1bd202f451 Merge pull request #17807 from xiexingguo/wip-kill-add-interval-usage
osd/PrimaryLogPG: kill add_interval_usage

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-09-20 11:27:20 -05:00
Yuri Weinstein
f178c00ee3 Merge pull request #17723 from amitkumar50/cov-librados-3
rados: Initialization of alignment

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-09-20 09:26:41 -07:00
Mohamad Gebai
559ca9dd38 doc: update 'ceph osd pool set' example
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-09-20 17:58:08 +02:00
Sage Weil
354dccda32 osd: debug_bluestore on shutdown
...just like we do with filestore etc.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-20 11:32:45 -04:00
Sage Weil
28d9b6b0e9 os/bluestore: dump stray cache content on shutdown
Tracking down http://tracker.ceph.com/issues/21259.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-20 11:32:45 -04:00
Kefu Chai
73d4afbf8c Merge pull request #17747 from tchaikov/wip-qa
qa/standalone: respect $TEMPDIR

Reviewed-by: David Zafman <dzafman@redhat.com>
2017-09-20 23:08:47 +08:00
Josh Durgin
5cb4a6da3d Merge pull request #17828 from jdurgin/wip-21428
osd/PrimaryLogPG: request osdmap update in the right block

Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-20 08:07:56 -07:00
Ramana Raja
f4fc172259 ceph_volume_client: perform snapshot operations in
... client configured snap directory name, instead of in hard-coded
'.snap' directory.

Fixes: http://tracker.ceph.com/issues/21476

Signed-off-by: Ramana Raja <rraja@redhat.com>
2017-09-20 20:31:47 +05:30
Mohamad Gebai
2e5aed5fc6 doc: update link to placing-different-pools
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-09-20 13:19:55 +02:00
Yan Jun
f8b5e4cbe8 osd/PrimaryLogPG: drop unused variables
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
2017-09-20 17:05:23 +08:00
Yan Jun
bebea1c5d6 osd/PrimaryLogPG: avoid accessing value of map.end()
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
2017-09-20 17:04:56 +08:00
YunfeiGuan
ffa1f9998d librados: Fix a potential risk of buffer::list::claim_prepend(list& bl, unsigned int flags)
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>
2017-09-20 15:39:27 +08:00
Josh Durgin
afc6624f76 osd/PrimaryLogPG: request osdmap update in the right block
Fixes: http://tracker.ceph.com/issues/21428
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2017-09-20 01:18:35 -04:00
Kefu Chai
f27251432a Merge pull request #17785 from dzafman/wip-add-repair
test: Fix ceph-objectstore-tool usage check

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-09-20 12:35:16 +08:00
xie xingguo
05e92c0bfc osd/osd_type: get_clone_bytes - inline size() for overlapping size
This is faster and simpler. A similar issue can be found at:
https://github.com/ceph/ceph/pull/17807

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-09-20 11:31:35 +08:00
Kefu Chai
b49dd813a9 Merge pull request #17138 from Liuchang0812/wip-updata-osd-hostname-in-metaupdater
mgr: preventing blank hostname in DaemonState

Reviewed-by: John Spray <john.spray@redhat.com>
2017-09-20 11:22:49 +08:00
Sage Weil
8399833f3d osd/OSDMap: ignore xinfo if features == 0
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>
2017-09-20 13:11:10 +10:00
Kefu Chai
497c845c66 Merge pull request #17738 from jtlayton/wip-jlayton-20988
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>
2017-09-20 11:11:02 +08:00