]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Fix subvoume snapshot clone failure
authorKotresh HR <khiremat@redhat.com>
Wed, 12 Jan 2022 09:31:53 +0000 (15:01 +0530)
committerKotresh HR <khiremat@redhat.com>
Thu, 3 Feb 2022 10:09:04 +0000 (15:39 +0530)
commitf32f3a6ec856b4226df989d4c7be926790535ead
treea2204666cdbc5c28e100b2997699cc793ba026f5
parent283696584efa633f18f58b12ba1c2e94d14e8d3f
mgr/volumes: Fix subvoume snapshot clone failure

Problem:
The subvolume snapshot clone fails if the quota on the source
has exceeded. Since the quota is not strictly enforced at the
byte range, this is a possibility.

Cause:
The quota on the clone is set prior to copying the data
from the source. Hence the quota mostly get enforced before
copying the entire data from the source resulting in the
clone failure.

Solution:
Enforce quota on the clone after the data is copied.

Fixes: https://tracker.ceph.com/issues/53848
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 18b85c53af36d89a8c53b40cfc44fe06816a9733)
src/pybind/mgr/volumes/fs/async_cloner.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py