-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'cdd5285f16af665e5fd5d3592f53b2134281e76a' into HEAD
* commit 'cdd5285f16af665e5fd5d3592f53b2134281e76a': add cmd: clean up default logic of --progress option add cmd: use .Default(true) for pin option. Revert "Merge pull request ipfs#2657 from ipfs/feature/add-defaults-to-add" bitswap: add wantlist fullness to protobuf messages Enable parallel builds on CircleCI Fix PHONY name in Makefile Run coveralls if COVERALLS_TOKEN is set Switch unixfs.Metadata.MimeType to optional Fix bad formatting introduced by e855047 blockstore.AllKeyChan: fix/cleanup error handling blockstore.AllKeyChan: avoid channels by using the new NextSync method ulimit: handle freebsd ulimit code separately from the rest of the unixes Add test for flags. bitswap: increase wantlist resend delay to one minute ds-help: avoid unnecessary allocs when posssible and make use of RawKey fix formatting on error call "block rm": make channel large enough to avoid blocking # Conflicts: # Makefile # core/commands/add.go
- Loading branch information
Showing
23 changed files
with
178 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*.swp | ||
.ipfsconfig | ||
*.out | ||
*.coverprofile | ||
*.test | ||
*.orig | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
"strconv" | ||
) | ||
|
||
var ipfsFileDescNum = uint64(1024) | ||
|
||
func init() { | ||
if val := os.Getenv("IPFS_FD_MAX"); val != "" { | ||
n, err := strconv.Atoi(val) | ||
if err != nil { | ||
log.Errorf("bad value for IPFS_FD_MAX: %s", err) | ||
} else { | ||
ipfsFileDescNum = uint64(n) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// +build freebsd | ||
|
||
package main | ||
|
||
import ( | ||
"fmt" | ||
"syscall" | ||
) | ||
|
||
func init() { | ||
fileDescriptorCheck = checkAndSetUlimit | ||
} | ||
|
||
func checkAndSetUlimit() error { | ||
var rLimit syscall.Rlimit | ||
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit) | ||
if err != nil { | ||
return fmt.Errorf("error getting rlimit: %s", err) | ||
} | ||
|
||
ipfsFileDescNum := int64(ipfsFileDescNum) | ||
|
||
var setting bool | ||
if rLimit.Cur < ipfsFileDescNum { | ||
if rLimit.Max < ipfsFileDescNum { | ||
log.Error("adjusting max") | ||
rLimit.Max = ipfsFileDescNum | ||
} | ||
fmt.Printf("Adjusting current ulimit to %d...\n", ipfsFileDescNum) | ||
rLimit.Cur = ipfsFileDescNum | ||
setting = true | ||
} | ||
|
||
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit) | ||
if err != nil { | ||
return fmt.Errorf("error setting ulimit: %s", err) | ||
} | ||
|
||
if setting { | ||
fmt.Printf("Successfully raised file descriptor limit to %d.\n", ipfsFileDescNum) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.