]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: all "read/get" interfaces accept op_flags
authorXuehan Xu <xuxuehan@qianxin.com>
Sun, 15 Dec 2024 08:06:35 +0000 (16:06 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 6 Jan 2025 03:05:50 +0000 (11:05 +0800)
To be used by exclusively by Seastore, See `seastore::cache_hint_t`

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/alienstore/alien_store.cc
src/crimson/os/alienstore/alien_store.h
src/crimson/os/cyanstore/cyan_store.cc
src/crimson/os/cyanstore/cyan_store.h
src/crimson/os/futurized_store.h
src/crimson/os/seastore/seastore.cc
src/crimson/os/seastore/seastore.h

index f390823a8a09e76d280f74bbd67f6c61fc61ad1f..a9c69f4660e56618c0b9cc9c650fd3416527d677 100644 (file)
@@ -141,7 +141,8 @@ seastar::future<> AlienStore::stop()
 AlienStore::base_errorator::future<bool>
 AlienStore::exists(
   CollectionRef ch,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
     return op_gates.simple_dispatch("exists", [=, this] {
         return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this] {
@@ -212,7 +213,8 @@ seastar::future<std::tuple<std::vector<ghobject_t>, ghobject_t>>
 AlienStore::list_objects(CollectionRef ch,
                         const ghobject_t& start,
                         const ghobject_t& end,
-                        uint64_t limit) const
+                        uint64_t limit,
+                       uint32_t op_flags) const
 {
   logger().debug("{}", __func__);
   assert(tp);
@@ -348,7 +350,8 @@ AlienStore::readv(CollectionRef ch,
 AlienStore::get_attr_errorator::future<ceph::bufferlist>
 AlienStore::get_attr(CollectionRef ch,
                      const ghobject_t& oid,
-                     std::string_view name) const
+                     std::string_view name,
+                    uint32_t op_flags) const
 {
   logger().debug("{}", __func__);
   assert(tp);
@@ -376,7 +379,8 @@ AlienStore::get_attr(CollectionRef ch,
 
 AlienStore::get_attrs_ertr::future<AlienStore::attrs_t>
 AlienStore::get_attrs(CollectionRef ch,
-                      const ghobject_t& oid)
+                      const ghobject_t& oid,
+                     uint32_t op_flags)
 {
   logger().debug("{}", __func__);
   assert(tp);
@@ -397,7 +401,8 @@ AlienStore::get_attrs(CollectionRef ch,
 
 auto AlienStore::omap_get_values(CollectionRef ch,
                                  const ghobject_t& oid,
-                                 const set<string>& keys)
+                                 const set<string>& keys,
+                                uint32_t op_flags)
   -> read_errorator::future<omap_values_t>
 {
   logger().debug("{}", __func__);
@@ -421,7 +426,8 @@ auto AlienStore::omap_get_values(CollectionRef ch,
 
 auto AlienStore::omap_get_values(CollectionRef ch,
                                  const ghobject_t &oid,
-                                 const std::optional<string> &start)
+                                 const std::optional<string> &start,
+                                uint32_t op_flags)
   -> read_errorator::future<std::tuple<bool, omap_values_t>>
 {
   logger().debug("{} with_start", __func__);
@@ -578,7 +584,8 @@ unsigned AlienStore::get_max_attr_name_length() const
 
 seastar::future<struct stat> AlienStore::stat(
   CollectionRef ch,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
   assert(tp);
   return do_with_op_gate((struct stat){}, [this, ch, oid](auto& st) {
@@ -604,7 +611,8 @@ seastar::future<std::string> AlienStore::get_default_device_class()
 }
 
 auto AlienStore::omap_get_header(CollectionRef ch,
-                                 const ghobject_t& oid)
+                                 const ghobject_t& oid,
+                                uint32_t op_flags)
   -> get_attr_errorator::future<ceph::bufferlist>
 {
   assert(tp);
@@ -630,7 +638,8 @@ AlienStore::read_errorator::future<std::map<uint64_t, uint64_t>> AlienStore::fie
   CollectionRef ch,
   const ghobject_t& oid,
   uint64_t off,
-  uint64_t len)
+  uint64_t len,
+  uint32_t op_flags)
 {
   assert(tp);
   return do_with_op_gate(std::map<uint64_t, uint64_t>(), [=, this](auto& destmap) {
index 853585dac9cf214ff32ea28b9d70f4ab423ed874..1d39411450e8beddc829530a8e1052536e4e4577 100644 (file)
@@ -36,7 +36,8 @@ public:
 
   base_errorator::future<bool> exists(
     CollectionRef c,
-    const ghobject_t& oid) final;
+    const ghobject_t& oid,
+    uint32_t op_flags = 0) final;
   mkfs_ertr::future<> mkfs(uuid_d new_osd_fsid) final;
   read_errorator::future<ceph::bufferlist> read(CollectionRef c,
                                    const ghobject_t& oid,
@@ -49,29 +50,36 @@ public:
                                                 uint32_t op_flags = 0) final;
                                              
 
-  get_attr_errorator::future<ceph::bufferlist> get_attr(CollectionRef c,
-                                            const ghobject_t& oid,
-                                            std::string_view name) const final;
-  get_attrs_ertr::future<attrs_t> get_attrs(CollectionRef c,
-                                     const ghobject_t& oid) final;
+  get_attr_errorator::future<ceph::bufferlist> get_attr(
+    CollectionRef c,
+    const ghobject_t& oid,
+    std::string_view name,
+    uint32_t op_flags = 0) const final;
+  get_attrs_ertr::future<attrs_t> get_attrs(
+    CollectionRef c,
+    const ghobject_t& oid,
+    uint32_t op_flags = 0) final;
 
   read_errorator::future<omap_values_t> omap_get_values(
     CollectionRef c,
     const ghobject_t& oid,
-    const omap_keys_t& keys) final;
+    const omap_keys_t& keys,
+    uint32_t op_flags = 0) final;
 
   /// Retrieves paged set of values > start (if present)
   read_errorator::future<std::tuple<bool, omap_values_t>> omap_get_values(
     CollectionRef c,           ///< [in] collection
     const ghobject_t &oid,     ///< [in] oid
-    const std::optional<std::string> &start ///< [in] start, empty for begin
+    const std::optional<std::string> &start, ///< [in] start, empty for begin
+    uint32_t op_flags = 0
     ) final; ///< @return <done, values> values.empty() iff done
 
   seastar::future<std::tuple<std::vector<ghobject_t>, ghobject_t>> list_objects(
     CollectionRef c,
     const ghobject_t& start,
     const ghobject_t& end,
-    uint64_t limit) const final;
+    uint64_t limit,
+    uint32_t op_flags = 0) const final;
 
   seastar::future<CollectionRef> create_new_collection(const coll_t& cid) final;
   seastar::future<CollectionRef> open_collection(const coll_t& cid) final;
@@ -97,16 +105,19 @@ public:
   unsigned get_max_attr_name_length() const final;
   seastar::future<struct stat> stat(
     CollectionRef,
-    const ghobject_t&) final;
+    const ghobject_t&,
+    uint32_t op_flags = 0) final;
   seastar::future<std::string> get_default_device_class() final;
   get_attr_errorator::future<ceph::bufferlist> omap_get_header(
     CollectionRef,
-    const ghobject_t&) final;
+    const ghobject_t&,
+    uint32_t) final;
   read_errorator::future<std::map<uint64_t, uint64_t>> fiemap(
     CollectionRef,
     const ghobject_t&,
     uint64_t off,
-    uint64_t len) final;
+    uint64_t len,
+    uint32_t op_flags) final;
 
   FuturizedStore::Shard& get_sharded_store() final {
     return *this;
index a8bf514de15abe12556b7a85023d73392abc355a..41819fb5eb6ba9c450600b1e480fbc7e707853d7 100644 (file)
@@ -208,7 +208,8 @@ CyanStore::Shard::list_objects(
   CollectionRef ch,
   const ghobject_t& start,
   const ghobject_t& end,
-  uint64_t limit) const
+  uint64_t limit,
+  uint32_t op_flags) const
 {
   auto c = static_cast<Collection*>(ch.get());
   logger().debug("{} {} {} {} {}",
@@ -257,7 +258,8 @@ CyanStore::Shard::list_collections()
 CyanStore::Shard::base_errorator::future<bool>
 CyanStore::Shard::exists(
   CollectionRef ch,
-  const ghobject_t &oid)
+  const ghobject_t &oid,
+  uint32_t op_flags)
 {
   auto c = static_cast<Collection*>(ch.get());
   if (!c->exists) {
@@ -333,7 +335,8 @@ CyanStore::Shard::get_attr_errorator::future<ceph::bufferlist>
 CyanStore::Shard::get_attr(
   CollectionRef ch,
   const ghobject_t& oid,
-  std::string_view name) const
+  std::string_view name,
+  uint32_t op_flags) const
 {
   auto c = static_cast<Collection*>(ch.get());
   logger().debug("{} {} {}",
@@ -352,7 +355,8 @@ CyanStore::Shard::get_attr(
 CyanStore::Shard::get_attrs_ertr::future<CyanStore::Shard::attrs_t>
 CyanStore::Shard::get_attrs(
   CollectionRef ch,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
   auto c = static_cast<Collection*>(ch.get());
   logger().debug("{} {} {}",
@@ -367,7 +371,8 @@ CyanStore::Shard::get_attrs(
 auto CyanStore::Shard::omap_get_values(
   CollectionRef ch,
   const ghobject_t& oid,
-  const omap_keys_t& keys)
+  const omap_keys_t& keys,
+  uint32_t op_flags)
   -> read_errorator::future<omap_values_t>
 {
   auto c = static_cast<Collection*>(ch.get());
@@ -388,7 +393,8 @@ auto CyanStore::Shard::omap_get_values(
 auto CyanStore::Shard::omap_get_values(
   CollectionRef ch,
   const ghobject_t &oid,
-  const std::optional<string> &start)
+  const std::optional<string> &start,
+  uint32_t op_flags)
   -> CyanStore::Shard::read_errorator::future<std::tuple<bool, omap_values_t>>
 {
   auto c = static_cast<Collection*>(ch.get());
@@ -409,7 +415,8 @@ auto CyanStore::Shard::omap_get_values(
 
 auto CyanStore::Shard::omap_get_header(
   CollectionRef ch,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
   -> CyanStore::Shard::get_attr_errorator::future<ceph::bufferlist>
 {
   auto c = static_cast<Collection*>(ch.get());
@@ -977,7 +984,8 @@ CyanStore::Shard::fiemap(
   CollectionRef ch,
   const ghobject_t& oid,
   uint64_t off,
-  uint64_t len)
+  uint64_t len,
+  uint32_t op_flags)
 {
   auto c = static_cast<Collection*>(ch.get());
 
@@ -992,7 +1000,8 @@ CyanStore::Shard::fiemap(
 seastar::future<struct stat>
 CyanStore::Shard::stat(
   CollectionRef ch,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
   auto c = static_cast<Collection*>(ch.get());
   auto o = c->get_object(oid);
index e9394991bc2c23d03ba264dc0e33c232dba8481e..1d481ef5829a7d0ae81b45ac37a0729e6e9aa921 100644 (file)
@@ -34,11 +34,13 @@ public:
 
     seastar::future<struct stat> stat(
       CollectionRef c,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     base_errorator::future<bool> exists(
       CollectionRef ch,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     read_errorator::future<ceph::bufferlist> read(
       CollectionRef c,
@@ -56,33 +58,39 @@ public:
     get_attr_errorator::future<ceph::bufferlist> get_attr(
       CollectionRef c,
       const ghobject_t& oid,
-      std::string_view name) const final;
+      std::string_view name,
+      uint32_t op_flags = 0) const final;
 
     get_attrs_ertr::future<attrs_t> get_attrs(
       CollectionRef c,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     read_errorator::future<omap_values_t> omap_get_values(
       CollectionRef c,
       const ghobject_t& oid,
-      const omap_keys_t& keys) final;
+      const omap_keys_t& keys,
+      uint32_t op_flags = 0) final;
 
     read_errorator::future<std::tuple<bool, omap_values_t>> omap_get_values(
       CollectionRef c,           ///< [in] collection
       const ghobject_t &oid,     ///< [in] oid
-      const std::optional<std::string> &start ///< [in] start, empty for begin
+      const std::optional<std::string> &start, ///< [in] start, empty for begin
+      uint32_t op_flags = 0
       ) final;
 
     get_attr_errorator::future<ceph::bufferlist> omap_get_header(
       CollectionRef c,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     seastar::future<std::tuple<std::vector<ghobject_t>, ghobject_t>>
     list_objects(
       CollectionRef c,
       const ghobject_t& start,
       const ghobject_t& end,
-      uint64_t limit) const final;
+      uint64_t limit,
+      uint32_t op_flags = 0) const final;
 
     seastar::future<CollectionRef> create_new_collection(const coll_t& cid) final;
 
@@ -101,7 +109,8 @@ public:
       CollectionRef c,
       const ghobject_t& oid,
       uint64_t off,
-      uint64_t len) final;
+      uint64_t len,
+      uint32_t op_flags) final;
 
     unsigned get_max_attr_name_length() const final;
 
index 51ef2331014ddf3e296bf3543eb577287a2d54bb..e7d4c8546de098581c1c22eea57a5995b0ce6d22 100644 (file)
@@ -54,7 +54,8 @@ public:
 
     virtual base_errorator::future<bool> exists(
       CollectionRef c,
-      const ghobject_t& oid) = 0;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) = 0;
 
     using get_attr_errorator = crimson::errorator<
       crimson::ct_error::enoent,
@@ -62,42 +63,49 @@ public:
     virtual get_attr_errorator::future<ceph::bufferlist> get_attr(
       CollectionRef c,
       const ghobject_t& oid,
-      std::string_view name) const = 0;
+      std::string_view name,
+      uint32_t op_flags = 0) const = 0;
 
     using get_attrs_ertr = crimson::errorator<
       crimson::ct_error::enoent>;
     using attrs_t = std::map<std::string, ceph::bufferlist, std::less<>>;
     virtual get_attrs_ertr::future<attrs_t> get_attrs(
       CollectionRef c,
-      const ghobject_t& oid) = 0;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) = 0;
 
     virtual seastar::future<struct stat> stat(
       CollectionRef c,
-      const ghobject_t& oid) = 0;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) = 0;
 
     using omap_values_t = attrs_t;
     using omap_keys_t = std::set<std::string>;
     virtual read_errorator::future<omap_values_t> omap_get_values(
       CollectionRef c,
       const ghobject_t& oid,
-      const omap_keys_t& keys) = 0;
+      const omap_keys_t& keys,
+      uint32_t op_flags = 0) = 0;
 
     using omap_values_paged_t = std::tuple<bool, omap_values_t>;
     virtual read_errorator::future<omap_values_paged_t> omap_get_values(
       CollectionRef c,           ///< [in] collection
       const ghobject_t &oid,     ///< [in] oid
-      const std::optional<std::string> &start ///< [in] start, empty for begin
+      const std::optional<std::string> &start, ///< [in] start, empty for begin
+      uint32_t op_flags = 0
       ) = 0; ///< @return <done, values> values.empty() only if done
 
     virtual get_attr_errorator::future<bufferlist> omap_get_header(
       CollectionRef c,
-      const ghobject_t& oid) = 0;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) = 0;
 
     virtual seastar::future<std::tuple<std::vector<ghobject_t>, ghobject_t>> list_objects(
       CollectionRef c,
       const ghobject_t& start,
       const ghobject_t& end,
-      uint64_t limit) const = 0;
+      uint64_t limit,
+      uint32_t op_flags = 0) const = 0;
 
     virtual seastar::future<CollectionRef> create_new_collection(const coll_t& cid) = 0;
 
@@ -153,7 +161,8 @@ public:
       CollectionRef ch,
       const ghobject_t& oid,
       uint64_t off,
-      uint64_t len) = 0;
+      uint64_t len,
+      uint32_t op_flags = 0) = 0;
 
     virtual unsigned get_max_attr_name_length() const = 0;
   };
index e3d8092837fe78aa87bbf77382aca03b4f63eab8..6a866cb1f9bedd3734b309e70d2298c2e31f61f3 100644 (file)
@@ -898,9 +898,10 @@ get_ranges(CollectionRef ch,
 
 seastar::future<std::tuple<std::vector<ghobject_t>, ghobject_t>>
 SeaStore::Shard::list_objects(CollectionRef ch,
-                       const ghobject_t& start,
-                       const ghobject_t& end,
-                       uint64_t limit) const
+                             const ghobject_t& start,
+                             const ghobject_t& end,
+                             uint64_t limit,
+                             uint32_t op_flags) const
 {
   ++(shard_stats.read_num);
   ++(shard_stats.pending_read_num);
@@ -911,14 +912,14 @@ SeaStore::Shard::list_objects(CollectionRef ch,
   return seastar::do_with(
     RetType(std::vector<ghobject_t>(), start),
     std::move(limit),
-    [this, ch, start, end](auto& ret, auto& limit) {
-    return repeat_eagain([this, ch, start, end, &limit, &ret] {
+    [this, ch, start, end, op_flags](auto& ret, auto& limit) {
+    return repeat_eagain([this, ch, start, end, &limit, &ret, op_flags] {
       ++(shard_stats.repeat_read_num);
 
       return transaction_manager->with_transaction_intr(
         Transaction::src_t::READ,
         "list_objects",
-       CACHE_HINT_TOUCH,
+       op_flags,
         [this, ch, start, end, &limit, &ret](auto &t)
       {
         LOG_PREFIX(SeaStoreS::list_objects);
@@ -1140,11 +1141,10 @@ SeaStore::Shard::read(
     Transaction::src_t::READ,
     "read",
     op_type_t::READ,
+    op_flags,
     [this, offset, len, op_flags](auto &t, auto &onode) {
-      return _read(t, onode, offset, len, op_flags);
-    },
-    op_flags
-  ).finally([this] {
+    return _read(t, onode, offset, len, op_flags);
+  }).finally([this] {
     assert(shard_stats.pending_read_num);
     --(shard_stats.pending_read_num);
   });
@@ -1153,7 +1153,8 @@ SeaStore::Shard::read(
 SeaStore::Shard::base_errorator::future<bool>
 SeaStore::Shard::exists(
   CollectionRef c,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
   LOG_PREFIX(SeaStoreS::exists);
   ++(shard_stats.read_num);
@@ -1165,6 +1166,7 @@ SeaStore::Shard::exists(
     Transaction::src_t::READ,
     "exists",
     op_type_t::READ,
+    op_flags,
     [FNAME](auto& t, auto&) {
     DEBUGT("exists", t);
     return seastar::make_ready_future<bool>(true);
@@ -1245,7 +1247,8 @@ SeaStore::Shard::get_attr_errorator::future<ceph::bufferlist>
 SeaStore::Shard::get_attr(
   CollectionRef ch,
   const ghobject_t& oid,
-  std::string_view name) const
+  std::string_view name,
+  uint32_t op_flags) const
 {
   ++(shard_stats.read_num);
   ++(shard_stats.pending_read_num);
@@ -1256,6 +1259,7 @@ SeaStore::Shard::get_attr(
     Transaction::src_t::READ,
     "get_attr",
     op_type_t::GET_ATTR,
+    op_flags,
     [this, name](auto &t, auto& onode) {
     return _get_attr(t, onode, name);
   }).handle_error(
@@ -1301,7 +1305,8 @@ SeaStore::Shard::_get_attrs(
 SeaStore::Shard::get_attrs_ertr::future<SeaStore::Shard::attrs_t>
 SeaStore::Shard::get_attrs(
   CollectionRef ch,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
   ++(shard_stats.read_num);
   ++(shard_stats.pending_read_num);
@@ -1312,6 +1317,7 @@ SeaStore::Shard::get_attrs(
     Transaction::src_t::READ,
     "get_attrs",
     op_type_t::GET_ATTRS,
+    op_flags,
     [this](auto &t, auto& onode) {
     return _get_attrs(t, onode);
   }).handle_error(
@@ -1343,7 +1349,8 @@ seastar::future<struct stat> SeaStore::Shard::_stat(
 
 seastar::future<struct stat> SeaStore::Shard::stat(
   CollectionRef c,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
   ++(shard_stats.read_num);
   ++(shard_stats.pending_read_num);
@@ -1354,6 +1361,7 @@ seastar::future<struct stat> SeaStore::Shard::stat(
     Transaction::src_t::READ,
     "stat",
     op_type_t::STAT,
+    op_flags,
     [this, oid](auto &t, auto &onode) {
     return _stat(t, onode, oid);
   }).handle_error(
@@ -1369,9 +1377,10 @@ seastar::future<struct stat> SeaStore::Shard::stat(
 SeaStore::Shard::get_attr_errorator::future<ceph::bufferlist>
 SeaStore::Shard::omap_get_header(
   CollectionRef ch,
-  const ghobject_t& oid)
+  const ghobject_t& oid,
+  uint32_t op_flags)
 {
-  return get_attr(ch, oid, OMAP_HEADER_XATTR_KEY);
+  return get_attr(ch, oid, OMAP_HEADER_XATTR_KEY, op_flags);
 }
 
 SeaStore::base_iertr::future<SeaStore::Shard::omap_values_t>
@@ -1394,7 +1403,8 @@ SeaStore::Shard::read_errorator::future<SeaStore::Shard::omap_values_t>
 SeaStore::Shard::omap_get_values(
   CollectionRef ch,
   const ghobject_t &oid,
-  const omap_keys_t &keys)
+  const omap_keys_t &keys,
+  uint32_t op_flags)
 {
   ++(shard_stats.read_num);
   ++(shard_stats.pending_read_num);
@@ -1405,6 +1415,7 @@ SeaStore::Shard::omap_get_values(
     Transaction::src_t::READ,
     "omap_get_values",
     op_type_t::OMAP_GET_VALUES,
+    op_flags,
     [this, keys](auto &t, auto &onode) {
     return do_omap_get_values(t, onode, keys);
   }).finally([this] {
@@ -1534,7 +1545,8 @@ SeaStore::Shard::read_errorator::future<SeaStore::Shard::omap_values_paged_t>
 SeaStore::Shard::omap_get_values(
   CollectionRef ch,
   const ghobject_t &oid,
-  const std::optional<std::string> &start)
+  const std::optional<std::string> &start,
+  uint32_t op_flags)
 {
   ++(shard_stats.read_num);
   ++(shard_stats.pending_read_num);
@@ -1545,6 +1557,7 @@ SeaStore::Shard::omap_get_values(
     Transaction::src_t::READ,
     "omap_get_values2",
     op_type_t::OMAP_GET_VALUES2,
+    op_flags,
     [this, start](auto &t, auto &onode) {
     return do_omap_get_values(t, onode, start);
   }).finally([this] {
@@ -1594,7 +1607,8 @@ SeaStore::Shard::fiemap(
   CollectionRef ch,
   const ghobject_t& oid,
   uint64_t off,
-  uint64_t len)
+  uint64_t len,
+  uint32_t op_flags)
 {
   ++(shard_stats.read_num);
   ++(shard_stats.pending_read_num);
@@ -1605,6 +1619,7 @@ SeaStore::Shard::fiemap(
     Transaction::src_t::READ,
     "fiemap",
     op_type_t::READ,
+    op_flags,
     [this, off, len](auto &t, auto &onode) {
     return _fiemap(t, onode, off, len);
   }).finally([this] {
index a35975f580d585aece019eb49fe2130a9a0d758f..e2a993b9e203b7fe2d27dd6f74165423d62fa3f0 100644 (file)
@@ -101,7 +101,8 @@ public:
 
     seastar::future<struct stat> stat(
       CollectionRef c,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     read_errorator::future<ceph::bufferlist> read(
       CollectionRef c,
@@ -118,32 +119,38 @@ public:
 
     base_errorator::future<bool> exists(
       CollectionRef c,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     get_attr_errorator::future<ceph::bufferlist> get_attr(
       CollectionRef c,
       const ghobject_t& oid,
-      std::string_view name) const final;
+      std::string_view name,
+      uint32_t op_flags = 0) const final;
 
     get_attrs_ertr::future<attrs_t> get_attrs(
       CollectionRef c,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     read_errorator::future<omap_values_t> omap_get_values(
       CollectionRef c,
       const ghobject_t& oid,
-      const omap_keys_t& keys) final;
+      const omap_keys_t& keys,
+      uint32_t op_flags = 0) final;
 
     /// Retrieves paged set of values > start (if present)
     read_errorator::future<omap_values_paged_t> omap_get_values(
       CollectionRef c,           ///< [in] collection
       const ghobject_t &oid,     ///< [in] oid
-      const std::optional<std::string> &start ///< [in] start, empty for begin
+      const std::optional<std::string> &start, ///< [in] start, empty for begin
+      uint32_t op_flags = 0
       ) final; ///< @return <done, values> values.empty() iff done
 
     get_attr_errorator::future<bufferlist> omap_get_header(
       CollectionRef c,
-      const ghobject_t& oid) final;
+      const ghobject_t& oid,
+      uint32_t op_flags = 0) final;
 
     /// std::get<1>(ret) returns end if and only if the listing has listed all
     /// the items within the range, otherwise it returns the next key to be listed.
@@ -151,7 +158,8 @@ public:
       CollectionRef c,
       const ghobject_t& start,
       const ghobject_t& end,
-      uint64_t limit) const final;
+      uint64_t limit,
+      uint32_t op_flags = 0) const final;
 
     seastar::future<CollectionRef> create_new_collection(const coll_t& cid) final;
     seastar::future<CollectionRef> open_collection(const coll_t& cid) final;
@@ -170,7 +178,8 @@ public:
       CollectionRef ch,
       const ghobject_t& oid,
       uint64_t off,
-      uint64_t len) final;
+      uint64_t len,
+      uint32_t op_flags = 0) final;
 
     unsigned get_max_attr_name_length() const final {
       return 256;
@@ -299,8 +308,8 @@ public:
       Transaction::src_t src,
       const char* tname,
       op_type_t op_type,
-      F &&f,
-      cache_hint_t cache_hint_flags = CACHE_HINT_TOUCH) const {
+      cache_hint_t cache_hint_flags,
+      F &&f) const {
       auto begin_time = std::chrono::steady_clock::now();
       return seastar::do_with(
         oid, Ret{}, std::forward<F>(f),