Re: [PATCH][RFC] nfsd/lockd: have locks_in_grace take a sb arg

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

 



12.04.2012 02:17, J. Bruce Fields пишет:
On Wed, Apr 11, 2012 at 11:24:52PM +0400, Stanislav Kinsbursky wrote:
11.04.2012 22:22, J. Bruce Fields написал:
  What would happen, if we will have situation like below:
  >   	mountd A	mountd B
  >   	pid_ns		pid_ns
  	|		  |
  	mnt_ns		mnt_ns
  	|		  |
  	-----	net_ns ----
  >   Is it possible, BTW?
  It yes, that is such construction valid?
Looks like a mess, no.  I'd expect there to be only one rpc.mountd
running per network namespace.

Then we have to prevent such situations somehow.
Or it is done already?

If there's a way to prevent it, great, otherwise I think we just tell
people not to do that, and make sure any distro scripts (or whatever)
don't do that.


Sure, there is a way.
For example, mountd will need to ask kernel is he allowed to start or not. Kernel will have to compare starting mountd mount namespace with the mount namespace of the previous started mountd process. If they matches or previous mountd process is dead (or even never started), then new start is allowed.
And disallowed otherwise.

Actually, my statement above isn't quite right: we do allow running
multiple rpc.mountd processes in one network namespace (see the
--num-threads option to rpc.mountd, which is sometimes necessary for
performance).  But they should all be in the same namespaces and be
using the same configuration.

--b.


--
Best regards,
Stanislav Kinsbursky
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux