mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
NFSv4.1: do not use deviceids after MDS clientid invalidation
Mark all deviceids established under an expired MDS clientid as invalid. Stop all new i/o through DS and send through the MDS. Don't use any new LAYOUTGETs that use the invalid deviceid. Purge all layouts established under the expired MDS clientid. Remove the MDS clientid deviceid and data servers reference Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
a56aaa02b1
commit
c47abcf8ff
5 changed files with 47 additions and 0 deletions
|
@ -156,6 +156,7 @@ nfs4_init_deviceid_node(struct nfs4_deviceid_node *d,
|
|||
INIT_HLIST_NODE(&d->tmpnode);
|
||||
d->ld = ld;
|
||||
d->nfs_client = nfs_client;
|
||||
d->flags = 0;
|
||||
d->deviceid = *id;
|
||||
atomic_set(&d->ref, 1);
|
||||
}
|
||||
|
@ -253,3 +254,22 @@ nfs4_deviceid_purge_client(const struct nfs_client *clp)
|
|||
for (h = 0; h < NFS4_DEVICE_ID_HASH_SIZE; h++)
|
||||
_deviceid_purge_client(clp, h);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stop use of all deviceids associated with an nfs_client
|
||||
*/
|
||||
void
|
||||
nfs4_deviceid_mark_client_invalid(struct nfs_client *clp)
|
||||
{
|
||||
struct nfs4_deviceid_node *d;
|
||||
struct hlist_node *n;
|
||||
int i;
|
||||
|
||||
rcu_read_lock();
|
||||
for (i = 0; i < NFS4_DEVICE_ID_HASH_SIZE; i ++){
|
||||
hlist_for_each_entry_rcu(d, n, &nfs4_deviceid_cache[i], node)
|
||||
if (d->nfs_client == clp)
|
||||
set_bit(NFS_DEVICEID_INVALID, &d->flags);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue