NFSv4: Ensure continued open and lockowner name uniqueness
In order to enable migration support, we will want to move some of the structures that are subject to migration into the struct nfs_server. In particular, if we are to move the state_owner and state_owner_id to being a per-filesystem structure, then we should label the resulting open/lock owners with a per-filesytem label to ensure global uniqueness. This patch does so by adding the super block s_dev to the open/lock owner name. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -3779,6 +3779,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock
|
||||
goto out;
|
||||
lsp = request->fl_u.nfs4_fl.owner;
|
||||
arg.lock_owner.id = lsp->ls_id.id;
|
||||
arg.lock_owner.s_dev = server->s_dev;
|
||||
status = nfs4_call_sync(server, &msg, &arg, &res, 1);
|
||||
switch (status) {
|
||||
case 0:
|
||||
@@ -4024,6 +4025,7 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl,
|
||||
p->arg.lock_stateid = &lsp->ls_stateid;
|
||||
p->arg.lock_owner.clientid = server->nfs_client->cl_clientid;
|
||||
p->arg.lock_owner.id = lsp->ls_id.id;
|
||||
p->arg.lock_owner.s_dev = server->s_dev;
|
||||
p->res.lock_seqid = p->arg.lock_seqid;
|
||||
p->lsp = lsp;
|
||||
p->server = server;
|
||||
@@ -4428,6 +4430,7 @@ void nfs4_release_lockowner(const struct nfs4_lock_state *lsp)
|
||||
return;
|
||||
args->lock_owner.clientid = server->nfs_client->cl_clientid;
|
||||
args->lock_owner.id = lsp->ls_id.id;
|
||||
args->lock_owner.s_dev = server->s_dev;
|
||||
msg.rpc_argp = args;
|
||||
rpc_call_async(server->client, &msg, 0, &nfs4_release_lockowner_ops, args);
|
||||
}
|
||||
|
Reference in New Issue
Block a user