add support for fsync

Change-Id: Ie2c243cbc98dff0c28ea8f50572525af49eaf64f