mirror of
https://git.mirrors.martin98.com/https://github.com/ceph/ceph-csi.git
synced 2025-04-18 11:49:57 +08:00
rbd: return unimplemented error for block-mode reclaimspace req
blkdiscard cmd discards all data on the block device which is not desired. Hence, return unimplemented code if the volume access mode is block. Signed-off-by: Rakshith R <rar@redhat.com> (cherry picked from commit 3a64ee48c3eed8131ad8eef0a889a89d56ffab17)
This commit is contained in:
parent
d1aa5594aa
commit
c374edcbaa
@ -127,11 +127,11 @@ func (rsns *ReclaimSpaceNodeServer) NodeReclaimSpace(
|
||||
return nil, status.Error(codes.Unimplemented, "multi-node space reclaim is not supported")
|
||||
}
|
||||
|
||||
cmd := "fstrim"
|
||||
if isBlock {
|
||||
cmd = "blkdiscard"
|
||||
return nil, status.Error(codes.Unimplemented, "block-mode space reclaim is not supported")
|
||||
}
|
||||
|
||||
cmd := "fstrim"
|
||||
_, stderr, err := util.ExecCommand(ctx, cmd, path)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(
|
||||
|
Loading…
x
Reference in New Issue
Block a user