[Date Prev][Date Next]
Re: (ITS#7682) LMDB: [PATCH] mdb_env_copy should retry open() if O_DIRECT fails
> Also on RHEL 6.4 (2.6.32-358.18.1.el6.x86_64) with
> /dev/shm/nosuch. I'll report it to RedHat and see what they say.
Simpler fix, at least on Linux:
if ((rc = fcntl(fd, F_GETFL)) != -1)
(void) fcntl(fd, F_SETFL, rc | O_DIRECT);
But that could fail elsewhere, if some OS only accepts
O_DIRECT to open() and not to fcntl().
BTW, does the nearby Apple code need to fail if
fcntl(newfd, F_NOCACHE, 1) fails? Could ignore errors.