Lockd: pernet usage counter introduced

Lockd is going to be shared between network namespaces - i.e. going to be able
to handle lock requests from different network namespaces. This means, that
network namespace related resources have to be allocated not once (like now),
but for every network namespace context, from which service is requested to
operate.
This patch implements Lockd per-net users accounting. New per-net counter is
used to determine, when per-net resources have to be freed.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Stanislav Kinsbursky
2012-01-31 15:07:57 +04:00
committed by Trond Myklebust
parent c228fa2038
commit a9c5d73a8d
2 changed files with 55 additions and 4 deletions

12
fs/lockd/netns.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef __LOCKD_NETNS_H__
#define __LOCKD_NETNS_H__
#include <net/netns/generic.h>
struct lockd_net {
unsigned int nlmsvc_users;
};
extern int lockd_net_id;
#endif