scoutfs: update release/stage for new ioctl structs

This commit is contained in:
Ben McClelland
2021-01-26 13:46:28 -07:00
parent c19fddb618
commit 469f6a5b7c
2 changed files with 5 additions and 5 deletions

View File

@@ -288,7 +288,7 @@ func ReleaseFile(path string, version uint64) error {
// FReleaseFile marks file offline and frees associated extents
func FReleaseFile(f *os.File, version uint64) error {
r := iocRelease{
Count: math.MaxUint64,
Length: math.MaxUint64,
Version: version,
}
@@ -313,7 +313,7 @@ func FStageFile(f *os.File, version, offset uint64, b []byte) (int, error) {
Data_version: version,
Buf_ptr: uint64(uintptr(unsafe.Pointer(&b[0]))),
Offset: offset,
Count: int32(len(b)),
Length: int32(len(b)),
}
return scoutfsctl(f, IOCSTAGE, unsafe.Pointer(&r))

View File

@@ -49,15 +49,15 @@ type inoPath struct {
X_pad [6]uint8
}
type iocRelease struct {
Block uint64
Count uint64
Offset uint64
Length uint64
Version uint64
}
type iocStage struct {
Data_version uint64
Buf_ptr uint64
Offset uint64
Count int32
Length int32
X_pad uint32
}
type Stat struct {