keep storage-fsm (renamed to storage-sealing) and sector-storage in extern.

This commit is contained in:
Raúl Kripalani 2020-08-17 14:26:18 +01:00
parent 4f6d01d2ea
commit efdc428d5d
133 changed files with 225 additions and 250 deletions

View File

@ -12,9 +12,9 @@ import (
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/specs-actors/actors/abi"
)

View File

@ -6,9 +6,9 @@ import (
"github.com/ipfs/go-cid"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-storage/storage"

View File

@ -15,11 +15,11 @@ import (
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-multistore"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin/miner"

View File

@ -22,8 +22,8 @@ import (
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/miner"
"github.com/filecoin-project/lotus/storage/sealing"
dag "github.com/ipfs/go-merkledag"
dstest "github.com/ipfs/go-merkledag/test"
unixfile "github.com/ipfs/go-unixfs/file"

View File

@ -12,8 +12,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/storage/sealing"
"github.com/filecoin-project/lotus/storage/sector/mock"
"github.com/filecoin-project/lotus/extern/sector-storage/mock"
"github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/specs-actors/actors/abi"
miner2 "github.com/filecoin-project/specs-actors/actors/builtin/miner"

View File

@ -34,11 +34,11 @@ import (
"github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/chain/wallet"
"github.com/filecoin-project/lotus/cmd/lotus-seed/seed"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/lib/blockstore"
"github.com/filecoin-project/lotus/lib/sigs"
"github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
)
var log = logging.Logger("gen")

View File

@ -14,7 +14,7 @@ import (
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin"

View File

@ -13,7 +13,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/specs-actors/actors/builtin/account"

View File

@ -24,7 +24,7 @@ import (
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/specs-actors/actors/builtin/power"

View File

@ -23,7 +23,7 @@ import (
"github.com/filecoin-project/specs-actors/actors/runtime"
"github.com/filecoin-project/specs-actors/actors/util/adt"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
)
func init() {

View File

@ -25,7 +25,7 @@ import (
_ "github.com/filecoin-project/lotus/lib/sigs/bls"
_ "github.com/filecoin-project/lotus/lib/sigs/secp"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/ipfs/go-datastore"

View File

@ -21,9 +21,9 @@ import (
"github.com/filecoin-project/go-address"
paramfetch "github.com/filecoin-project/go-paramfetch"
lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
"github.com/filecoin-project/specs-storage/storage"

View File

@ -21,7 +21,7 @@ import (
"github.com/urfave/cli/v2"
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin"

View File

@ -22,18 +22,18 @@ import (
"github.com/filecoin-project/go-jsonrpc"
"github.com/filecoin-project/go-jsonrpc/auth"
paramfetch "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/apistruct"
"github.com/filecoin-project/lotus/build"
lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/lib/lotuslog"
"github.com/filecoin-project/lotus/lib/rpcenc"
"github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sector"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
)
var log = logging.Logger("main")
@ -336,7 +336,7 @@ var runCmd = &cli.Command{
// Create / expose the worker
workerApi := &worker{
LocalWorker: sector.NewLocalWorker(sector.WorkerConfig{
LocalWorker: sectorstorage.NewLocalWorker(sectorstorage.WorkerConfig{
SealProof: spt,
TaskTypes: taskTypes,
}, remote, localStore, nodeApi),

View File

@ -5,13 +5,13 @@ import (
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/storage/sector"
"github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/build"
)
type worker struct {
*sector.LocalWorker
*sectorstorage.LocalWorker
}
func (w *worker) Version(context.Context) (build.Version, error) {

View File

@ -8,7 +8,7 @@ import (
"os"
"github.com/docker/go-units"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
logging "github.com/ipfs/go-log/v2"
"github.com/mitchellh/go-homedir"

View File

@ -19,7 +19,7 @@ import (
ffi "github.com/filecoin-project/filecoin-ffi"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/storage/sector/zerocomm"
"github.com/filecoin-project/lotus/extern/sector-storage/zerocomm"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin/market"
@ -27,10 +27,10 @@ import (
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/storage/sector/stores"
)
var log = logging.Logger("preseal")

View File

@ -11,7 +11,7 @@ import (
"github.com/urfave/cli/v2"
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/storage/sealing"
"github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/actors/builtin/power"

View File

@ -25,9 +25,9 @@ import (
"github.com/filecoin-project/go-address"
cborutil "github.com/filecoin-project/go-cbor-util"
paramfetch "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/lotus/storage/sector"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/specs-actors/actors/builtin/market"
@ -41,13 +41,13 @@ import (
"github.com/filecoin-project/lotus/chain/gen/slashfilter"
"github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/miner"
"github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage"
"github.com/filecoin-project/lotus/storage/sealing"
)
var initCmd = &cli.Command{
@ -436,9 +436,9 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode,
return err
}
smgr, err := sector.New(ctx, lr, stores.NewIndex(), &ffiwrapper.Config{
smgr, err := sectorstorage.New(ctx, lr, stores.NewIndex(), &ffiwrapper.Config{
SealProofType: spt,
}, sector.SealerConfig{
}, sectorstorage.SealerConfig{
ParallelFetchLimit: 10,
AllowPreCommit1: true,
AllowPreCommit2: true,

View File

@ -13,7 +13,7 @@ import (
"github.com/fatih/color"
"github.com/urfave/cli/v2"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli"

View File

@ -18,8 +18,8 @@ import (
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/chain/types"

View File

@ -30,6 +30,7 @@ import (
"github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/vm"
lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/lib/blockstore"
"github.com/filecoin-project/lotus/lib/peermgr"
"github.com/filecoin-project/lotus/lib/ulimit"
@ -39,7 +40,6 @@ import (
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
)
const (

View File

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -8,7 +8,7 @@ import (
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/specs-actors/actors/abi"
)

View File

@ -8,8 +8,8 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
type sectorFile struct {

View File

@ -12,8 +12,8 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
const veryLargeRle = 1 << 20

View File

@ -20,10 +20,10 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/storage/sector/fr32"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/storage/sector/zerocomm"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/zerocomm"
)
var _ Storage = &Sealer{}

View File

@ -27,8 +27,8 @@ import (
ffi "github.com/filecoin-project/filecoin-ffi"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
)
func init() {

View File

@ -9,9 +9,9 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
type Validator interface {

View File

@ -7,7 +7,7 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
// merge gaps between ranges which are close to each other

View File

@ -11,7 +11,7 @@ import (
ffi "github.com/filecoin-project/filecoin-ffi"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"go.opencensus.io/trace"
)

View File

@ -7,8 +7,8 @@ import (
"os"
"testing"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/fr32"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32"
ffi "github.com/filecoin-project/filecoin-ffi"

View File

@ -12,8 +12,8 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/stretchr/testify/require"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/fr32"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32"
)
func padFFI(buf []byte) []byte {

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/fr32"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32"
)
func TestUnpadReader(t *testing.T) {

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -15,10 +15,10 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
storage2 "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
var pathTypes = []stores.SectorFileType{stores.FTUnsealed, stores.FTSealed, stores.FTCache}

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -6,7 +6,7 @@ import (
"io"
"net/http"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log/v2"
@ -16,10 +16,10 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
var log = logging.Logger("advmgr")

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"bytes"
@ -11,10 +11,10 @@ import (
"strings"
"testing"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/specs-actors/actors/abi"

View File

@ -16,8 +16,8 @@ import (
logging "github.com/ipfs/go-log"
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
var log = logging.Logger("sbmock")

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import "sort"

View File

@ -1,10 +1,10 @@
package sector
package sectorstorage
import (
"fmt"
"testing"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
)
func TestRequestQueue(t *testing.T) {

View File

@ -1,9 +1,9 @@
package sector
package sectorstorage
import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
)
type Resources struct {

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -7,7 +7,7 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
)
type readonlyProvider struct {

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -12,8 +12,8 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
type schedPrioCtxKey int

View File

@ -1,9 +1,9 @@
package sector
package sectorstorage
import (
"sync"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
func (a *activeResources) withResources(id WorkerID, wr storiface.WorkerResources, r Resources, locker sync.Locker, cb func() error) error {

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -14,10 +14,10 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/specs-storage/storage"
)

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -7,8 +7,8 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
)
type allocSelector struct {

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -7,8 +7,8 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
)
type existingSelector struct {

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -7,8 +7,8 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
)
type taskSelector struct {

View File

@ -1,6 +1,6 @@
package sector
package sectorstorage
import "github.com/filecoin-project/lotus/storage/sector/storiface"
import "github.com/filecoin-project/lotus/extern/sector-storage/storiface"
func (m *Manager) WorkerStats() map[uint64]storiface.WorkerStats {
m.sched.workersLk.RLock()

View File

@ -10,7 +10,7 @@ import (
logging "github.com/ipfs/go-log/v2"
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/storage/sector/tarutil"
"github.com/filecoin-project/lotus/extern/sector-storage/tarutil"
)
var log = logging.Logger("stores")

View File

@ -10,7 +10,7 @@ import (
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"

View File

@ -3,7 +3,7 @@ package stores
import (
"context"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/specs-actors/actors/abi"
)

View File

@ -15,7 +15,7 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
)
type StoragePath struct {

View File

@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/google/uuid"
"github.com/stretchr/testify/require"

View File

@ -14,9 +14,9 @@ import (
"sort"
"sync"
"github.com/filecoin-project/lotus/storage/sector/fsutil"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/storage/sector/tarutil"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/tarutil"
"github.com/filecoin-project/specs-actors/actors/abi"

View File

@ -3,7 +3,7 @@ package storiface
import (
"time"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/specs-actors/actors/abi"
)

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -9,10 +9,10 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/storage/sector/mock"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/mock"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
type testWorker struct {

View File

@ -1,4 +1,4 @@
package sector
package sectorstorage
import (
"context"
@ -11,9 +11,9 @@ import (
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/storage/sector/sealtasks"
"github.com/filecoin-project/lotus/storage/sector/stores"
"github.com/filecoin-project/lotus/storage/sector/storiface"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
)
type workTracker struct {

View File

@ -10,8 +10,8 @@ import (
abi "github.com/filecoin-project/specs-actors/actors/abi"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/zerocomm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/zerocomm"
)
func TestComms(t *testing.T) {

View File

@ -7,8 +7,8 @@ import (
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sector/zerocomm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/zerocomm"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/actors/crypto"

View File

@ -6,7 +6,7 @@ import (
gen "github.com/whyrusleeping/cbor-gen"
"github.com/filecoin-project/lotus/storage/sealing"
"github.com/filecoin-project/lotus/extern/storage-sealing"
)
func main() {

View File

@ -11,7 +11,7 @@ import (
commcid "github.com/filecoin-project/go-fil-commcid"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/storage/sealing"
"github.com/filecoin-project/lotus/extern/storage-sealing"
)
type fakeChain struct {

View File

@ -15,8 +15,8 @@ import (
"github.com/filecoin-project/go-address"
padreader "github.com/filecoin-project/go-padreader"
statemachine "github.com/filecoin-project/go-statemachine"
"github.com/filecoin-project/lotus/storage/sector"
"github.com/filecoin-project/lotus/storage/sector/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin/market"
@ -59,7 +59,7 @@ type Sealing struct {
maddr address.Address
sealer sector.SectorManager
sealer sectorstorage.SectorManager
sectors *statemachine.StateGroup
sc SectorIDCounter
verif ffiwrapper.Verifier
@ -90,7 +90,7 @@ type UnsealedSectorInfo struct {
pieceSizes []abi.UnpaddedPieceSize
}
func New(api SealingAPI, fc FeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sector.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, pcp PreCommitPolicy, gsd GetSealingDelayFunc) *Sealing {
func New(api SealingAPI, fc FeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sectorstorage.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, pcp PreCommitPolicy, gsd GetSealingDelayFunc) *Sealing {
s := &Sealing{
api: api,
feeCfg: fc,
@ -174,7 +174,7 @@ func (m *Sealing) AddPieceToAnySector(ctx context.Context, size abi.UnpaddedPiec
// Caller should hold m.unsealedInfoMap.mux
func (m *Sealing) addPiece(ctx context.Context, sectorID abi.SectorNumber, size abi.UnpaddedPieceSize, r io.Reader, di *DealInfo) error {
log.Infof("Adding piece to sector %d", sectorID)
ppi, err := m.sealer.AddPiece(sector.WithPriority(ctx, DealSectorPriority), m.minerSector(sectorID), m.unsealedInfoMap.infos[sectorID].pieceSizes, size, r)
ppi, err := m.sealer.AddPiece(sectorstorage.WithPriority(ctx, DealSectorPriority), m.minerSector(sectorID), m.unsealedInfoMap.infos[sectorID].pieceSizes, size, r)
if err != nil {
return xerrors.Errorf("writing piece: %w", err)
}

Some files were not shown because too many files have changed in this diff Show More