mapping lun and fix portal management

This commit is contained in:
Le Zhang
2016-10-04 13:39:55 +08:00
parent 89382bddb0
commit c9b93c7527
16 changed files with 298 additions and 119 deletions

View File

@@ -17,8 +17,6 @@ limitations under the License.
package backingstore
import (
"os"
"github.com/gostor/gotgt/pkg/api"
"github.com/gostor/gotgt/pkg/scsi"
)
@@ -41,8 +39,8 @@ func newNull() (api.BackingStore, error) {
}, nil
}
func (bs *NullBackingStore) Open(dev *api.SCSILu, path string) (*os.File, error) {
return nil, nil
func (bs *NullBackingStore) Open(dev *api.SCSILu, path string) error {
return nil
}
func (bs *NullBackingStore) Close(dev *api.SCSILu) error {
@@ -57,6 +55,10 @@ func (bs *NullBackingStore) Exit(dev *api.SCSILu) error {
return nil
}
func (bs *NullBackingStore) Size(dev *api.SCSILu) uint64 {
return 0
}
func (bs *NullBackingStore) CommandSubmit(cmd *api.SCSICommand) error {
cmd.Result = api.SAM_STAT_GOOD
return nil