Fixes hang on truncated direct writes.

Writes should stop when the filesystem refuses to accept additional
data, rather than looping infinitely.  This is consistent with
reads and with the Linux fuse behavior.

In this particular case, the looping was actually within uiomove(),
due to the inconsistent update of the uio, though other iov
configurations might have misbehaved differently.
Fixes hang on truncated non-direct writes.

Writes should stop when the filesystem refuses to accept additional
data, rather than looping infinitely.

At present, the buffered write code doesn't understand the concept
of fixed-length files, and now reports an I/O error when the
filesystem doesn't accept all the data (instead of reporting the
short count).  The Linux fuse code appears (by inspection, not
experiment) to misbehave the same way.