From 6a199ffea984a3a88474914d610d0d7ad549a7ee Mon Sep 17 00:00:00 2001 From: Nikhil-Ladha Date: Thu, 17 Oct 2024 16:56:17 +0530 Subject: [PATCH] cephfs: add clone progress report in clone status add clone progress report in clone status output Signed-off-by: Nikhil-Ladha --- cephfs/admin/clone.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cephfs/admin/clone.go b/cephfs/admin/clone.go index d8281359c7..8f31eb53a6 100644 --- a/cephfs/admin/clone.go +++ b/cephfs/admin/clone.go @@ -81,10 +81,18 @@ type CloneSource struct { Snapshot string `json:"snapshot"` } +// CloneProgressReport contains the progress report of a subvolume clone. +type CloneProgressReport struct { + PercentageCloned string `json:"percentage clone"` + AmountCloned string `json:"amount cloned"` + FilesCloned string `json:"files cloned"` +} + // CloneStatus reports on the status of a subvolume clone. type CloneStatus struct { - State CloneState `json:"state"` - Source CloneSource `json:"source"` + State CloneState `json:"state"` + Source CloneSource `json:"source"` + ProgressReport CloneProgressReport `json:"progress_report"` // failure can be obtained through .GetFailure() failure *CloneFailure