Merge pull request #9212 from filecoin-project/feat/shed-vlog-maxsz

feat: shed: add a --max-size flag to vlog2car
This commit is contained in:
Geoff Stuart 2022-08-25 10:25:37 -04:00 committed by GitHub
commit aa27fb496f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,12 +34,17 @@ var datastoreVlog2CarCmd = &cli.Command{
Usage: "datastore prefix",
Value: "/blocks/",
},
&cli.Uint64Flag{
Name: "max-size",
Value: 32000,
Usage: "max single car size in MiB",
},
},
ArgsUsage: "[vlog...]",
Action: func(cctx *cli.Context) error {
ctx := cctx.Context
maxSz := uint64(31 << 30)
maxSz := cctx.Uint64("max-size") << 20
carb := &rawCarb{
max: maxSz,