Lines Matching refs:ds

85 	cinfo->ds->nwritten--;  in pnfs_generic_clear_request_commit()
252 cinfo->ds->nwritten -= ret; in pnfs_bucket_scan_ds_commit_list()
253 cinfo->ds->ncommitting += ret; in pnfs_bucket_scan_ds_commit_list()
279 struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds; in pnfs_generic_scan_commit_lists()
332 struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds; in pnfs_generic_recover_commit_reqs()
387 struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds; in pnfs_generic_search_commit_reqs()
410 cinfo->ds->ncommitting--; in pnfs_bucket_get_committing()
512 struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds; in pnfs_generic_commit_pagelist()
565 print_ds(struct nfs4_pnfs_ds *ds) in print_ds() argument
567 if (ds == NULL) { in print_ds()
575 ds->ds_remotestr, in print_ds()
576 refcount_read(&ds->ds_count), ds->ds_clp, in print_ds()
577 ds->ds_clp ? ds->ds_clp->cl_exchange_flags : 0); in print_ds()
656 struct nfs4_pnfs_ds *ds; in _data_server_lookup_locked() local
658 list_for_each_entry(ds, &nfs4_data_server_cache, ds_node) in _data_server_lookup_locked()
659 if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs)) in _data_server_lookup_locked()
660 return ds; in _data_server_lookup_locked()
679 static void destroy_ds(struct nfs4_pnfs_ds *ds) in destroy_ds() argument
685 print_ds(ds); in destroy_ds()
687 nfs_put_client(ds->ds_clp); in destroy_ds()
689 while (!list_empty(&ds->ds_addrs)) { in destroy_ds()
690 da = list_first_entry(&ds->ds_addrs, in destroy_ds()
697 kfree(ds->ds_remotestr); in destroy_ds()
698 kfree(ds); in destroy_ds()
701 void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds) in nfs4_pnfs_ds_put() argument
703 if (refcount_dec_and_lock(&ds->ds_count, in nfs4_pnfs_ds_put()
705 list_del_init(&ds->ds_node); in nfs4_pnfs_ds_put()
707 destroy_ds(ds); in nfs4_pnfs_ds_put()
768 struct nfs4_pnfs_ds *tmp_ds, *ds = NULL; in nfs4_pnfs_ds_add() local
776 ds = kzalloc(sizeof(*ds), gfp_flags); in nfs4_pnfs_ds_add()
777 if (!ds) in nfs4_pnfs_ds_add()
786 INIT_LIST_HEAD(&ds->ds_addrs); in nfs4_pnfs_ds_add()
787 list_splice_init(dsaddrs, &ds->ds_addrs); in nfs4_pnfs_ds_add()
788 ds->ds_remotestr = remotestr; in nfs4_pnfs_ds_add()
789 refcount_set(&ds->ds_count, 1); in nfs4_pnfs_ds_add()
790 INIT_LIST_HEAD(&ds->ds_node); in nfs4_pnfs_ds_add()
791 ds->ds_clp = NULL; in nfs4_pnfs_ds_add()
792 list_add(&ds->ds_node, &nfs4_data_server_cache); in nfs4_pnfs_ds_add()
794 ds->ds_remotestr); in nfs4_pnfs_ds_add()
797 kfree(ds); in nfs4_pnfs_ds_add()
802 ds = tmp_ds; in nfs4_pnfs_ds_add()
806 return ds; in nfs4_pnfs_ds_add()
810 static int nfs4_wait_ds_connect(struct nfs4_pnfs_ds *ds) in nfs4_wait_ds_connect() argument
813 return wait_on_bit(&ds->ds_state, NFS4DS_CONNECTING, TASK_KILLABLE); in nfs4_wait_ds_connect()
816 static void nfs4_clear_ds_conn_bit(struct nfs4_pnfs_ds *ds) in nfs4_clear_ds_conn_bit() argument
819 clear_and_wake_up_bit(NFS4DS_CONNECTING, &ds->ds_state); in nfs4_clear_ds_conn_bit()
849 struct nfs4_pnfs_ds *ds, in _nfs4_pnfs_v3_ds_connect() argument
857 dprintk("--> %s DS %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v3_ds_connect()
862 list_for_each_entry(da, &ds->ds_addrs, da_node) { in _nfs4_pnfs_v3_ds_connect()
864 __func__, ds->ds_remotestr, da->da_remotestr); in _nfs4_pnfs_v3_ds_connect()
900 WRITE_ONCE(ds->ds_clp, clp); in _nfs4_pnfs_v3_ds_connect()
901 dprintk("%s [new] addr: %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v3_ds_connect()
907 struct nfs4_pnfs_ds *ds, in _nfs4_pnfs_v4_ds_connect() argument
916 dprintk("--> %s DS %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v4_ds_connect()
918 list_for_each_entry(da, &ds->ds_addrs, da_node) { in _nfs4_pnfs_v4_ds_connect()
920 __func__, ds->ds_remotestr, da->da_remotestr); in _nfs4_pnfs_v4_ds_connect()
978 WRITE_ONCE(ds->ds_clp, clp); in _nfs4_pnfs_v4_ds_connect()
979 dprintk("%s [new] addr: %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v4_ds_connect()
989 int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds, in nfs4_pnfs_ds_connect() argument
996 err = nfs4_wait_ds_connect(ds); in nfs4_pnfs_ds_connect()
997 if (err || ds->ds_clp) in nfs4_pnfs_ds_connect()
1001 } while (test_and_set_bit(NFS4DS_CONNECTING, &ds->ds_state) != 0); in nfs4_pnfs_ds_connect()
1003 if (ds->ds_clp) in nfs4_pnfs_ds_connect()
1008 err = _nfs4_pnfs_v3_ds_connect(mds_srv, ds, timeo, retrans); in nfs4_pnfs_ds_connect()
1011 err = _nfs4_pnfs_v4_ds_connect(mds_srv, ds, timeo, retrans, in nfs4_pnfs_ds_connect()
1020 nfs4_clear_ds_conn_bit(ds); in nfs4_pnfs_ds_connect()
1027 if (!ds->ds_clp || !nfs_client_init_is_complete(ds->ds_clp)) { in nfs4_pnfs_ds_connect()
1028 WARN_ON_ONCE(ds->ds_clp || in nfs4_pnfs_ds_connect()
1032 err = nfs_client_init_status(ds->ds_clp); in nfs4_pnfs_ds_connect()
1165 array = pnfs_lookup_commit_array(cinfo->ds, lseg); in pnfs_layout_mark_request_commit()
1179 cinfo->ds->nwritten++; in pnfs_layout_mark_request_commit()