rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

Make linux file write life time hinting work

Open yhr opened this issue 2 months ago • 2 comments

The life time hint fcntl takes a 64-bit unsigned int, so make sure to pass a uint64_t when doing the syscall.

See:

https://man7.org/linux/man-pages/man2/fcntl.2.html https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c75b1d9421f80f4143e389d2d50ddfc8a28c8c35

This is one of those "How did this ever work?", as Env::WriteLifeTimeHint hint is definitely not the same as an 64-bit unsigned int. What's surprising is that SetWriteLifeTimeHint does pass a valid hint from time to time.

Thanks, Hans

yhr avatar Apr 29 '24 08:04 yhr

Could you have a quick look over this @ajkr ? Cheers!

yhr avatar Apr 30 '24 08:04 yhr

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 02 '24 19:05 facebook-github-bot