add: list_init(&sf->write_req_list); pthread_cond_init(&sf->write_req_finished, NULL);
context: static int sshfs_open(const char *path, struct fuse_file_info *fi){    int err;    struct buffer buf;    struct sshfs_file *sf;    uint32_t pflags = 0;    if ((fi->flags & O_ACCMODE) == O_RDONLY)        pflags = SSH_FXF_READ;    else if((fi->flags & O_ACCMODE) == O_WRONLY)        pflags = SSH_FXF_WRITE;    else if ((fi->flags & O_ACCMODE) == O_RDWR)        pflags = SSH_FXF_READ | SSH_FXF_WRITE;    else        return -EINVAL;    sf = g_new0(struct sshfs_file, 1);    buf_init(&buf, 0);    buf_add_path(&buf, path);    buf_add_uint32(&buf, pflags);    buf_add_uint32(&buf, 0);    err = sftp_request(SSH_FXP_OPEN, &buf, SSH_FXP_HANDLE, &sf->handle);    if (!err) {        buf_finish(&sf->handle);        fi->fh = (unsigned long) sf;    } else        g_free(sf);    buf_free(&buf);    return err;}