diff --git a/curiosrc/ffi/piece_funcs.go b/curiosrc/ffi/piece_funcs.go index 9bf4a504b..8b7df01ed 100644 --- a/curiosrc/ffi/piece_funcs.go +++ b/curiosrc/ffi/piece_funcs.go @@ -8,13 +8,14 @@ import ( "golang.org/x/xerrors" + "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) -func (sb *SealCalls) WritePiece(ctx context.Context, pieceID storiface.PieceNumber, size int64, data io.Reader) error { +func (sb *SealCalls) WritePiece(ctx context.Context, taskID *harmonytask.TaskID, pieceID storiface.PieceNumber, size int64, data io.Reader) error { // todo: config(?): allow setting PathStorage for this // todo storage reservations - paths, done, err := sb.sectors.AcquireSector(ctx, nil, pieceID.Ref(), storiface.FTNone, storiface.FTPiece, storiface.PathSealing) + paths, done, err := sb.sectors.AcquireSector(ctx, taskID, pieceID.Ref(), storiface.FTNone, storiface.FTPiece, storiface.PathSealing) if err != nil { return err } diff --git a/curiosrc/piece/task_park_piece.go b/curiosrc/piece/task_park_piece.go index c8972fdaf..2085637f6 100644 --- a/curiosrc/piece/task_park_piece.go +++ b/curiosrc/piece/task_park_piece.go @@ -152,7 +152,7 @@ func (p *ParkPieceTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (d pnum := storiface.PieceNumber(pieceData.PieceID) - if err := p.sc.WritePiece(ctx, pnum, pieceRawSize, upr); err != nil { + if err := p.sc.WritePiece(ctx, &taskID, pnum, pieceRawSize, upr); err != nil { return false, xerrors.Errorf("write piece: %w", err) }