]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objectstore: Remove allow_eio arg from read, we allow it to be returned
authorDavid Zafman <dzafman@redhat.com>
Wed, 24 May 2017 23:02:10 +0000 (16:02 -0700)
committerDavid Zafman <dzafman@redhat.com>
Fri, 23 Jun 2017 15:09:14 +0000 (08:09 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/os/ObjectStore.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/os/filestore/FileStore.cc
src/os/filestore/FileStore.h
src/os/kstore/KStore.cc
src/os/kstore/KStore.h
src/os/memstore/MemStore.cc
src/os/memstore/MemStore.h
src/osd/ECBackend.cc
src/osd/ReplicatedBackend.cc

index 71f5e80b17c5ff56d263aef22ac5d599edf1031c..caf2bb779c644684a973072669190101210bea2f 100644 (file)
@@ -1702,17 +1702,15 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags = 0,
-    bool allow_eio = false) = 0;
+    uint32_t op_flags = 0) = 0;
    virtual int read(
      CollectionHandle &c,
      const ghobject_t& oid,
      uint64_t offset,
      size_t len,
      bufferlist& bl,
-     uint32_t op_flags = 0,
-     bool allow_eio = false) {
-     return read(c->get_cid(), oid, offset, len, bl, op_flags, allow_eio);
+     uint32_t op_flags = 0) {
+     return read(c->get_cid(), oid, offset, len, bl, op_flags);
    }
 
   /**
index 38d1e272ebc5a30fac5409213e83c922aa1b6088..8861636327c9d6e6b88882759142542b50c9108c 100644 (file)
@@ -6154,13 +6154,12 @@ int BlueStore::read(
   uint64_t offset,
   size_t length,
   bufferlist& bl,
-  uint32_t op_flags,
-  bool allow_eio)
+  uint32_t op_flags)
 {
   CollectionHandle c = _get_collection(cid);
   if (!c)
     return -ENOENT;
-  return read(c, oid, offset, length, bl, op_flags, allow_eio);
+  return read(c, oid, offset, length, bl, op_flags);
 }
 
 int BlueStore::read(
@@ -6169,8 +6168,7 @@ int BlueStore::read(
   uint64_t offset,
   size_t length,
   bufferlist& bl,
-  uint32_t op_flags,
-  bool allow_eio)
+  uint32_t op_flags)
 {
   utime_t start = ceph_clock_now();
   Collection *c = static_cast<Collection *>(c_.get());
@@ -6200,7 +6198,6 @@ int BlueStore::read(
   }
 
  out:
-  assert(allow_eio || r != -EIO);
   if (r == 0 && _debug_data_eio(oid)) {
     r = -EIO;
     derr << __func__ << " " << c->cid << " " << oid << " INJECT EIO" << dendl;
index 1114e7b4f47cbfc2e4bf6a74eb6719cc971bf019..19ab8bb28154c92c59c4b2e62e01723b60b06c9d 100644 (file)
@@ -2184,16 +2184,14 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags = 0,
-    bool allow_eio = false) override;
+    uint32_t op_flags = 0) override;
   int read(
     CollectionHandle &c,
     const ghobject_t& oid,
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags = 0,
-    bool allow_eio = false) override;
+    uint32_t op_flags = 0) override;
   int _do_read(
     Collection *c,
     OnodeRef o,
index 1fb4839455ee6d7eb2e61598dc983f4cbf3c53e4..d2f3053195f24d2b0396141ccbad9a760c3b7b59 100644 (file)
@@ -3183,8 +3183,7 @@ int FileStore::read(
   uint64_t offset,
   size_t len,
   bufferlist& bl,
-  uint32_t op_flags,
-  bool allow_eio)
+  uint32_t op_flags)
 {
   int got;
   tracepoint(objectstore, read_enter, _cid.c_str(), offset, len);
@@ -3220,10 +3219,6 @@ int FileStore::read(
   if (got < 0) {
     dout(10) << __FUNC__ << ": (" << cid << "/" << oid << ") pread error: " << cpp_strerror(got) << dendl;
     lfn_close(fd);
-    if (!(allow_eio || !m_filestore_fail_eio || got != -EIO)) {
-      derr << __FUNC__ << ": (" << cid << "/" << oid << ") pread error: " << cpp_strerror(got) << dendl;
-      assert(0 == "eio on pread");
-    }
     return got;
   }
   bptr.set_length(got);   // properly size the buffer
index 88a1d3170d08bb0e0fd3dad151117406b6f147a6..e7cf4cdf6af725f3024b3153ce39a533221190a6 100644 (file)
@@ -586,8 +586,7 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags = 0,
-    bool allow_eio = false) override;
+    uint32_t op_flags = 0) override;
   int _do_fiemap(int fd, uint64_t offset, size_t len,
                  map<uint64_t, uint64_t> *m);
   int _do_seek_hole_data(int fd, uint64_t offset, size_t len,
index b06b06865d484f7ddb4ea8c5507bd825dd76388d..f7a4214a83e2a5c80b5ad132695f7b90f921c985 100755 (executable)
@@ -1169,8 +1169,7 @@ int KStore::read(
   uint64_t offset,
   size_t length,
   bufferlist& bl,
-  uint32_t op_flags,
-  bool allow_eio)
+  uint32_t op_flags)
 {
   dout(15) << __func__ << " " << cid << " " << oid
           << " " << offset << "~" << length
index bfa1197339f71893646353724347347ff114e784..7570756a71333cac463799fac9f6f7a477b77cb2 100644 (file)
@@ -461,8 +461,7 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags = 0,
-    bool allow_eio = false) override;
+    uint32_t op_flags = 0) override;
   int _do_read(
     OnodeRef o,
     uint64_t offset,
index 4b1ca248a4353dec354eab5310b45f31ee343b73..08be76e65b4b61303abe7a452c27f422326d44ff 100644 (file)
@@ -316,13 +316,12 @@ int MemStore::read(
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags,
-    bool allow_eio)
+    uint32_t op_flags)
 {
   CollectionHandle c = get_collection(cid);
   if (!c)
     return -ENOENT;
-  return read(c, oid, offset, len, bl, op_flags, allow_eio);
+  return read(c, oid, offset, len, bl, op_flags);
 }
 
 int MemStore::read(
@@ -331,8 +330,7 @@ int MemStore::read(
   uint64_t offset,
   size_t len,
   bufferlist& bl,
-  uint32_t op_flags,
-  bool allow_eio)
+  uint32_t op_flags)
 {
   Collection *c = static_cast<Collection*>(c_.get());
   dout(10) << __func__ << " " << c->cid << " " << oid << " "
index 8bf5cc76a5ef281c73ac0177e8483efa2c06667a..e17574cc0f5f8edffb65d324758919785ef3252d 100644 (file)
@@ -298,16 +298,14 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags = 0,
-    bool allow_eio = false) override;
+    uint32_t op_flags = 0) override;
   int read(
     CollectionHandle &c,
     const ghobject_t& oid,
     uint64_t offset,
     size_t len,
     bufferlist& bl,
-    uint32_t op_flags = 0,
-    bool allow_eio = false) override;
+    uint32_t op_flags = 0) override;
   using ObjectStore::fiemap;
   int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl) override;
   int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, map<uint64_t, uint64_t>& destmap) override;
index 7097dda482d812a7f6a17598ff9ad9e46e39c02c..166edc65996f96749c497ff7e68ee5f1cec527ea 100644 (file)
@@ -1004,8 +1004,7 @@ void ECBackend::handle_sub_read(
        ghobject_t(i->first, ghobject_t::NO_GEN, shard),
        j->get<0>(),
        j->get<1>(),
-       bl, j->get<2>(),
-       true); // Allow EIO return
+       bl, j->get<2>());
       if (r < 0) {
        get_parent()->clog_error() << __func__
                                   << ": Error " << r
@@ -2404,7 +2403,7 @@ void ECBackend::be_deep_scrub(
        poid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
       pos,
       stride, bl,
-      fadvise_flags, true);
+      fadvise_flags);
     if (r < 0)
       break;
     if (bl.length() % sinfo.get_chunk_size()) {
index 5161ca6fe270b677e3f53d0eefc8ab00e1227dd6..4e9ea976f29e88a10d0616d20898ab15fb324a67 100644 (file)
@@ -725,7 +725,7 @@ void ReplicatedBackend::be_deep_scrub(
            poid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
          pos,
          cct->_conf->osd_deep_scrub_stride, bl,
-         fadvise_flags, true);
+         fadvise_flags);
     if (r <= 0)
       break;