summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wilkins <john.wilkins@inktank.com>2012-12-07 15:49:00 -0800
committerJohn Wilkins <john.wilkins@inktank.com>2012-12-07 15:49:00 -0800
commit13e3e5866c607e7e20f3680a77637057fc9c48fd (patch)
tree09798c0f54c6eda3bc218ea9c43331b0992c63d1
parente0761fbdb2868bb06c896dea176c980aa151773a (diff)
parentf098cb9195319fe026e6f1fcbd0547d7c2e82c61 (diff)
downloadceph-13e3e5866c607e7e20f3680a77637057fc9c48fd.tar.gz
Merge branch 'master' of https://github.com/ceph/ceph
-rw-r--r--PendingReleaseNotes3
-rw-r--r--src/Makefile.am2
-rw-r--r--src/client/Client.cc3
-rw-r--r--src/common/config_opts.h1
-rw-r--r--src/include/rbd/librbd.h2
-rw-r--r--src/librados/IoCtxImpl.cc6
-rw-r--r--src/librbd/internal.cc188
-rw-r--r--src/librbd/internal.h2
-rw-r--r--src/mkcephfs.in2
-rw-r--r--src/mon/Monitor.cc40
-rw-r--r--src/mon/Monitor.h2
-rw-r--r--src/mon/PGMap.cc5
-rw-r--r--src/mon/PGMonitor.cc6
-rw-r--r--src/os/HashIndex.cc4
-rw-r--r--src/rbd.cc1
-rw-r--r--src/test/filestore/store_test.cc15
-rw-r--r--src/upstart/ceph-all.conf (renamed from src/upstart/ceph.conf)0
-rw-r--r--src/upstart/ceph-mds-all.conf4
-rw-r--r--src/upstart/ceph-mon-all.conf4
-rw-r--r--src/upstart/ceph-osd-all.conf4
-rw-r--r--src/upstart/radosgw-all.conf4
-rw-r--r--src/upstart/radosgw.conf2
22 files changed, 196 insertions, 104 deletions
diff --git a/PendingReleaseNotes b/PendingReleaseNotes
index e69de29bb2d..adaef8d0e67 100644
--- a/PendingReleaseNotes
+++ b/PendingReleaseNotes
@@ -0,0 +1,3 @@
+The 'ceph osd create' command now rejects an argument that is not a
+UUID. The syntax has been 'ceph osd create [uuid]' since 0.47, but the
+older 'ceph osd create [id]' was not rejected until 0.55.
diff --git a/src/Makefile.am b/src/Makefile.am
index 2102e065b03..e6dc5a3f434 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1080,7 +1080,7 @@ EXTRA_DIST += \
$(ceph_tool_gui_DATA) \
$(srcdir)/test/encoding/readable.sh \
$(srcdir)/test/encoding/check-generated.sh \
- $(srcdir)/upstart/ceph.conf \
+ $(srcdir)/upstart/ceph-all.conf \
$(srcdir)/upstart/ceph-mon.conf \
$(srcdir)/upstart/ceph-mon-all.conf \
$(srcdir)/upstart/ceph-mon-all-starter.conf \
diff --git a/src/client/Client.cc b/src/client/Client.cc
index 6c96bea43c2..55e826bf763 100644
--- a/src/client/Client.cc
+++ b/src/client/Client.cc
@@ -2145,8 +2145,7 @@ void Client::cap_delay_requeue(Inode *in)
{
ldout(cct, 10) << "cap_delay_requeue on " << *in << dendl;
in->hold_caps_until = ceph_clock_now(cct);
- in->hold_caps_until += 5.0;
-
+ in->hold_caps_until += cct->_conf->client_caps_release_delay;
delayed_caps.push_back(&in->cap_item);
}
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index eedb6d6a2f5..ec201eee022 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -175,6 +175,7 @@ OPTION(client_readahead_max_periods, OPT_LONGLONG, 4) // as multiple of file la
OPTION(client_snapdir, OPT_STR, ".snap")
OPTION(client_mountpoint, OPT_STR, "/")
OPTION(client_notify_timeout, OPT_INT, 10) // in seconds
+OPTION(client_caps_release_delay, OPT_INT, 5) // in seconds
OPTION(client_oc, OPT_BOOL, true)
OPTION(client_oc_size, OPT_INT, 1024*1024* 200) // MB * n
OPTION(client_oc_max_dirty, OPT_INT, 1024*1024* 100) // MB * n (dirty OR tx.. bigish)
diff --git a/src/include/rbd/librbd.h b/src/include/rbd/librbd.h
index ced11d536e4..f264bd590bf 100644
--- a/src/include/rbd/librbd.h
+++ b/src/include/rbd/librbd.h
@@ -31,7 +31,7 @@ extern "C" {
#define LIBRBD_VER_MAJOR 0
#define LIBRBD_VER_MINOR 1
-#define LIBRBD_VER_EXTRA 5
+#define LIBRBD_VER_EXTRA 6
#define LIBRBD_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra)
diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc
index 01b4a943f0a..934a10190d1 100644
--- a/src/librados/IoCtxImpl.cc
+++ b/src/librados/IoCtxImpl.cc
@@ -1392,8 +1392,10 @@ int librados::IoCtxImpl::watch(const object_t& oid, uint64_t ver,
prepare_assert_ops(&rd);
rd.watch(*cookie, ver, 1);
bufferlist bl;
- wc->linger_id = objecter->linger(oid, oloc, rd, snap_seq, bl, NULL, 0,
- NULL, onfinish, &objver);
+ wc->linger_id = objecter->linger(
+ oid, oloc, rd, snap_seq, bl, NULL,
+ CEPH_OSD_FLAG_WRITE,
+ NULL, onfinish, &objver);
lock->Unlock();
mylock.Lock();
diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc
index 2be4f2d7039..25f723b4b56 100644
--- a/src/librbd/internal.cc
+++ b/src/librbd/internal.cc
@@ -80,7 +80,7 @@ namespace librbd {
}
void init_rbd_header(struct rbd_obj_header_ondisk& ondisk,
- uint64_t size, int *order, uint64_t bid)
+ uint64_t size, int order, uint64_t bid)
{
uint32_t hi = bid >> 32;
uint32_t lo = bid & 0xFFFFFFFF;
@@ -96,7 +96,7 @@ namespace librbd {
hi, lo, extra);
ondisk.image_size = size;
- ondisk.options.order = *order;
+ ondisk.options.order = order;
ondisk.options.crypt_type = RBD_CRYPT_NONE;
ondisk.options.comp_type = RBD_COMP_NONE;
ondisk.snap_seq = 0;
@@ -652,6 +652,127 @@ reprotect_and_return_err:
return ictx->is_snap_protected(snap_name, is_protected);
}
+ int create_v1(IoCtx& io_ctx, const char *imgname, uint64_t bid,
+ uint64_t size, int order)
+ {
+ CephContext *cct = (CephContext *)io_ctx.cct();
+ ldout(cct, 2) << "adding rbd image to directory..." << dendl;
+ int r = tmap_set(io_ctx, imgname);
+ if (r < 0) {
+ lderr(cct) << "error adding image to directory: " << cpp_strerror(r)
+ << dendl;
+ return r;
+ }
+
+ ldout(cct, 2) << "creating rbd image..." << dendl;
+ struct rbd_obj_header_ondisk header;
+ init_rbd_header(header, size, order, bid);
+
+ bufferlist bl;
+ bl.append((const char *)&header, sizeof(header));
+
+ string header_oid = old_header_name(imgname);
+ r = io_ctx.write(header_oid, bl, bl.length(), 0);
+ if (r < 0) {
+ lderr(cct) << "Error writing image header: " << cpp_strerror(r)
+ << dendl;
+ int remove_r = tmap_rm(io_ctx, imgname);
+ if (remove_r < 0) {
+ lderr(cct) << "Could not remove image from directory after "
+ << "header creation failed: "
+ << cpp_strerror(r) << dendl;
+ }
+ return r;
+ }
+
+ ldout(cct, 2) << "done." << dendl;
+ return 0;
+ }
+
+ int create_v2(IoCtx& io_ctx, const char *imgname, uint64_t bid, uint64_t size,
+ int order, uint64_t features, uint64_t stripe_unit,
+ uint64_t stripe_count)
+ {
+ ostringstream bid_ss;
+ uint32_t extra;
+ string id, id_obj, header_oid;
+ int remove_r;
+ ostringstream oss;
+ CephContext *cct = (CephContext *)io_ctx.cct();
+
+ id_obj = id_obj_name(imgname);
+
+ int r = io_ctx.create(id_obj, true);
+ if (r < 0) {
+ lderr(cct) << "error creating rbd id object: " << cpp_strerror(r)
+ << dendl;
+ return r;
+ }
+
+ extra = rand() % 0xFFFFFFFF;
+ bid_ss << std::hex << bid << std::hex << extra;
+ id = bid_ss.str();
+ r = cls_client::set_id(&io_ctx, id_obj, id);
+ if (r < 0) {
+ lderr(cct) << "error setting image id: " << cpp_strerror(r) << dendl;
+ goto err_remove_id;
+ }
+
+ ldout(cct, 2) << "adding rbd image to directory..." << dendl;
+ r = cls_client::dir_add_image(&io_ctx, RBD_DIRECTORY, imgname, id);
+ if (r < 0) {
+ lderr(cct) << "error adding image to directory: " << cpp_strerror(r)
+ << dendl;
+ goto err_remove_id;
+ }
+
+ oss << RBD_DATA_PREFIX << id;
+ header_oid = header_name(id);
+ r = cls_client::create_image(&io_ctx, header_oid, size, order,
+ features, oss.str());
+ if (r < 0) {
+ lderr(cct) << "error writing header: " << cpp_strerror(r) << dendl;
+ goto err_remove_from_dir;
+ }
+
+ if ((stripe_unit || stripe_count) &&
+ (stripe_count != 1 || stripe_unit != (1ull << order))) {
+ r = cls_client::set_stripe_unit_count(&io_ctx, header_oid,
+ stripe_unit, stripe_count);
+ if (r < 0) {
+ lderr(cct) << "error setting striping parameters: "
+ << cpp_strerror(r) << dendl;
+ goto err_remove_header;
+ }
+ }
+
+ ldout(cct, 2) << "done." << dendl;
+ return 0;
+
+ err_remove_header:
+ remove_r = io_ctx.remove(header_oid);
+ if (remove_r < 0) {
+ lderr(cct) << "error cleaning up image header after creation failed: "
+ << dendl;
+ }
+ err_remove_from_dir:
+ remove_r = cls_client::dir_remove_image(&io_ctx, RBD_DIRECTORY,
+ imgname, id);
+ if (remove_r < 0) {
+ lderr(cct) << "error cleaning up image from rbd_directory object "
+ << "after creation failed: " << cpp_strerror(remove_r)
+ << dendl;
+ }
+ err_remove_id:
+ remove_r = io_ctx.remove(id_obj);
+ if (remove_r < 0) {
+ lderr(cct) << "error cleaning up id object after creation failed: "
+ << cpp_strerror(remove_r) << dendl;
+ }
+
+ return r;
+ }
+
int create(IoCtx& io_ctx, const char *imgname, uint64_t size,
bool old_format, uint64_t features, int *order,
uint64_t stripe_unit, uint64_t stripe_count)
@@ -714,68 +835,11 @@ reprotect_and_return_err:
if (stripe_count && stripe_count != 1)
return -EINVAL;
- ldout(cct, 2) << "adding rbd image to directory..." << dendl;
- r = tmap_set(io_ctx, imgname);
- if (r < 0) {
- lderr(cct) << "error adding image to directory: " << cpp_strerror(r)
- << dendl;
- return r;
- }
-
- ldout(cct, 2) << "creating rbd image..." << dendl;
- struct rbd_obj_header_ondisk header;
- init_rbd_header(header, size, order, bid);
-
- bufferlist bl;
- bl.append((const char *)&header, sizeof(header));
-
- string header_oid = old_header_name(imgname);
- r = io_ctx.write(header_oid, bl, bl.length(), 0);
+ return create_v1(io_ctx, imgname, bid, size, *order);
} else {
- string id_obj = id_obj_name(imgname);
- r = io_ctx.create(id_obj, true);
- if (r < 0) {
- lderr(cct) << "error creating rbd id object: " << cpp_strerror(r)
- << dendl;
- return r;
- }
-
- ostringstream bid_ss;
- uint32_t extra = rand() % 0xFFFFFFFF;
- bid_ss << std::hex << bid << std::hex << extra;
- string id = bid_ss.str();
- r = cls_client::set_id(&io_ctx, id_obj, id);
- if (r < 0) {
- lderr(cct) << "error setting image id: " << cpp_strerror(r) << dendl;
- return r;
- }
-
- ldout(cct, 2) << "adding rbd image to directory..." << dendl;
- r = cls_client::dir_add_image(&io_ctx, RBD_DIRECTORY, imgname, id);
- if (r < 0) {
- lderr(cct) << "error adding image to directory: " << cpp_strerror(r)
- << dendl;
- return r;
- }
-
- ostringstream oss;
- oss << RBD_DATA_PREFIX << id;
- r = cls_client::create_image(&io_ctx, header_name(id), size, *order,
- features, oss.str());
- if (r == 0 &&
- (stripe_unit || stripe_count) &&
- (stripe_count != 1 || stripe_unit != (1ull<<*order))) {
- r = cls_client::set_stripe_unit_count(&io_ctx, header_name(id), stripe_unit, stripe_count);
- }
+ return create_v2(io_ctx, imgname, bid, size, *order, features,
+ stripe_unit, stripe_count);
}
-
- if (r < 0) {
- lderr(cct) << "error writing header: " << cpp_strerror(r) << dendl;
- return r;
- }
-
- ldout(cct, 2) << "done." << dendl;
- return 0;
}
/*
diff --git a/src/librbd/internal.h b/src/librbd/internal.h
index d8ca74d6708..88c2d394f07 100644
--- a/src/librbd/internal.h
+++ b/src/librbd/internal.h
@@ -160,7 +160,7 @@ namespace librbd {
int clip_io(ImageCtx *ictx, uint64_t off, uint64_t *len);
int init_rbd_info(struct rbd_info *info);
void init_rbd_header(struct rbd_obj_header_ondisk& ondisk,
- uint64_t size, int *order, uint64_t bid);
+ uint64_t size, int order, uint64_t bid);
int64_t read_iterate(ImageCtx *ictx, uint64_t off, size_t len,
int (*cb)(uint64_t, size_t, const char *, void *),
diff --git a/src/mkcephfs.in b/src/mkcephfs.in
index 1cb135e7929..62d8c9fcbc8 100644
--- a/src/mkcephfs.in
+++ b/src/mkcephfs.in
@@ -325,7 +325,7 @@ if [ -n "$prepareosdfs" ]; then
# try to fallback to to old keys
get_conf tmp_devs "" "btrfs devs"
if [ -n "$tmp_devs" ]; then
- fs_type = "btrfs"
+ fs_type="btrfs"
else
echo No filesystem type defined!
exit 0
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index a90ae6e3cf8..bb8ae1b3c12 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -129,17 +129,18 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorStore *s, Messenger *m, Mo
quorum_features(0),
probe_timeout_event(NULL),
- paxos(PAXOS_NUM), paxos_service(PAXOS_NUM),
+ paxos_service(PAXOS_NUM),
admin_hook(NULL),
routed_request_tid(0)
{
rank = -1;
- paxos_service[PAXOS_MDSMAP] = new MDSMonitor(this, add_paxos(PAXOS_MDSMAP));
- paxos_service[PAXOS_MONMAP] = new MonmapMonitor(this, add_paxos(PAXOS_MONMAP));
- paxos_service[PAXOS_OSDMAP] = new OSDMonitor(this, add_paxos(PAXOS_OSDMAP));
paxos_service[PAXOS_PGMAP] = new PGMonitor(this, add_paxos(PAXOS_PGMAP));
+ paxos_service[PAXOS_OSDMAP] = new OSDMonitor(this, add_paxos(PAXOS_OSDMAP));
+ // mdsmap should be added to the paxos vector after the osdmap
+ paxos_service[PAXOS_MDSMAP] = new MDSMonitor(this, add_paxos(PAXOS_MDSMAP));
paxos_service[PAXOS_LOG] = new LogMonitor(this, add_paxos(PAXOS_LOG));
+ paxos_service[PAXOS_MONMAP] = new MonmapMonitor(this, add_paxos(PAXOS_MONMAP));
paxos_service[PAXOS_AUTH] = new AuthMonitor(this, add_paxos(PAXOS_AUTH));
mon_caps = new MonCaps();
@@ -152,13 +153,13 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorStore *s, Messenger *m, Mo
Paxos *Monitor::add_paxos(int type)
{
Paxos *p = new Paxos(this, type);
- paxos[type] = p;
+ paxos.push_back(p);
return p;
}
Paxos *Monitor::get_paxos_by_name(const string& name)
{
- for (vector<Paxos*>::iterator p = paxos.begin();
+ for (list<Paxos*>::iterator p = paxos.begin();
p != paxos.end();
++p) {
if ((*p)->machine_name == name)
@@ -190,7 +191,7 @@ Monitor::~Monitor()
{
for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); p++)
delete *p;
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
delete *p;
assert(session_map.sessions.empty());
delete mon_caps;
@@ -210,22 +211,22 @@ void Monitor::recovered_leader(int id)
require_gv_onwire();
}
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
if (!(*p)->is_active())
continue;
finish_contexts(g_ceph_context, (*p)->waiting_for_active);
}
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
if (!(*p)->is_active())
continue;
finish_contexts(g_ceph_context, (*p)->waiting_for_commit);
}
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
if (!(*p)->is_readable())
continue;
finish_contexts(g_ceph_context, (*p)->waiting_for_readable);
}
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++) {
if (!(*p)->is_writeable())
continue;
finish_contexts(g_ceph_context, (*p)->waiting_for_writeable);
@@ -488,9 +489,10 @@ int Monitor::preinit()
}
// init paxos
- for (int i = 0; i < PAXOS_NUM; ++i) {
- paxos[i]->init();
- if (paxos[i]->is_consistent()) {
+ for (list<Paxos*>::iterator it = paxos.begin(); it != paxos.end(); ++it) {
+ (*it)->init();
+ if ((*it)->is_consistent()) {
+ int i = (*it)->machine_id;
paxos_service[i]->update_from_paxos();
} // else we don't do anything; handle_probe_reply will detect it's slurping
}
@@ -737,7 +739,7 @@ void Monitor::reset()
paxos_recovered.clear();
global_version = 0;
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
(*p)->restart();
for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); p++)
(*p)->restart();
@@ -815,7 +817,7 @@ void Monitor::handle_probe_probe(MMonProbe *m)
r->name = name;
r->quorum = quorum;
monmap->encode(r->monmap_bl, m->get_connection()->get_features());
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); ++p)
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); ++p)
r->paxos_versions[(*p)->get_machine_name()] = (*p)->get_version();
messenger->send_message(r, m->get_connection());
@@ -1171,7 +1173,7 @@ void Monitor::win_election(epoch_t epoch, set<int>& active, uint64_t features)
clog.info() << "mon." << name << "@" << rank
<< " won leader election with quorum " << quorum << "\n";
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
(*p)->leader_init();
for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); p++)
(*p)->election_finished();
@@ -1190,7 +1192,7 @@ void Monitor::lose_election(epoch_t epoch, set<int> &q, int l, uint64_t features
dout(10) << "lose_election, epoch " << epoch << " leader is mon" << leader
<< " quorum is " << quorum << " features are " << quorum_features << dendl;
- for (vector<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
+ for (list<Paxos*>::iterator p = paxos.begin(); p != paxos.end(); p++)
(*p)->peon_init();
for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); p++)
(*p)->election_finished();
@@ -2065,7 +2067,7 @@ bool Monitor::_ms_dispatch(Message *m)
// send it to the right paxos instance
assert(pm->machine_id < PAXOS_NUM);
- Paxos *p = paxos[pm->machine_id];
+ Paxos *p = get_paxos_by_name(get_paxos_name(pm->machine_id));
p->dispatch((PaxosServiceMessage*)m);
// make sure service finds out about any state changes
diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h
index 73d5b7dcfe3..1fddcd45e37 100644
--- a/src/mon/Monitor.h
+++ b/src/mon/Monitor.h
@@ -250,7 +250,7 @@ public:
void update_logger();
// -- paxos -- These vector indices are matched
- vector<Paxos*> paxos;
+ list<Paxos*> paxos;
vector<PaxosService*> paxos_service;
Paxos *add_paxos(int type);
diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc
index 3aeb7962682..938e2862aaa 100644
--- a/src/mon/PGMap.cc
+++ b/src/mon/PGMap.cc
@@ -309,8 +309,11 @@ void PGMap::stat_pg_sub(const pg_t &pgid, const pg_stat_t &s)
pg_sum.sub(s);
if (s.state & PG_STATE_CREATING) {
creating_pgs.erase(pgid);
- if (s.acting.size())
+ if (s.acting.size()) {
creating_pgs_by_osd[s.acting[0]].erase(pgid);
+ if (creating_pgs_by_osd[s.acting[0]].size() == 0)
+ creating_pgs_by_osd.erase(s.acting[0]);
+ }
}
}
diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc
index 6a6dd60b84b..b66ae895225 100644
--- a/src/mon/PGMonitor.cc
+++ b/src/mon/PGMonitor.cc
@@ -775,8 +775,11 @@ void PGMonitor::send_pg_creates()
vector<int> acting;
int nrep = mon->osdmon()->osdmap.pg_to_acting_osds(on, acting);
- if (s.acting.size())
+ if (s.acting.size()) {
pg_map.creating_pgs_by_osd[s.acting[0]].erase(pgid);
+ if (pg_map.creating_pgs_by_osd[s.acting[0]].size() == 0)
+ pg_map.creating_pgs_by_osd.erase(s.acting[0]);
+ }
s.acting = acting;
// don't send creates for localized pgs
@@ -812,6 +815,7 @@ void PGMonitor::send_pg_creates(int osd, Connection *con)
map<int, set<pg_t> >::iterator p = pg_map.creating_pgs_by_osd.find(osd);
if (p == pg_map.creating_pgs_by_osd.end())
return;
+ assert(p->second.size() > 0);
dout(20) << "send_pg_creates osd." << osd << " pgs " << p->second << dendl;
MOSDPGCreate *m = new MOSDPGCreate(mon->osdmon()->osdmap.get_epoch());
diff --git a/src/os/HashIndex.cc b/src/os/HashIndex.cc
index 34a7074bce0..8948c506411 100644
--- a/src/os/HashIndex.cc
+++ b/src/os/HashIndex.cc
@@ -371,6 +371,7 @@ string HashIndex::get_hash_str(uint32_t hash) {
}
string HashIndex::get_path_str(const hobject_t &hoid) {
+ assert(!hoid.is_max());
return get_hash_str(hoid.hash);
}
@@ -428,7 +429,8 @@ int HashIndex::get_path_contents_by_hash(const vector<string> &path,
if (lower_bound && candidate < lower_bound->substr(0, candidate.size()))
continue;
if (next_object &&
- candidate < get_path_str(*next_object).substr(0, candidate.size()))
+ (next_object->is_max() ||
+ candidate < get_path_str(*next_object).substr(0, candidate.size())))
continue;
hash_prefixes->insert(cur_prefix + *i);
}
diff --git a/src/rbd.cc b/src/rbd.cc
index 2d9b1351e4a..3c82382f6e3 100644
--- a/src/rbd.cc
+++ b/src/rbd.cc
@@ -720,7 +720,6 @@ static int export_read_cb(uint64_t ofs, size_t len, const char *buf, void *arg)
if (ret < 0)
return -errno;
- cerr << "writing " << len << " bytes at ofs " << ofs << std::endl;
return 0;
}
diff --git a/src/test/filestore/store_test.cc b/src/test/filestore/store_test.cc
index 3a41fa10e4c..af13c4493e6 100644
--- a/src/test/filestore/store_test.cc
+++ b/src/test/filestore/store_test.cc
@@ -198,9 +198,22 @@ TEST_F(StoreTest, ManyObjectTest) {
}
ASSERT_TRUE(listed.size() == created.size());
+ hobject_t start, next;
+ objects.clear();
+ r = store->collection_list_partial(
+ cid,
+ hobject_t::get_max(),
+ 50,
+ 60,
+ 0,
+ &objects,
+ &next
+ );
+ ASSERT_EQ(r, 0);
+ ASSERT_TRUE(objects.empty());
+
objects.clear();
listed.clear();
- hobject_t start, next;
while (1) {
r = store->collection_list_partial(cid, start,
50,
diff --git a/src/upstart/ceph.conf b/src/upstart/ceph-all.conf
index d129defad7a..d129defad7a 100644
--- a/src/upstart/ceph.conf
+++ b/src/upstart/ceph-all.conf
diff --git a/src/upstart/ceph-mds-all.conf b/src/upstart/ceph-mds-all.conf
index c9da72ec023..991019e1458 100644
--- a/src/upstart/ceph-mds-all.conf
+++ b/src/upstart/ceph-mds-all.conf
@@ -1,4 +1,4 @@
description "Ceph MDS (all instances)"
-start on starting ceph
-stop on stopping ceph
+start on starting ceph-all
+stop on stopping ceph-all
diff --git a/src/upstart/ceph-mon-all.conf b/src/upstart/ceph-mon-all.conf
index 10c17eab689..aea00c4d1f7 100644
--- a/src/upstart/ceph-mon-all.conf
+++ b/src/upstart/ceph-mon-all.conf
@@ -1,4 +1,4 @@
description "Ceph monitor (all instances)"
-start on starting ceph
-stop on runlevel [!2345] or stopping ceph
+start on starting ceph-all
+stop on runlevel [!2345] or stopping ceph-all
diff --git a/src/upstart/ceph-osd-all.conf b/src/upstart/ceph-osd-all.conf
index eb379c3d094..73d3b37e7c8 100644
--- a/src/upstart/ceph-osd-all.conf
+++ b/src/upstart/ceph-osd-all.conf
@@ -1,4 +1,4 @@
description "Ceph OSD (all instances)"
-start on starting ceph
-stop on runlevel [!2345] or stopping ceph
+start on starting ceph-all
+stop on runlevel [!2345] or stopping ceph-all
diff --git a/src/upstart/radosgw-all.conf b/src/upstart/radosgw-all.conf
index af2b84d24f8..66107520496 100644
--- a/src/upstart/radosgw-all.conf
+++ b/src/upstart/radosgw-all.conf
@@ -1,4 +1,4 @@
description "Ceph radosgw (all instances)"
-start on starting ceph
-stop on runlevel [!2345] or stopping ceph
+start on starting ceph-all
+stop on runlevel [!2345] or stopping ceph-all
diff --git a/src/upstart/radosgw.conf b/src/upstart/radosgw.conf
index deaa139e8cb..e832ae1a41c 100644
--- a/src/upstart/radosgw.conf
+++ b/src/upstart/radosgw.conf
@@ -1,6 +1,6 @@
description "Ceph radosgw"
-start on radosgw
+start on radosgw-all
stop on runlevel [!2345] or stopping radosgw-all
respawn