]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: refactor get_physical_osds()
authorGuillaume Abrioux <gabrioux@ibm.com>
Fri, 14 Feb 2025 12:34:50 +0000 (12:34 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 24 Feb 2025 11:56:23 +0000 (11:56 +0000)
commit216ced39bc205a3c1e2d626450c23b5c969ffb0e
tree6b826ff91c575cb2a8ce4011dea689523ba72e71
parent1e33ff4ea21f2646c9c7a9fed92fe7d593b62691
ceph-volume: refactor get_physical_osds()

This refactors `get_physical_osds()`.
The calculation of `data_slots` is now more concise. The handling of
`dev_size`, `rel_data_size`, and `abs_size` is standardized.
The initialization of `free_size` is moved outside the loop
for clarity. Redundant checks and assignments are removed to simplify
the code.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 140199b098bcc203b480330dbd8547230a7954c2)
src/ceph-volume/ceph_volume/devices/lvm/batch.py