eden: no O_PATH on macos, adjust Overlay code

Summary:
Thankfully, we can simply remove it; it is really just a performance
optimization that we can enable for linux.

Reviewed By: simpkins

Differential Revision: D13475719

fbshipit-source-id: 09b60dcf995c2c5390b91aa316c62ca1b4d3f944
This commit is contained in:
Wez Furlong 2018-12-15 19:08:58 -08:00 committed by Facebook Github Bot
parent 9fca886c54
commit 5b08e0c73b

View File

@ -144,8 +144,13 @@ void Overlay::initOverlay() {
}
// Open a handle on the overlay directory itself
int dirFd =
open(localDir_.c_str(), O_RDONLY | O_PATH | O_DIRECTORY | O_CLOEXEC);
int dirFd = open(
localDir_.c_str(),
O_RDONLY |
#ifdef O_PATH
O_PATH |
#endif
O_DIRECTORY | O_CLOEXEC);
folly::checkUnixError(
dirFd, "error opening overlay directory handle for ", localDir_.value());
dirFile_ = File{dirFd, /* ownsFd */ true};