Implement stats and resize and fix remote backing store apis

- Convert constant to var so that it can be configured from backend
- Add options to disable persistent reservation and ORWrite16 commands

Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
This commit is contained in:
Utkarsh Mani Tripathi
2019-11-20 14:34:35 +05:30
parent d7caf89610
commit d7891b1f68
10 changed files with 190 additions and 50 deletions
+21
View File
@@ -28,6 +28,27 @@ type SCSITargetDriver interface {
NewTarget(string, *config.Config) error
RereadTargetLUNMap()
Close() error
Resize(uint64) error
Stats() Stats
}
type Stats struct {
IsClientConnected bool
RevisionCounter int64
ReplicaCounter int64
SCSIIOCount map[int]int64
ReadIOPS int64
TotalReadTime int64
TotalReadBlockCount int64
WriteIOPS int64
TotalWriteTime int64
TotalWriteBlockCount int64
UsedLogicalBlocks int64
UsedBlocks int64
SectorSize int64
}
type TargetDriverFunc func(*SCSITargetService) (SCSITargetDriver, error)