Add support for O_ATOMIC

O_ATOMIC makes writes atomic, meaning that they are fully stable
on media (in the event of a power cut) when acknowledged by the
device and OS.

This only truly works on Linux with the pending patches to
add O_ATOMIC.

Updated by Jens to:

- Add man page and HOWTO description of the option
- Make O_ATOMIC imply O_DIRECT, so that it actually works if you
  don't set O_DIRECT manually.
- Add the option to the conversion list so it works for
  client/server.
- Error handling so that if atomic=1 is set and the OS does not
  support it, error out instead of just pretending it works.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/memory.c b/memory.c
index e06cab2..b208320 100644
--- a/memory.c
+++ b/memory.c
@@ -209,7 +209,7 @@
 
 	total_mem = td->orig_buffer_size;
 
-	if (td->o.odirect || td->o.mem_align ||
+	if (td->o.odirect || td->o.mem_align || td->o.oatomic ||
 	    (td->io_ops->flags & FIO_MEMALIGN)) {
 		total_mem += page_mask;
 		if (td->o.mem_align && td->o.mem_align > page_size)
@@ -240,7 +240,7 @@
 	unsigned int total_mem;
 
 	total_mem = td->orig_buffer_size;
-	if (td->o.odirect)
+	if (td->o.odirect || td->o.oatomic)
 		total_mem += page_mask;
 
 	if (td->o.mem_type == MEM_MALLOC)