rem: err = sftp_request(SSH_FXP_WRITE, &buf, SSH_FXP_STATUS, NULL);
add: if (!sync_write && !sf->write_error) err = sftp_request_async(SSH_FXP_WRITE, &buf, sshfs_write_begin, sshfs_write_end, sf); else err = sftp_request(SSH_FXP_WRITE, &buf, SSH_FXP_STATUS, NULL);
context: static int sshfs_write(const char *path, const char *wbuf, size_t size,                       off_t offset, struct fuse_file_info *fi){    int err;    struct buffer buf;    struct buffer data;    struct sshfs_file *sf = (struct sshfs_file *) fi->fh;    struct buffer *handle = &sf->handle;    (void) path;    data.p = (uint8_t *) wbuf;    data.len = size;    buf_init(&buf, 0);    buf_add_buf(&buf, handle);    buf_add_uint64(&buf, offset);    buf_add_data(&buf, &data);    err = sftp_request(SSH_FXP_WRITE, &buf, SSH_FXP_STATUS, NULL);    buf_free(&buf);    return err ? err : (int) size;}