mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-05-29 01:56:41 +00:00
cephfs: make use of subvolumeInfo.state to determine quota
https://github.com/ceph/go-ceph/pull/455/ added `state` field to subvolume info struct which helps to identify the snapshot retention state in the caller. This patch make use of the same Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
66fa5891b2
commit
edf511a833
@ -109,9 +109,7 @@ func (vo *volumeOptions) getSubVolumeInfo(ctx context.Context, volID volumeID) (
|
|||||||
// If info.BytesQuota == Infinite (in case it is not set)
|
// If info.BytesQuota == Infinite (in case it is not set)
|
||||||
// or nil (in case the subvolume is in snapshot-retained state),
|
// or nil (in case the subvolume is in snapshot-retained state),
|
||||||
// just continue without returning quota information.
|
// just continue without returning quota information.
|
||||||
// TODO: make use of subvolume "state" attribute once
|
if !(info.BytesQuota == fsAdmin.Infinite || info.State == fsAdmin.StateSnapRetained) {
|
||||||
// https://github.com/ceph/go-ceph/issues/453 is fixed.
|
|
||||||
if !(info.BytesQuota == fsAdmin.Infinite || info.BytesQuota == nil) {
|
|
||||||
return nil, fmt.Errorf("subvolume %s has unsupported quota: %v", string(volID), info.BytesQuota)
|
return nil, fmt.Errorf("subvolume %s has unsupported quota: %v", string(volID), info.BytesQuota)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user