]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: make sure PGBackend's modification operations not change osd_op state 38728/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 29 Dec 2020 07:19:52 +0000 (15:19 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Tue, 29 Dec 2020 07:19:52 +0000 (15:19 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/osd/pg_backend.cc
src/crimson/osd/pg_backend.h

index 558fc7dba0b7f2dc049387dcbd03f6a4bd5e705c..39a9f8f187d189aa056bd606b33f3bd33dc3db95 100644 (file)
@@ -738,7 +738,7 @@ PGBackend::list_objects(const hobject_t& start, uint64_t limit) const
 
 seastar::future<> PGBackend::setxattr(
   ObjectState& os,
-  OSDOp& osd_op,
+  const OSDOp& osd_op,
   ceph::os::Transaction& txn)
 {
   if (local_conf()->osd_max_attr_size > 0 &&
@@ -826,7 +826,7 @@ PGBackend::get_attr_errorator::future<> PGBackend::get_xattrs(
 
 PGBackend::rm_xattr_ertr::future<> PGBackend::rm_xattr(
   ObjectState& os,
-  OSDOp& osd_op,
+  const OSDOp& osd_op,
   ceph::os::Transaction& txn)
 {
   if (__builtin_expect(stopping, false)) {
@@ -1059,7 +1059,7 @@ PGBackend::omap_get_vals_by_keys(
 
 seastar::future<> PGBackend::omap_set_vals(
   ObjectState& os,
-  OSDOp& osd_op,
+  const OSDOp& osd_op,
   ceph::os::Transaction& txn,
   osd_op_params_t& osd_op_params)
 {
@@ -1104,7 +1104,7 @@ seastar::future<> PGBackend::omap_set_header(
 
 seastar::future<> PGBackend::omap_remove_range(
   ObjectState& os,
-  OSDOp& osd_op,
+  const OSDOp& osd_op,
   ceph::os::Transaction& txn)
 {
   std::string key_begin, key_end;
index cd2fe897d27c9b3381b3efec4179ee49cb1f021f..303a24022f70e878bd59931f5cf70cb057cfd14a 100644 (file)
@@ -132,7 +132,7 @@ public:
     uint64_t limit) const;
   seastar::future<> setxattr(
     ObjectState& os,
-    OSDOp& osd_op,
+    const OSDOp& osd_op,
     ceph::os::Transaction& trans);
   using get_attr_errorator = crimson::os::FuturizedStore::get_attr_errorator;
   get_attr_errorator::future<> getxattr(
@@ -147,7 +147,7 @@ public:
   using rm_xattr_ertr = crimson::errorator<crimson::ct_error::enoent>;
   rm_xattr_ertr::future<> rm_xattr(
     ObjectState& os,
-    OSDOp& osd_op,
+    const OSDOp& osd_op,
     ceph::os::Transaction& trans);
   seastar::future<struct stat> stat(
     CollectionRef c,
@@ -170,7 +170,7 @@ public:
     OSDOp& osd_op) const;
   seastar::future<> omap_set_vals(
     ObjectState& os,
-    OSDOp& osd_op,
+    const OSDOp& osd_op,
     ceph::os::Transaction& trans,
     osd_op_params_t& osd_op_params);
   seastar::future<ceph::bufferlist> omap_get_header(
@@ -185,7 +185,7 @@ public:
     ceph::os::Transaction& trans);
   seastar::future<> omap_remove_range(
     ObjectState& os,
-    OSDOp& osd_op,
+    const OSDOp& osd_op,
     ceph::os::Transaction& trans);
   using omap_clear_ertr = crimson::errorator<crimson::ct_error::enoent>;
   omap_clear_ertr::future<> omap_clear(