Skip to content

Commit 4d55362

Browse files
Merge pull request ceph#66022 from Jayaprakash-ibm/wip-nref-opt
os/bluestore: Optimize Blob::put() for single-reference fast path
2 parents 3ed04b6 + f9f8fca commit 4d55362

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/os/bluestore/BlueStore.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,10 @@ class BlueStore : public ObjectStore,
762762
++nref;
763763
}
764764
void put() {
765+
if (nref.load(std::memory_order_acquire) == 1) {
766+
delete this;
767+
return;
768+
}
765769
if (--nref == 0)
766770
delete this;
767771
}

0 commit comments

Comments
 (0)