buffer: return offset for end of last write