fix: do fdatasync() only when snap_io_rate_limit bytes written