diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | qa/workunits/mon/crush_ops.sh | 4 | ||||
-rw-r--r-- | src/mon/MonCommands.h | 2 | ||||
-rw-r--r-- | src/mon/OSDMonitor.cc | 1 | ||||
-rw-r--r-- | src/rgw/rgw_cache.cc | 5 | ||||
-rw-r--r-- | src/rgw/rgw_cache.h | 3 | ||||
-rw-r--r-- | src/rgw/rgw_rados.cc | 6 | ||||
-rw-r--r-- | src/rgw/rgw_rados.h | 2 | ||||
-rw-r--r-- | src/rgw/rgw_replica_log.cc | 9 | ||||
-rw-r--r-- | src/rgw/rgw_rest.cc | 2 |
11 files changed, 36 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index d7f96fd11f4..1478adfce79 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_PREREQ(2.59) # VERSION define is not used by the code. It gets a version string # from 'git describe'; see src/ceph_ver.[ch] -AC_INIT([ceph], [0.68], [ceph-devel@vger.kernel.org]) +AC_INIT([ceph], [0.69], [ceph-devel@vger.kernel.org]) # Create release string. Used with VERSION for RPMs. RPM_RELEASE=0 diff --git a/debian/changelog b/debian/changelog index 874f85b1500..ce73472f9eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ceph (0.69-1) precise; urgency=low + + * New upstream release + + -- Gary Lowell <gary.lowell@inktank.com> Wed, 18 Sep 2013 01:39:47 +0000 + ceph (0.68-1) precise; urgency=low * New upstream release diff --git a/qa/workunits/mon/crush_ops.sh b/qa/workunits/mon/crush_ops.sh index 4f66e552153..09e49acfbf6 100755 --- a/qa/workunits/mon/crush_ops.sh +++ b/qa/workunits/mon/crush_ops.sh @@ -64,4 +64,8 @@ ceph osd crush rm host2 ceph osd crush rm osd.$o1 ceph osd crush rm osd.$o2 +ceph osd crush add-bucket foo host +ceph osd crush move foo root=default rack=localrack +ceph osd crush rm foo + echo OK diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 53d7f75e699..365fd28b64e 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -384,7 +384,7 @@ COMMAND("osd crush create-or-move " \ "create entry or move existing entry for <name> <weight> at/to location <args>", \ "osd", "rw", "cli,rest") COMMAND("osd crush move " \ - "name=id,type=CephOsdName " \ + "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \ "move existing entry for <name> to location <args>", \ "osd", "rw", "cli,rest") diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 8eb88a829b1..36fe6d345f2 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2846,6 +2846,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m) string args; vector<string> argvec; + cmd_getval(g_ceph_context, cmdmap, "name", name); cmd_getval(g_ceph_context, cmdmap, "args", argvec); map<string,string> loc; parse_loc_map(argvec, &loc); diff --git a/src/rgw/rgw_cache.cc b/src/rgw/rgw_cache.cc index 5b96eb45b08..d0afdcd389c 100644 --- a/src/rgw/rgw_cache.cc +++ b/src/rgw/rgw_cache.cc @@ -107,7 +107,7 @@ void ObjectCache::remove(string& name) void ObjectCache::touch_lru(string& name, std::list<string>::iterator& lru_iter) { - while (lru.size() > (size_t)cct->_conf->rgw_cache_lru_size) { + while (lru_size > (size_t)cct->_conf->rgw_cache_lru_size) { list<string>::iterator iter = lru.begin(); if ((*iter).compare(name) == 0) { /* @@ -121,10 +121,12 @@ void ObjectCache::touch_lru(string& name, std::list<string>::iterator& lru_iter) if (map_iter != cache_map.end()) cache_map.erase(map_iter); lru.pop_front(); + lru_size--; } if (lru_iter == lru.end()) { lru.push_back(name); + lru_size++; lru_iter--; ldout(cct, 10) << "adding " << name << " to cache LRU end" << dendl; } else { @@ -142,6 +144,7 @@ void ObjectCache::remove_lru(string& name, std::list<string>::iterator& lru_iter return; lru.erase(lru_iter); + lru_size--; lru_iter = lru.end(); } diff --git a/src/rgw/rgw_cache.h b/src/rgw/rgw_cache.h index 601fcdfc963..68720d0e6ac 100644 --- a/src/rgw/rgw_cache.h +++ b/src/rgw/rgw_cache.h @@ -131,13 +131,14 @@ struct ObjectCacheEntry { class ObjectCache { std::map<string, ObjectCacheEntry> cache_map; std::list<string> lru; + unsigned long lru_size; Mutex lock; CephContext *cct; void touch_lru(string& name, std::list<string>::iterator& lru_iter); void remove_lru(string& name, std::list<string>::iterator& lru_iter); public: - ObjectCache() : lock("ObjectCache"), cct(NULL) { } + ObjectCache() : lru_size(0), lock("ObjectCache"), cct(NULL) { } int get(std::string& name, ObjectCacheInfo& bl, uint32_t mask); void put(std::string& name, ObjectCacheInfo& bl); void remove(std::string& name); diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 0c2119ecf9d..bada7d22d1b 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -761,6 +761,11 @@ int RGWPutObjProcessor_Atomic::complete_writing_data() } } complete_parts(); + + int r = drain_pending(); + if (r < 0) + return r; + return 0; } @@ -2611,6 +2616,7 @@ int RGWRados::copy_obj(void *ctx, { /* opening scope so that we can do goto, sorry */ bufferlist& extra_data_bl = processor.get_extra_data(); if (extra_data_bl.length()) { + extra_data_bl.push_back((char)0); JSONParser jp; if (!jp.parse(extra_data_bl.c_str(), extra_data_bl.length())) { ldout(cct, 0) << "failed to parse response extra data. len=" << extra_data_bl.length() << " data=" << extra_data_bl.c_str() << dendl; diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index ef98ec1f9fb..a55f1c1f94c 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -238,11 +238,11 @@ class RGWPutObjProcessor_Aio : public RGWPutObjProcessor struct put_obj_aio_info pop_pending(); int wait_pending_front(); bool pending_has_completed(); - int drain_pending(); protected: uint64_t obj_len; + int drain_pending(); int handle_obj_data(rgw_obj& obj, bufferlist& bl, off_t ofs, off_t abs_ofs, void **phandle); public: diff --git a/src/rgw/rgw_replica_log.cc b/src/rgw/rgw_replica_log.cc index 483d256377b..f80ebf88525 100644 --- a/src/rgw/rgw_replica_log.cc +++ b/src/rgw/rgw_replica_log.cc @@ -34,6 +34,15 @@ RGWReplicaLogger::RGWReplicaLogger(RGWRados *_store) : int RGWReplicaLogger::open_ioctx(librados::IoCtx& ctx, const string& pool) { int r = store->rados->ioctx_create(pool.c_str(), ctx); + if (r == -ENOENT) { + rgw_bucket p(pool.c_str()); + r = store->create_pool(p); + if (r < 0) + return r; + + // retry + r = store->rados->ioctx_create(pool.c_str(), ctx); + } if (r < 0) { lderr(cct) << "ERROR: could not open rados pool " << pool << dendl; } diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 196bd29e99b..4aa1d401211 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -709,7 +709,7 @@ int RGWPutObj_ObjStore::get_data(bufferlist& bl) int r = s->cio->read(bp.c_str(), cl, &read_len); len = read_len; if (r < 0) - return ret; + return r; bl.append(bp, 0, len); } |