Commit e3a6680
committed
os: get rid of the Transaction::decode_bp()
`os::Transaction::decode_bp()` has only one user: `_setattrs()`
of `BlueStore`. It uses that for optimization purposes: keeping
up contigous space instead of potentially fragmented `bufferlist`
that would require rectifying memcpy later.
The problem is `_setattrs()` also needs to avoid keeping large
raw buffers with only small subset being referenced. It achieves
this by copying the data if `bufferptr:::is_partial()` returns
`true`. However, this means the memcpy happens virtually always
as it's hard to even imagine the `val`, decoded from the wire,
can fulfill the 0 waste requirement.
Therefore the optimization doesn't make sense; it only imposes
costs in terms of complexity breaking the symmetry between encode
and decode in `os::Transation` (there is no `encode_bp()`).
This commit kills the optimization and simplifies `os::Transaction`.
Signed-off-by: Radoslaw Zarzynski <[email protected]>1 parent 327d209 commit e3a6680
3 files changed
+14
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | 714 | | |
719 | 715 | | |
720 | 716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15690 | 15690 | | |
15691 | 15691 | | |
15692 | 15692 | | |
15693 | | - | |
15694 | | - | |
15695 | | - | |
| 15693 | + | |
| 15694 | + | |
| 15695 | + | |
15696 | 15696 | | |
15697 | 15697 | | |
15698 | 15698 | | |
| |||
17733 | 17733 | | |
17734 | 17734 | | |
17735 | 17735 | | |
17736 | | - | |
| 17736 | + | |
17737 | 17737 | | |
17738 | 17738 | | |
17739 | 17739 | | |
17740 | 17740 | | |
17741 | 17741 | | |
17742 | | - | |
17743 | | - | |
17744 | | - | |
| 17742 | + | |
| 17743 | + | |
17745 | 17744 | | |
17746 | | - | |
17747 | | - | |
| 17745 | + | |
| 17746 | + | |
| 17747 | + | |
| 17748 | + | |
| 17749 | + | |
| 17750 | + | |
| 17751 | + | |
17748 | 17752 | | |
17749 | 17753 | | |
17750 | 17754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3862 | 3862 | | |
3863 | 3863 | | |
3864 | 3864 | | |
3865 | | - | |
| 3865 | + | |
3866 | 3866 | | |
3867 | 3867 | | |
3868 | 3868 | | |
| |||
0 commit comments