Lines Matching refs:server

29 send_nt_cancel(struct TCP_Server_Info *server, struct smb_rqst *rqst,  in send_nt_cancel()  argument
41 cifs_server_lock(server); in send_nt_cancel()
42 rc = cifs_sign_smb(in_buf, server, &mid->sequence_number); in send_nt_cancel()
44 cifs_server_unlock(server); in send_nt_cancel()
53 --server->sequence_number; in send_nt_cancel()
54 rc = smb_send(server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); in send_nt_cancel()
56 server->sequence_number--; in send_nt_cancel()
58 cifs_server_unlock(server); in send_nt_cancel()
90 cifs_find_mid(struct TCP_Server_Info *server, char *buffer) in cifs_find_mid() argument
95 spin_lock(&server->mid_lock); in cifs_find_mid()
96 list_for_each_entry(mid, &server->pending_mid_q, qhead) { in cifs_find_mid()
101 spin_unlock(&server->mid_lock); in cifs_find_mid()
105 spin_unlock(&server->mid_lock); in cifs_find_mid()
110 cifs_add_credits(struct TCP_Server_Info *server, in cifs_add_credits() argument
113 spin_lock(&server->req_lock); in cifs_add_credits()
114 server->credits += credits->value; in cifs_add_credits()
115 server->in_flight--; in cifs_add_credits()
116 spin_unlock(&server->req_lock); in cifs_add_credits()
117 wake_up(&server->request_q); in cifs_add_credits()
121 cifs_set_credits(struct TCP_Server_Info *server, const int val) in cifs_set_credits() argument
123 spin_lock(&server->req_lock); in cifs_set_credits()
124 server->credits = val; in cifs_set_credits()
125 server->oplocks = val > 1 ? enable_oplocks : false; in cifs_set_credits()
126 spin_unlock(&server->req_lock); in cifs_set_credits()
130 cifs_get_credits_field(struct TCP_Server_Info *server, const int optype) in cifs_get_credits_field() argument
132 return &server->credits; in cifs_get_credits_field()
163 cifs_get_next_mid(struct TCP_Server_Info *server) in cifs_get_next_mid() argument
169 spin_lock(&server->mid_lock); in cifs_get_next_mid()
172 cur_mid = (__u16)((server->CurrentMid) & 0xffff); in cifs_get_next_mid()
198 list_for_each_entry(mid_entry, &server->pending_mid_q, qhead) { in cifs_get_next_mid()
223 server->CurrentMid = mid; in cifs_get_next_mid()
228 spin_unlock(&server->mid_lock); in cifs_get_next_mid()
231 cifs_signal_cifsd_for_reconnect(server, false); in cifs_get_next_mid()
378 cifs_downgrade_oplock(struct TCP_Server_Info *server, in cifs_downgrade_oplock() argument
386 cifs_check_trans2(struct mid_q_entry *mid, struct TCP_Server_Info *server, in cifs_check_trans2() argument
404 if (!server->large_buf) { in cifs_check_trans2()
411 server->bigbuf = NULL; in cifs_check_trans2()
417 cifs_need_neg(struct TCP_Server_Info *server) in cifs_need_neg() argument
419 return server->maxBuf == 0; in cifs_need_neg()
425 struct TCP_Server_Info *server) in cifs_negotiate() argument
428 rc = CIFSSMBNegotiate(xid, ses, server); in cifs_negotiate()
431 set_credits(server, 1); in cifs_negotiate()
432 rc = CIFSSMBNegotiate(xid, ses, server); in cifs_negotiate()
443 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_wsize() local
463 if (!(server->capabilities & CAP_LARGE_WRITE_X) || in cifs_negotiate_wsize()
464 (!(server->capabilities & CAP_UNIX) && server->sign)) in cifs_negotiate_wsize()
466 server->maxBuf - sizeof(WRITE_REQ) + 4); in cifs_negotiate_wsize()
478 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_rsize() local
495 else if (server->capabilities & CAP_LARGE_READ_X) in cifs_negotiate_rsize()
498 defsize = server->maxBuf - sizeof(READ_RSP); in cifs_negotiate_rsize()
506 if (!(server->capabilities & CAP_LARGE_READ_X)) in cifs_negotiate_rsize()
1037 cifs_can_echo(struct TCP_Server_Info *server) in cifs_can_echo() argument
1039 if (server->tcpStatus == CifsGood) in cifs_can_echo()
1123 if (tcon->ses->server->oplocks) in cifs_make_node()
1127 rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, buf); in cifs_make_node()
1147 rc = tcon->ses->server->ops->sync_write(xid, &fid, &io_parms, in cifs_make_node()
1153 rc = tcon->ses->server->ops->sync_write(xid, &fid, &io_parms, in cifs_make_node()
1156 tcon->ses->server->ops->close(xid, tcon, &fid); in cifs_make_node()