Merge pull request #934 from filecoin-project/feat/sb-diskmgr
sectorbuilder: Check free space before creating sectors
This commit is contained in:
@@ -3,7 +3,6 @@ package modules
|
||||
import (
|
||||
"context"
|
||||
"math"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
|
||||
"github.com/ipfs/go-bitswap"
|
||||
@@ -73,11 +72,6 @@ func SectorBuilderConfig(storagePath string, threads uint, noprecommit, nocommit
|
||||
return nil, xerrors.Errorf("too many sectorbuilder threads specified: %d, max allowed: %d", threads, math.MaxUint8)
|
||||
}
|
||||
|
||||
cache := filepath.Join(sp, "cache")
|
||||
unsealed := filepath.Join(sp, "unsealed")
|
||||
sealed := filepath.Join(sp, "sealed")
|
||||
staging := filepath.Join(sp, "staging")
|
||||
|
||||
sb := §orbuilder.Config{
|
||||
Miner: minerAddr,
|
||||
SectorSize: ssize,
|
||||
@@ -86,10 +80,7 @@ func SectorBuilderConfig(storagePath string, threads uint, noprecommit, nocommit
|
||||
NoPreCommit: noprecommit,
|
||||
NoCommit: nocommit,
|
||||
|
||||
CacheDir: cache,
|
||||
UnsealedDir: unsealed,
|
||||
SealedDir: sealed,
|
||||
StagedDir: staging,
|
||||
Dir: sp,
|
||||
}
|
||||
|
||||
return sb, nil
|
||||
|
||||
+1
-4
@@ -229,10 +229,7 @@ func builder(t *testing.T, nFull int, storage []int) ([]test.TestNode, []test.Te
|
||||
SectorSize: 1024,
|
||||
WorkerThreads: 2,
|
||||
Miner: genMiner,
|
||||
CacheDir: filepath.Join(psd, "cache"),
|
||||
StagedDir: filepath.Join(psd, "staging"),
|
||||
SealedDir: filepath.Join(psd, "sealed"),
|
||||
UnsealedDir: filepath.Join(psd, "unsealed"),
|
||||
Dir: psd,
|
||||
}, mds)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user