fsync: some optimizations and fixes from faux123 ruby kernel. I don