[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] nbd-client: small proposal for imporment



On Fri, Oct 14, 2005 at 11:28:01AM +0200, Fulup Ar Foll wrote:
> proposal for improvement:
> ----------------------------------------
> In order my nbd-submount process to be able to kill the nbd-client you need to 
> know the PID of the process and unfortunately nbd-client does not write any 
> PID file. I see two options to slove this problem:
> 
> 1: nbd-client to apply the same mechanism as nbd-server and write a PID file 
> in "/var/run/nbd-client.MY-SOCK-NUM.pid"

No. nbd-client has a '-d' option, which is the proper way to disconnect
a client; see the man page for details. Killing it will probably not
work, and if it does might be dangerous, because once the client runs
the ioctl() which hands the network socket to the kernel and starts the
block device, it remains in kernel mode until the kernel disconnects the
block device somehow.

-- 
The amount of time between slipping on the peel and landing on the
pavement is precisely one bananosecond



Reply to: