optimize the perf and support more features

This commit is contained in:
Lei Xue
2026-03-14 11:45:35 +08:00
parent 7e7ebacd9d
commit 00cfac3d24
56 changed files with 6340 additions and 1019 deletions

View File

@@ -7,7 +7,7 @@ import (
"os"
"time"
uuid "github.com/satori/go.uuid"
"github.com/google/uuid"
"github.com/sirupsen/logrus"
"github.com/gostor/gotgt/pkg/api"
@@ -149,7 +149,7 @@ func (r *remoteBs) Stats() scsi.Stats {
return r.targetDriver.Stats()
}
// Resize is called to resize the volume
// Resize is called to resize the volume
func (r *remoteBs) Resize(size uint64) error {
if !r.isUp {
return fmt.Errorf("Volume is not up")
@@ -159,7 +159,7 @@ func (r *remoteBs) Resize(size uint64) error {
func (r *remoteBs) startScsiTarget(cfg *config.Config) error {
var err error
id := uuid.NewV4()
id := uuid.New()
uid := binary.BigEndian.Uint64(id[:8])
err = scsi.InitSCSILUMapEx(&config.BackendStorage{
DeviceID: uid,