Re: [PATCH 5/5 UPDATED] CUSE: implement CUSE - Character device in Userspace

From: Miklos Szeredi
Date: Wed Nov 26 2008 - 05:02:32 EST


Hi Tejun,

Apologies for the late review.

On Sat, 22 Nov 2008, Tejun Heo wrote:
> + * cuse_conn : contains fuse_conn and serves as bonding structure
> + * channel : file handle connected to the userland CUSE server
> + * cdev : the implemented character device
> + * mnt : vfsmount which serves dentry and inode for cdev

Hmm, this mount thing seems rather pointless to me. I understand the
motivation: to let the unmodified fuse functions use
get_fuse_conn(inode) and get_node_id(inode). But I think we should
really bite the bullet and reimplement these functions so that they
take fuse_conn and node_id as arguments instead of the inode (and
separate out those parts which do really need the inode for the
memory mappings).

It's a bit more work on the fuse side, but overall it results in a
much cleaner architecture, don't you think?

> + worker = kthread_run(cuse_init_worker, cuse_conn_get(cc),
> + "cuse-init-pid%d", current->pid);

This could be done without a kthread, by setting the ->end() callback
for the INIT request, no?

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/