Skip to content

Commit 32b3aba

Browse files
committed
osd: drop the unused ECTransaction::requires_overwrite()
Signed-off-by: Radosław Zarzyński <[email protected]>
1 parent ebf12a2 commit 32b3aba

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/osd/ECTransaction.cc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,6 @@ void encode_and_write(
9393
}
9494
}
9595

96-
bool ECTransaction::requires_overwrite(
97-
uint64_t prev_size,
98-
const PGTransaction::ObjectOperation &op) {
99-
// special handling for truncates to 0
100-
if (op.truncate && op.truncate->first == 0)
101-
return false;
102-
return op.is_none() &&
103-
((!op.buffer_updates.empty() &&
104-
(op.buffer_updates.begin().get_off() < prev_size)) ||
105-
(op.truncate &&
106-
(op.truncate->first < prev_size)));
107-
}
108-
10996
void ECTransaction::generate_transactions(
11097
WritePlan &plan,
11198
ErasureCodeInterfaceRef &ecimpl,

src/osd/ECTransaction.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace ECTransaction {
3232
std::map<hobject_t,ECUtil::HashInfoRef> hash_infos;
3333
};
3434

35-
bool requires_overwrite(
36-
uint64_t prev_size,
37-
const PGTransaction::ObjectOperation &op);
38-
3935
template <typename F>
4036
WritePlan get_write_plan(
4137
const ECUtil::stripe_info_t &sinfo,

0 commit comments

Comments
 (0)