2009-09-23 12:47:34

by Trond Myklebust

[permalink] [raw]
Subject: Re: a question abount idmapd‏

On Wed, 2009-09-23 at 18:44 +0800, hongpo gao wrote:
>
> hello,
>
> I have a question about idmap. Should I send the mail to
> [email protected]?

The linux-nfs mailing list is preferred over [email protected], if
that's what you mean.

> The question is as follows:
>
> In Linux Kernel fs/nfs/idmap.c,
> The process will call rpc_queue_upcall in the nfs_idmap_id function,
> then it will wait on the waitqueue util the userspace write msg into
> the idmap rpc_pipe.
>
> In userspace idmapd.c file,
> the nfscb will read the rpc_pipe by aiomicio(read, ...), write the
> rpc_pipe by atomicio(write,...) in the end.
> my question is : if the rpc.idmapd deamon is killed in the duration
> time that between atomicio(read,.. ) and atomic(write,...), will the
> kernel thread will always sleep on the wait_queue? That is to say,
> will the rpc_queue_upcall be never return ?

No. The kernel tracks whether or not a daemon is listening on the other
end of the rpc_pipe, and will therefore return an error should the above
scenario happen.

Cheers
Trond