News for hackers. Stuff that matters.
Re:Show HN: A proof-of-concept FoundationDB based network bl... by kentonv on Sunday April 29, 2018 @01:27PM (#16952934)
NBD provides a virtual block device, so all the normal filesystem caching the kernel does above a hard drive applies to NBD as well. This is good: this is what makes it so fast.

Just because `write()` returned successfully does not mean that the data has been written to disk (whether you're using NBD or otherwise). The application needs to call `fsync()` to force writes to disk and get confirmation of success. An `fsync()` will send all pending NBD_CMD_WRITEs followed by NBD_CMD_FLUSH and will only return success when all of these have completed successfully.

There are no comments on this comment yet.