stewartsmith / libeatmydata

libeatmydata - because fsync() should be a no-op
https://www.flamingspork.com/projects/libeatmydata/
GNU General Public License v3.0
409 stars 21 forks source link

Add support for macOS fcntl(F_NOCACHE, 1) #8

Open laurynas-biveinis opened 7 years ago

laurynas-biveinis commented 7 years ago

A macOS counterpart of O_DIRECT. This should be helpful for e.g. TokuDB and RocksDB testsuites.

stewartsmith commented 7 years ago

Implemented in 1e5ae05

laurynas-biveinis commented 7 years ago

It's something separate from F_FULLSYNC patch and thus it's not implemented there - please reopen?

stewartsmith commented 7 years ago

Helps if I read the issue I close. Whoops :-)

stewartsmith commented 2 years ago

So, I finally have a Mac to actually go and poke at these kind of things on (okay, I could have gone and spawned an EC2 instance... but laziness prevailed!).

One of the challenges with masking out O_DIRECT is that there are semantic changes that you lose without a whole bunch of extra checks.

Is there anything that F_NOCACHE would do? I can't see anything in the man page...