]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd, test: Minor clean-up from fast-read and error handling ec changes 5781/head
authorDavid Zafman <dzafman@redhat.com>
Tue, 1 Sep 2015 19:49:06 +0000 (12:49 -0700)
committerDavid Zafman <dzafman@redhat.com>
Tue, 1 Sep 2015 19:49:36 +0000 (12:49 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/ECBackend.cc
src/osd/ReplicatedPG.cc
src/test/erasure-code/test-erasure-eio.sh

index aef52a03476a7596519e7c3fe2c34ea229835fc0..305c17f266a4486564626c664d1a242712b2ca58 100644 (file)
@@ -1001,7 +1001,7 @@ void ECBackend::handle_sub_read_reply(
   map<ceph_tid_t, ReadOp>::iterator iter = tid_to_read_map.find(op.tid);
   if (iter == tid_to_read_map.end()) {
     //canceled
-    dout(10) << __func__ << ": abort " << op << dendl;
+    dout(20) << __func__ << ": dropped " << op << dendl;
     return;
   }
   ReadOp &rop = iter->second;
@@ -1082,7 +1082,6 @@ void ECBackend::handle_sub_read_reply(
       set<int> want_to_read, dummy_minimum;
       get_want_to_read_shards(&want_to_read);
       int err;
-      // XXX: Could just do if (have.size < ec_impl->get_data_chunk_count())
       if ((err = ec_impl->minimum_to_decode(want_to_read, have, &dummy_minimum)) < 0) {
        dout(20) << __func__ << " minimum_to_decode failed" << dendl;
         if (rop.in_progress.empty()) {
@@ -1610,6 +1609,7 @@ void ECBackend::start_read_op(
   dout(10) << __func__ << ": started " << op << dendl;
 }
 
+// This is based on start_read_op(), maybe this should be refactored
 void ECBackend::start_remaining_read_op(
   ReadOp &op,
   map<hobject_t, read_request_t, hobject_t::BitwiseComparator> &to_read)
@@ -1621,7 +1621,8 @@ void ECBackend::start_remaining_read_op(
   dout(10) << __func__ << ": starting additional " << op << dendl;
 
   map<pg_shard_t, ECSubRead> messages;
-  for (map<hobject_t, read_request_t>::iterator i = op.to_read.begin();
+  for (map<hobject_t, read_request_t,
+           hobject_t::BitwiseComparator>::iterator i = op.to_read.begin();
        i != op.to_read.end();
        ++i) {
     bool need_attrs = i->second.want_attrs;
@@ -1956,7 +1957,7 @@ int ECBackend::objects_remaining_read_async(
   ReadOp &rop)
 {
   set<int> already_read;
-  set<pg_shard_t> ots = rop.obj_to_source[hoid];
+  const set<pg_shard_t>& ots = rop.obj_to_source[hoid];
   for (set<pg_shard_t>::iterator i = ots.begin(); i != ots.end(); ++i)
     already_read.insert(i->shard);
   dout(10) << __func__ << " have/error shards=" << already_read << dendl;
index 9485f0eae157106c90ff062762862b6ad434d359..4c704ee9f13959fcd6b977320949dedd9514ce31 100644 (file)
@@ -3667,6 +3667,8 @@ struct FillInVerifyExtent : public Context {
   void finish(int len) {
     *rval = len;
     *r = len;
+    if (len < 0)
+      return;
     // whole object?  can we verify the checksum?
     if (maybe_crc && *r == size) {
       uint32_t crc = outdatap->crc32c(-1);
index fe465c93bda3dacd862de2c572737b7b4d939785..129d09b7ec81fb901b3ac1ad4f8354d4dbf329fd 100755 (executable)
@@ -102,7 +102,7 @@ function rados_get() {
     if [ $expect = "1" ];
     then
         ! ./rados --pool $poolname get $objname $dir/COPY
-        return $?
+        return
     fi
     #
     # get an object, compare with $dir/ORIGINAL