]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ObjectStore: Modify read function can handle fadvise flags.
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 25 Nov 2014 03:31:05 +0000 (11:31 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 12 Dec 2014 06:23:35 +0000 (14:23 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/FileStore.cc
src/os/FileStore.h
src/os/KeyValueStore.cc
src/os/KeyValueStore.h
src/os/MemStore.cc
src/os/MemStore.h
src/os/ObjectStore.h

index 51127317ffb8a50415724e26c1ac4984ab7fb131..f68e4b942f1888877b5aed10a97996c96be0efb3 100644 (file)
@@ -2795,6 +2795,7 @@ int FileStore::read(
   uint64_t offset,
   size_t len,
   bufferlist& bl,
+  uint32_t op_flags,
   bool allow_eio)
 {
   int got;
index ab9f47f60f49ca1040233a6ed76a923778395a6a..a7fa4d86d1eabeff8185c611df486e80a83d79e5 100644 (file)
@@ -525,6 +525,7 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
+    uint32_t op_flags = 0,
     bool allow_eio = false);
   int fiemap(coll_t cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
 
index 3603c1e75f22b2fd10f20bbac96ecf304037167d..19d3b1b62587394a58f742d5755407c65282cfbc 100644 (file)
@@ -1702,7 +1702,8 @@ int KeyValueStore::_generic_read(StripObjectMap::StripObjectHeaderRef header,
 
 
 int KeyValueStore::read(coll_t cid, const ghobject_t& oid, uint64_t offset,
-                        size_t len, bufferlist& bl, bool allow_eio)
+                        size_t len, bufferlist& bl, uint32_t op_flags,
+                       bool allow_eio)
 {
   dout(15) << __func__ << " " << cid << "/" << oid << " " << offset << "~"
            << len << dendl;
index 7d762af9d6d421c0602add0d6e7daba3b185c336..b73bf928335bc2339da3edca3f08bbd29b36256d 100644 (file)
@@ -548,7 +548,7 @@ class KeyValueStore : public ObjectStore,
   int stat(coll_t cid, const ghobject_t& oid, struct stat *st,
            bool allow_eio = false);
   int read(coll_t cid, const ghobject_t& oid, uint64_t offset, size_t len,
-           bufferlist& bl, bool allow_eio = false);
+           bufferlist& bl, uint32_t op_flags = 0, bool allow_eio = false);
   int fiemap(coll_t cid, const ghobject_t& oid, uint64_t offset, size_t len,
              bufferlist& bl);
 
index 85c04aac457fb3571fab3ecd3bf263762af2e2bd..19316d90d3b53ef88ad78823236a68fefd227e7a 100644 (file)
@@ -302,6 +302,7 @@ int MemStore::read(
     uint64_t offset,
     size_t len,
     bufferlist& bl,
+    uint32_t op_flags,
     bool allow_eio)
 {
   dout(10) << __func__ << " " << cid << " " << oid << " "
index 078959781eed59d893c1f446612060d8ec09624d..7eb994d9875dabad3c97b5abffc8dc14e94edea4 100644 (file)
@@ -279,6 +279,7 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
+    uint32_t op_flags = 0,
     bool allow_eio = false);
   int fiemap(coll_t cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
   int getattr(coll_t cid, const ghobject_t& oid, const char *name, bufferptr& value);
index 586333b82d74e06040a268a981fc90cf2dd30b39..5e8800f9484c88a9eeed6e10d95cdb23593c7620 100644 (file)
@@ -1316,6 +1316,7 @@ public:
    * @param offset location offset of first byte to be read
    * @param len number of bytes to be read
    * @param bl output bufferlist
+   * @param op_flags is CEPH_OSD_OP_FLAG_*
    * @param allow_eio if false, assert on -EIO operation failure
    * @returns number of bytes read on success, or negative error code on failure.
    */
@@ -1325,6 +1326,7 @@ public:
     uint64_t offset,
     size_t len,
     bufferlist& bl,
+    uint32_t op_flags = 0,
     bool allow_eio = false) = 0;
 
   /**