Lines Matching full:server
78 static void nfs_mark_return_delegation(struct nfs_server *server, in nfs_mark_return_delegation() argument
82 set_bit(NFS4CLNT_DELEGRETURN, &server->nfs_client->cl_state); in nfs_mark_return_delegation()
371 struct nfs_server *server) in nfs_detach_delegation() argument
373 struct nfs_client *clp = server->nfs_client; in nfs_detach_delegation()
385 struct nfs_server *server = NFS_SERVER(inode); in nfs_inode_detach_delegation() local
391 delegation = nfs_detach_delegation(nfsi, delegation, server); in nfs_inode_detach_delegation()
442 struct nfs_server *server = NFS_SERVER(inode); in nfs_inode_set_delegation() local
443 struct nfs_client *clp = server->nfs_client; in nfs_inode_set_delegation()
489 dfprintk(FILE, "%s: server %s handed out " in nfs_inode_set_delegation()
522 list_add_tail_rcu(&delegation->super_list, &server->delegations); in nfs_inode_set_delegation()
546 * Basic procedure for returning a delegation to the server
612 static int nfs_server_return_marked_delegations(struct nfs_server *server, in nfs_server_return_marked_delegations() argument
626 * list delegation in the server from the delegations in nfs_server_return_marked_delegations()
638 delegation = list_entry_rcu(server->delegations.next, in nfs_server_return_marked_delegations()
640 list_for_each_entry_from_rcu(delegation, &server->delegations, super_list) { in nfs_server_return_marked_delegations()
673 set_bit(NFS4CLNT_DELEGRETURN, &server->nfs_client->cl_state); in nfs_server_return_marked_delegations()
682 static bool nfs_server_clear_delayed_delegations(struct nfs_server *server) in nfs_server_clear_delayed_delegations() argument
687 list_for_each_entry_rcu (d, &server->delegations, super_list) { in nfs_server_clear_delayed_delegations()
690 nfs_mark_return_delegation(server, d); in nfs_server_clear_delayed_delegations()
699 struct nfs_server *server; in nfs_client_clear_delayed_delegations() local
705 list_for_each_entry_rcu (server, &clp->cl_superblocks, client_link) { in nfs_client_clear_delayed_delegations()
706 if (nfs_server_clear_delayed_delegations(server)) in nfs_client_clear_delayed_delegations()
844 static void nfs_mark_return_if_closed_delegation(struct nfs_server *server, in nfs_mark_return_if_closed_delegation() argument
848 set_bit(NFS4CLNT_DELEGRETURN, &server->nfs_client->cl_state); in nfs_mark_return_if_closed_delegation()
851 static bool nfs_server_mark_return_all_delegations(struct nfs_server *server) in nfs_server_mark_return_all_delegations() argument
856 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { in nfs_server_mark_return_all_delegations()
857 nfs_mark_return_delegation(server, delegation); in nfs_server_mark_return_all_delegations()
865 struct nfs_server *server; in nfs_client_mark_return_all_delegations() local
868 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) in nfs_client_mark_return_all_delegations()
869 nfs_server_mark_return_all_delegations(server); in nfs_client_mark_return_all_delegations()
892 * @server: pointer to nfs_server to process
895 void nfs_server_return_all_delegations(struct nfs_server *server) in nfs_server_return_all_delegations() argument
897 struct nfs_client *clp = server->nfs_client; in nfs_server_return_all_delegations()
904 need_wait = nfs_server_mark_return_all_delegations(server); in nfs_server_return_all_delegations()
913 static void nfs_mark_return_unused_delegation_types(struct nfs_server *server, in nfs_mark_return_unused_delegation_types() argument
918 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { in nfs_mark_return_unused_delegation_types()
922 nfs_mark_return_if_closed_delegation(server, delegation); in nfs_mark_return_unused_delegation_types()
929 struct nfs_server *server; in nfs_client_mark_return_unused_delegation_types() local
932 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) in nfs_client_mark_return_unused_delegation_types()
933 nfs_mark_return_unused_delegation_types(server, flags); in nfs_client_mark_return_unused_delegation_types()
1032 static void nfs_mark_return_unreferenced_delegations(struct nfs_server *server) in nfs_mark_return_unreferenced_delegations() argument
1036 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { in nfs_mark_return_unreferenced_delegations()
1039 nfs_mark_return_if_closed_delegation(server, delegation); in nfs_mark_return_unreferenced_delegations()
1050 struct nfs_server *server; in nfs_expire_unreferenced_delegations() local
1053 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) in nfs_expire_unreferenced_delegations()
1054 nfs_mark_return_unreferenced_delegations(server); in nfs_expire_unreferenced_delegations()
1070 struct nfs_server *server = NFS_SERVER(inode); in nfs_async_inode_return_delegation() local
1071 struct nfs_client *clp = server->nfs_client; in nfs_async_inode_return_delegation()
1081 nfs_mark_return_delegation(server, delegation); in nfs_async_inode_return_delegation()
1095 nfs_delegation_find_inode_server(struct nfs_server *server, in nfs_delegation_find_inode_server() argument
1102 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { in nfs_delegation_find_inode_server()
1107 if (nfs_sb_active(server->super)) { in nfs_delegation_find_inode_server()
1108 freeme = server->super; in nfs_delegation_find_inode_server()
1137 struct nfs_server *server; in nfs_delegation_find_inode() local
1141 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) { in nfs_delegation_find_inode()
1142 res = nfs_delegation_find_inode_server(server, fhandle); in nfs_delegation_find_inode()
1152 static void nfs_delegation_mark_reclaim_server(struct nfs_server *server) in nfs_delegation_mark_reclaim_server() argument
1156 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { in nfs_delegation_mark_reclaim_server()
1174 struct nfs_server *server; in nfs_delegation_mark_reclaim() local
1177 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) in nfs_delegation_mark_reclaim()
1178 nfs_delegation_mark_reclaim_server(server); in nfs_delegation_mark_reclaim()
1182 static int nfs_server_reap_unclaimed_delegations(struct nfs_server *server, in nfs_server_reap_unclaimed_delegations() argument
1189 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { in nfs_server_reap_unclaimed_delegations()
1204 server) != NULL) in nfs_server_reap_unclaimed_delegations()
1235 static void nfs_mark_test_expired_delegation(struct nfs_server *server, in nfs_mark_test_expired_delegation() argument
1242 set_bit(NFS4CLNT_DELEGATION_EXPIRED, &server->nfs_client->cl_state); in nfs_mark_test_expired_delegation()
1245 static void nfs_inode_mark_test_expired_delegation(struct nfs_server *server, in nfs_inode_mark_test_expired_delegation() argument
1253 nfs_mark_test_expired_delegation(server, delegation); in nfs_inode_mark_test_expired_delegation()
1258 static void nfs_delegation_mark_test_expired_server(struct nfs_server *server) in nfs_delegation_mark_test_expired_server() argument
1262 list_for_each_entry_rcu(delegation, &server->delegations, super_list) in nfs_delegation_mark_test_expired_server()
1263 nfs_mark_test_expired_delegation(server, delegation); in nfs_delegation_mark_test_expired_server()
1270 * Iterates through all the delegations associated with this server and
1275 struct nfs_server *server; in nfs_mark_test_expired_all_delegations() local
1278 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) in nfs_mark_test_expired_all_delegations()
1279 nfs_delegation_mark_test_expired_server(server); in nfs_mark_test_expired_all_delegations()
1287 * Helper for handling "recallable state revoked" status from server.
1300 struct nfs_server *server = NFS_SERVER(inode); in nfs_delegation_test_free_expired() local
1301 const struct nfs4_minor_version_ops *ops = server->nfs_client->cl_mvops; in nfs_delegation_test_free_expired()
1306 status = ops->test_and_free_expired(server, stateid, cred); in nfs_delegation_test_free_expired()
1311 static int nfs_server_reap_expired_delegations(struct nfs_server *server, in nfs_server_reap_expired_delegations() argument
1318 unsigned long gen = ++server->delegation_gen; in nfs_server_reap_expired_delegations()
1322 list_for_each_entry_rcu(delegation, &server->delegations, super_list) { in nfs_server_reap_expired_delegations()
1343 if (!nfs4_server_rebooted(server->nfs_client)) { in nfs_server_reap_expired_delegations()
1348 nfs_inode_mark_test_expired_delegation(server,inode); in nfs_server_reap_expired_delegations()
1360 * Iterates through all the delegations associated with this server and
1362 * expected to be called in cases where the server may have lost its
1400 struct nfs_server *server; in nfs_delegations_present() local
1404 list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) in nfs_delegations_present()
1405 if (!list_empty(&server->delegations)) { in nfs_delegations_present()