Messages in this thread | | | Subject | Re: RPC vs Socket | From | Trond Myklebust <> | Date | 21 Jun 2001 15:37:01 +0200 |
| |
>>>>> " " == Blesson Paul <blessonpaul@usa.net> writes:
> hi all > I am in the way of building a new remote > file system. > Presently I decided to use sockets for remote > communication. Lately I understood that RPC is used in coda and > nfs file systems(is it so). I want to know the fessibility in > using RPC in the new file system.
Should be no problem. The RPC layer is not tied to any particular filesystem.
On the client, you need to set up struct rpc_procinfo with the necessary RPC XDR routines, which you then declare to the RPC layer using a struct rpc_program and a call to rpc_create_client(). See for instance linux/fs/lockd/mon.c, or linux/fs/nfs/mount_clnt.c...
For the server, things are likely to be a bit more complex in that you need to declare the routines using structs svc_program, svc_version and rpc_procinfo (again) and then set up a daemon process. Examples of use include linux/fs/lockd/svc.c and linux/fs/nfsd/nfssvc.c...
Cheers, Trond - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |