svn merge -c 1406382 from trunk for HDFS-3979. For hsync, datanode should wait for the local sync to complete before sending ack.