fstream: do not ignore dma_write return value
fstream: do not ignore dma_write return value

The consequence of silently ignoring it is that we're potentially creating
corrupted files when dma_write() cannot fulfill the request and the file
system doesn't consider it to be an error. So an area of the file may be
left unwritten and thus will contain block of zeros.

Look at what pwrite man page says about return value which should also apply
to DIO/AIO:
"Note that is not an error for a successful call to transfer fewer bytes than
requested"
That will happen not only for HW glitches, but also to cases like device
running out of disk space.

Avi says: "A short write is not an error by itself, so we should continue
the write. This would either succeed or return the true error (usually ENOSPC)."

Fixes #360.

Signed-off-by: Raphael S. Carvalho <1e2942cea40e3b4d2162dfcd9e53e41c05a84d22@scylladb.com>
Message-Id: <20171121172504.2095-1-1e2942cea40e3b4d2162dfcd9e53e41c05a84d22@scylladb.com>

dreamsxin/seastar,scylladb/seastar,dreamsxin/seastar,cloudius-systems/seastar,cloudius-systems/seastar,syuu1228/seastar,syuu1228/seastar,avikivity/seastar,scylladb/seastar,syuu1228/seastar,cloudius-systems/seastar,scylladb/seastar,avikivity/seastar,dreamsxin/seastar,avikivity/seastar