@@ -114,35 +114,6 @@ struct sbid_tracker {
return 0;
}
-/* XXX: Need to implement the notify types and track which
- * clients have which devices. */
-void pnfs_set_device_notify(clientid_t *clid, unsigned int types)
-{
- struct nfs4_client *clp;
- dprintk("%s: -->\n", __func__);
-
- nfs4_lock_state();
- /* Indicate that client has a device so we can only notify
- * the correct clients */
- clp = find_confirmed_client(clid, true);
- if (clp) {
- atomic_inc(&clp->cl_deviceref);
- dprintk("%s: Incr device count (clnt %p) to %d\n",
- __func__, clp, atomic_read(&clp->cl_deviceref));
- }
- nfs4_unlock_state();
-}
-
-/* Clear notifications for this client
- * XXX: Do we need to loop through a clean up all
- * krefs when nfsd cleans up the client? */
-void pnfs_clear_device_notify(struct nfs4_client *clp)
-{
- atomic_dec(&clp->cl_deviceref);
- dprintk("%s: Decr device count (clnt %p) to %d\n",
- __func__, clp, atomic_read(&clp->cl_deviceref));
-}
-
/*
* Note: must be called under the state lock
*/
@@ -1593,9 +1564,6 @@ struct create_device_notify_list_arg {
struct nfs4_notify_device *cbnd;
struct create_device_notify_list_arg *arg = p;
- if (atomic_read(&clp->cl_deviceref) <= 0)
- return 0;
-
cbnd = kzalloc(sizeof(*cbnd), GFP_KERNEL);
if (!cbnd)
return -ENOMEM;
@@ -1633,7 +1601,6 @@ int nfsd_device_notify_cb(struct super_block *sb,
struct nfsd4_pnfs_cb_dev_list *ndl)
{
struct nfs4_notify_device *cbnd;
- struct nfs4_client *nd_client;
unsigned int notify_num = 0;
int status = 0;
struct list_head todolist;
@@ -1653,9 +1620,7 @@ int nfsd_device_notify_cb(struct super_block *sb,
cbnd = list_entry(todolist.next, struct nfs4_notify_device,
nd_perclnt);
list_del_init(&cbnd->nd_perclnt);
- nd_client = cbnd->nd_client;
nfsd4_cb_notify_device(cbnd);
- pnfs_clear_device_notify(nd_client);
notify_num++;
}
@@ -1143,7 +1143,6 @@ static int fill_in_write_vector(struct kvec *vec, struct nfsd4_write *write)
{
struct super_block *sb;
int status;
- clientid_t clid;
dprintk("%s: layout_type %u dev_id %llx:%llx maxcnt %u\n",
__func__, gdp->gd_layout_type, gdp->gd_devid.sbid,
@@ -1166,10 +1165,6 @@ static int fill_in_write_vector(struct kvec *vec, struct nfsd4_write *write)
/* Set up arguments so device can be retrieved at encode time */
gdp->gd_sb = sb;
-
- /* Update notifications */
- copy_clientid(&clid, cstate->session);
- pnfs_set_device_notify(&clid, gdp->gd_notify_types);
out:
return status;
}
@@ -1324,7 +1324,6 @@ static struct nfs4_client *create_client(struct xdr_netobj name,
#if defined(CONFIG_PNFSD)
INIT_LIST_HEAD(&clp->cl_layouts);
INIT_LIST_HEAD(&clp->cl_layoutrecalls);
- atomic_set(&clp->cl_deviceref, 0);
#endif /* CONFIG_PNFSD */
INIT_LIST_HEAD(&clp->cl_lru);
INIT_LIST_HEAD(&clp->cl_callbacks);
@@ -131,8 +131,6 @@ int nfsd_layout_recall_cb(struct super_block *, struct inode *,
int nfsd_device_notify_cb(struct super_block *,
struct nfsd4_pnfs_cb_dev_list *);
void nfsd4_cb_notify_device(struct nfs4_notify_device *);
-void pnfs_set_device_notify(clientid_t *, unsigned int types);
-void pnfs_clear_device_notify(struct nfs4_client *);
static inline struct nfs4_layout_state *layoutstateid(struct nfs4_stid *s)
{
@@ -285,7 +285,6 @@ struct nfs4_client {
struct list_head cl_layouts; /* outstanding layouts */
struct list_head cl_layoutrecalls; /* outstanding layoutrecall
callbacks */
- atomic_t cl_deviceref; /* Num outstanding devs */
#endif /* CONFIG_PNFSD */
};
@@ -432,7 +432,6 @@ struct nfsd4_pnfs_getdevinfo {
struct nfsd4_pnfs_deviceid gd_devid; /* request */
u32 gd_layout_type; /* request */
u32 gd_maxcount; /* request */
- u32 gd_notify_types;/* request */
struct super_block *gd_sb;
};