summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/os/Transaction.cc4
-rw-r--r--src/os/Transaction.h13
-rw-r--r--src/os/bluestore/BlueStore.cc4
-rw-r--r--src/os/filestore/FileStore.cc2
-rw-r--r--src/os/kstore/KStore.cc4
-rw-r--r--src/os/memstore/MemStore.cc2
6 files changed, 11 insertions, 18 deletions
diff --git a/src/os/Transaction.cc b/src/os/Transaction.cc
index 89a0eb0cb5a..af82da3406d 100644
--- a/src/os/Transaction.cc
+++ b/src/os/Transaction.cc
@@ -259,7 +259,7 @@ void Transaction::dump(ceph::Formatter *f)
{
using ceph::decode;
coll_t cid = i.get_cid(op->cid);
- uint32_t type = op->hint_type;
+ uint32_t type = op->hint;
f->dump_string("op_name", "coll_hint");
f->dump_stream("collection") << cid;
f->dump_unsigned("type", type);
@@ -503,7 +503,7 @@ void Transaction::dump(ceph::Formatter *f)
ghobject_t oid = i.get_oid(op->oid);
uint64_t expected_object_size = op->expected_object_size;
uint64_t expected_write_size = op->expected_write_size;
- uint32_t alloc_hint_flags = op->alloc_hint_flags;
+ uint32_t alloc_hint_flags = op->hint;
f->dump_string("op_name", "op_setallochint");
f->dump_stream("collection") << cid;
f->dump_stream("oid") << oid;
diff --git a/src/os/Transaction.h b/src/os/Transaction.h
index fe4f25313fe..00e9fc47051 100644
--- a/src/os/Transaction.h
+++ b/src/os/Transaction.h
@@ -169,14 +169,7 @@ public:
ceph_le32 dest_cid;
ceph_le32 dest_oid; //OP_CLONE, OP_CLONERANGE
ceph_le64 dest_off; //OP_CLONERANGE
- union {
- struct {
- ceph_le32 hint_type; //OP_COLL_HINT
- } __attribute__ ((packed));
- struct {
- ceph_le32 alloc_hint_flags; //OP_SETALLOCHINT
- } __attribute__ ((packed));
- } __attribute__ ((packed));
+ ceph_le32 hint; //OP_COLL_HINT,OP_SETALLOCHINT
ceph_le64 expected_object_size; //OP_SETALLOCHINT
ceph_le64 expected_write_size; //OP_SETALLOCHINT
ceph_le32 split_bits; //OP_SPLIT_COLLECTION2,OP_COLL_SET_BITS,
@@ -1025,7 +1018,7 @@ public:
Op* _op = _get_next_op();
_op->op = OP_COLL_HINT;
_op->cid = _get_coll_id(cid);
- _op->hint_type = type;
+ _op->hint = type;
encode(hint, data_bl);
data.ops = data.ops + 1;
}
@@ -1259,7 +1252,7 @@ public:
_op->oid = _get_object_id(oid);
_op->expected_object_size = expected_object_size;
_op->expected_write_size = expected_write_size;
- _op->alloc_hint_flags = flags;
+ _op->hint = flags;
data.ops = data.ops + 1;
}
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc
index 8e10a447692..1fdca1f7f70 100644
--- a/src/os/bluestore/BlueStore.cc
+++ b/src/os/bluestore/BlueStore.cc
@@ -12514,7 +12514,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t)
case Transaction::OP_COLL_HINT:
{
- uint32_t type = op->hint_type;
+ uint32_t type = op->hint;
bufferlist hint;
i.decode_bl(hint);
auto hiter = hint.cbegin();
@@ -12745,7 +12745,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t)
r = _set_alloc_hint(txc, c, o,
op->expected_object_size,
op->expected_write_size,
- op->alloc_hint_flags);
+ op->hint);
}
break;
diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc
index 008948d7828..92539a9320b 100644
--- a/src/os/filestore/FileStore.cc
+++ b/src/os/filestore/FileStore.cc
@@ -3019,7 +3019,7 @@ void FileStore::_do_transaction(
case Transaction::OP_COLL_HINT:
{
const coll_t &cid = i.get_cid(op->cid);
- uint32_t type = op->hint_type;
+ uint32_t type = op->hint;
bufferlist hint;
i.decode_bl(hint);
auto hiter = hint.cbegin();
diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc
index 8534a7ccff2..f1a9caa0bbe 100644
--- a/src/os/kstore/KStore.cc
+++ b/src/os/kstore/KStore.cc
@@ -2226,7 +2226,7 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t)
case Transaction::OP_COLL_HINT:
{
- uint32_t type = op->hint_type;
+ uint32_t type = op->hint;
bufferlist hint;
i.decode_bl(hint);
auto hiter = hint.cbegin();
@@ -2465,7 +2465,7 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t)
{
uint64_t expected_object_size = op->expected_object_size;
uint64_t expected_write_size = op->expected_write_size;
- uint32_t flags = op->alloc_hint_flags;
+ uint32_t flags = op->hint;
r = _setallochint(txc, c, o,
expected_object_size,
expected_write_size,
diff --git a/src/os/memstore/MemStore.cc b/src/os/memstore/MemStore.cc
index e6a7240bff0..69cef7e96eb 100644
--- a/src/os/memstore/MemStore.cc
+++ b/src/os/memstore/MemStore.cc
@@ -800,7 +800,7 @@ void MemStore::_do_transaction(Transaction& t)
case Transaction::OP_COLL_HINT:
{
coll_t cid = i.get_cid(op->cid);
- uint32_t type = op->hint_type;
+ uint32_t type = op->hint;
ceph::buffer::list hint;
i.decode_bl(hint);
auto hiter = hint.cbegin();