Lines Matching full: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()
363 cinfo->ds->ncommitting--; in pnfs_bucket_get_committing()
465 struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds; in pnfs_generic_commit_pagelist()
518 print_ds(struct nfs4_pnfs_ds *ds) in print_ds() argument
520 if (ds == NULL) { in print_ds()
524 printk(KERN_WARNING " ds %s\n" in print_ds()
528 ds->ds_remotestr, in print_ds()
529 refcount_read(&ds->ds_count), ds->ds_clp, in print_ds()
530 ds->ds_clp ? ds->ds_clp->cl_exchange_flags : 0); in print_ds()
604 * Lookup DS by addresses. nfs4_ds_cache_lock is held
609 struct nfs4_pnfs_ds *ds; in _data_server_lookup_locked() local
611 list_for_each_entry(ds, &nfs4_data_server_cache, ds_node) in _data_server_lookup_locked()
612 if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs)) in _data_server_lookup_locked()
613 return ds; in _data_server_lookup_locked()
632 static void destroy_ds(struct nfs4_pnfs_ds *ds) in destroy_ds() argument
638 print_ds(ds); in destroy_ds()
640 nfs_put_client(ds->ds_clp); in destroy_ds()
642 while (!list_empty(&ds->ds_addrs)) { in destroy_ds()
643 da = list_first_entry(&ds->ds_addrs, in destroy_ds()
650 kfree(ds->ds_remotestr); in destroy_ds()
651 kfree(ds); in destroy_ds()
654 void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds) in nfs4_pnfs_ds_put() argument
656 if (refcount_dec_and_lock(&ds->ds_count, in nfs4_pnfs_ds_put()
658 list_del_init(&ds->ds_node); in nfs4_pnfs_ds_put()
660 destroy_ds(ds); in nfs4_pnfs_ds_put()
715 * Given a list of multipath struct nfs4_pnfs_ds_addr, add it to ds cache if
721 struct nfs4_pnfs_ds *tmp_ds, *ds = NULL; in nfs4_pnfs_ds_add() local
729 ds = kzalloc(sizeof(*ds), gfp_flags); in nfs4_pnfs_ds_add()
730 if (!ds) in nfs4_pnfs_ds_add()
739 INIT_LIST_HEAD(&ds->ds_addrs); in nfs4_pnfs_ds_add()
740 list_splice_init(dsaddrs, &ds->ds_addrs); in nfs4_pnfs_ds_add()
741 ds->ds_remotestr = remotestr; in nfs4_pnfs_ds_add()
742 refcount_set(&ds->ds_count, 1); in nfs4_pnfs_ds_add()
743 INIT_LIST_HEAD(&ds->ds_node); in nfs4_pnfs_ds_add()
744 ds->ds_clp = NULL; in nfs4_pnfs_ds_add()
745 list_add(&ds->ds_node, &nfs4_data_server_cache); in nfs4_pnfs_ds_add()
747 ds->ds_remotestr); in nfs4_pnfs_ds_add()
750 kfree(ds); in nfs4_pnfs_ds_add()
755 ds = tmp_ds; in nfs4_pnfs_ds_add()
759 return ds; in nfs4_pnfs_ds_add()
763 static int nfs4_wait_ds_connect(struct nfs4_pnfs_ds *ds) in nfs4_wait_ds_connect() argument
766 return wait_on_bit(&ds->ds_state, NFS4DS_CONNECTING, TASK_KILLABLE); in nfs4_wait_ds_connect()
769 static void nfs4_clear_ds_conn_bit(struct nfs4_pnfs_ds *ds) in nfs4_clear_ds_conn_bit() argument
772 clear_and_wake_up_bit(NFS4DS_CONNECTING, &ds->ds_state); in nfs4_clear_ds_conn_bit()
802 struct nfs4_pnfs_ds *ds, in _nfs4_pnfs_v3_ds_connect() argument
811 dprintk("--> %s DS %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v3_ds_connect()
816 list_for_each_entry(da, &ds->ds_addrs, da_node) { in _nfs4_pnfs_v3_ds_connect()
817 dprintk("%s: DS %s: trying address %s\n", in _nfs4_pnfs_v3_ds_connect()
818 __func__, ds->ds_remotestr, da->da_remotestr); in _nfs4_pnfs_v3_ds_connect()
856 WRITE_ONCE(ds->ds_clp, clp); in _nfs4_pnfs_v3_ds_connect()
857 dprintk("%s [new] addr: %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v3_ds_connect()
863 struct nfs4_pnfs_ds *ds, in _nfs4_pnfs_v4_ds_connect() argument
872 dprintk("--> %s DS %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v4_ds_connect()
874 list_for_each_entry(da, &ds->ds_addrs, da_node) { in _nfs4_pnfs_v4_ds_connect()
877 dprintk("%s: DS %s: trying address %s\n", in _nfs4_pnfs_v4_ds_connect()
878 __func__, ds->ds_remotestr, da->da_remotestr); in _nfs4_pnfs_v4_ds_connect()
976 WRITE_ONCE(ds->ds_clp, clp); in _nfs4_pnfs_v4_ds_connect()
977 dprintk("%s [new] addr: %s\n", __func__, ds->ds_remotestr); in _nfs4_pnfs_v4_ds_connect()
987 int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds, in nfs4_pnfs_ds_connect() argument
994 err = nfs4_wait_ds_connect(ds); in nfs4_pnfs_ds_connect()
995 if (err || ds->ds_clp) in nfs4_pnfs_ds_connect()
999 } while (test_and_set_bit(NFS4DS_CONNECTING, &ds->ds_state) != 0); in nfs4_pnfs_ds_connect()
1001 if (ds->ds_clp) in nfs4_pnfs_ds_connect()
1006 err = _nfs4_pnfs_v3_ds_connect(mds_srv, ds, timeo, retrans); in nfs4_pnfs_ds_connect()
1009 err = _nfs4_pnfs_v4_ds_connect(mds_srv, ds, timeo, retrans, in nfs4_pnfs_ds_connect()
1013 dprintk("%s: unsupported DS version %d\n", __func__, version); in nfs4_pnfs_ds_connect()
1018 nfs4_clear_ds_conn_bit(ds); in nfs4_pnfs_ds_connect()
1021 * At this point the ds->ds_clp should be ready, but it might have in nfs4_pnfs_ds_connect()
1025 if (!ds->ds_clp || !nfs_client_init_is_complete(ds->ds_clp)) { in nfs4_pnfs_ds_connect()
1026 WARN_ON_ONCE(ds->ds_clp || in nfs4_pnfs_ds_connect()
1030 err = nfs_client_init_status(ds->ds_clp); in nfs4_pnfs_ds_connect()
1136 dprintk("%s: Parsed DS addr %s\n", __func__, da->da_remotestr); in nfs4_decode_mp_ds_addr()
1143 dprintk("%s: Error parsing DS addr: %s\n", __func__, buf); in nfs4_decode_mp_ds_addr()
1163 array = pnfs_lookup_commit_array(cinfo->ds, lseg); in pnfs_layout_mark_request_commit()
1177 cinfo->ds->nwritten++; in pnfs_layout_mark_request_commit()