Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Madvise optional #82

Merged
merged 1 commit into from
Feb 23, 2018
Merged

Madvise optional #82

merged 1 commit into from
Feb 23, 2018

Conversation

honteng
Copy link

@honteng honteng commented Feb 22, 2018

OpenWRT Linux kernel doesn't support madvise syscall. It always returns "function not implemented" error, but it still works fine. This should be optional check.

@codecov-io
Copy link

codecov-io commented Feb 22, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@b44cfbd). Click here to learn what that means.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #82   +/-   ##
=========================================
  Coverage          ?   85.58%           
=========================================
  Files             ?        9           
  Lines             ?     1859           
  Branches          ?        0           
=========================================
  Hits              ?     1591           
  Misses            ?      158           
  Partials          ?      110
Impacted Files Coverage Δ
bolt_unix.go 71.11% <50%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b44cfbd...eda393d. Read the comment docs.

bolt_unix.go Outdated
@@ -56,7 +56,10 @@ func mmap(db *DB, sz int) error {
}

// Advise the kernel that the mmap is accessed randomly.
if err := madvise(b, syscall.MADV_RANDOM); err != nil {
err = madvise(b, syscall.MADV_RANDOM)
if err == syscall.ENOSYS {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if err!=nil && err!=syscall.ENOSYS

@xiang90
Copy link
Contributor

xiang90 commented Feb 22, 2018

lgtm. can you squash the commits into one?

@honteng
Copy link
Author

honteng commented Feb 23, 2018

done

origin/master is merged so that's why other files looks changed.

@gyuho
Copy link
Contributor

gyuho commented Feb 23, 2018

@honteng Can you revert the merge commit? Just your patch should work.

@honteng
Copy link
Author

honteng commented Feb 23, 2018

ok, I removed. Please merge.

@xiang90 xiang90 merged commit 4f5275f into etcd-io:master Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants