On Fri, Feb 06, 2015 at 05:40:39PM +0100, Wouter Verhelst wrote: > On Fri, Feb 06, 2015 at 08:16:59AM +0100, Markus Pargmann wrote: > > On Thu, Feb 05, 2015 at 09:23:10AM +0100, Wouter Verhelst wrote: > > > [Cc list trimmed] > > > > > > On Sat, Jan 31, 2015 at 01:38:21PM +0100, Markus Pargmann wrote: > > > > On Fri, Jan 30, 2015 at 06:30:14PM +0100, Wouter Verhelst wrote: > > > > > - When a connection is started by nbd-client, the kernel creates a "pid" > > > > > file in sysfs, which contains the PID of the client and which the > > > > > client (when called with -c, or in other cases) uses to verify whether > > > > > a device is connected. At first glance, your patch does not do this, > > > > > which could cause confusion. > > > > > > > > I am actually not quite happy to expose the pid of the task that is > > > > doing the receive handling through sysfs. As it is already in the code, > > > > we can't simply remove it. But I think this should be managed by > > > > userspace if it is necessary at some point. It seems like the pid is > > > > only used for the connection status? > > > > > > In the nbd-client code, that's true. > > > > > > However, in case of multiple connected devices and a hung connection, knowing > > > which PID corresponds to which device is a useful debugging aid. > > > > I see. Hopefully this is not necessary as soon as the timeout issue is > > fixed. > > Possibly. On the other hand, having a debugging aid (when things are > broken) is never a bad thing, no? No, but then it should be in /sys/kernel/debug to make it clear that this is only a debugging aid and should not be used in production as a simple way to store the pid of a process. > > I don't konw about you, but I'm not ready to guarantee that I'll never > make any mistake ;-) No, of course that's impossible. The pid file will stay for the moment, but maybe some real debug information in debugfs would be better. Best Regards, Markus -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: Digital signature