Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions changelog.d/20251209_162100_whole_object_configurable.rst

This file was deleted.

6 changes: 1 addition & 5 deletions src/backy/sources/ceph/rbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@

class RBDClient(object):
log: BoundLogger
use_whole_object_diff: bool

def __init__(self, log: BoundLogger, use_whole_object_diff=False):
def __init__(self, log: BoundLogger):
self.log = log.bind(subsystem="rbd")
self.use_whole_object_diff = False

def _ceph_cli(self, cmdline, encoding="utf-8") -> str:
# This wrapper function for the `rbd` command is only used for
Expand Down Expand Up @@ -69,8 +67,6 @@ def _rbd_stream(self, cmd: list[str]) -> Iterator[IO[bytes]]:

@functools.cached_property
def _supports_whole_object(self):
if not self.use_whole_object_diff:
return False
return "--whole-object" in self._rbd(["help", "export-diff"])

def exists(self, snapspec):
Expand Down
10 changes: 3 additions & 7 deletions src/backy/sources/ceph/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def __init__(self, config: dict, log: BoundLogger):
self.image = config["image"]
self.always_full = config.get("full-always", False)
self.log = log.bind(subsystem="ceph")
self.rbd = RBDClient(
self.log, config.get("use-full-object-diff", False)
)
self.rbd = RBDClient(self.log)

def ready(self) -> bool:
"""Check whether the source can be backed up.
Expand Down Expand Up @@ -148,10 +146,8 @@ def verify(self, target) -> bool:
return backy.utils.files_are_roughly_equal(
source,
target,
report=(
lambda s, t, o: self.revision.backup.quarantine.add_report(
QuarantineReport(s, t, o)
)
report=lambda s, t, o: self.revision.backup.quarantine.add_report(
QuarantineReport(s, t, o)
),
)

Expand Down
Loading