Lines Matching defs:server

44  * Prepare a subrequest to upload to the server.  We need to allocate credits
52 struct TCP_Server_Info *server;
62 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses);
63 wdata->server = server;
76 rc = server->ops->wait_mtu_credits(server, wsize, &wdata->subreq.max_len,
84 if (server->smbd_conn)
85 subreq->max_nr_segs = server->smbd_conn->max_frmr_depth;
90 * Issue a subrequest to upload to the server.
104 rc = adjust_credits(wdata->server, &wdata->credits, wdata->subreq.len);
112 wdata->server->ops->async_writev(wdata);
121 add_credits_and_wake_if(wdata->server, &wdata->credits, 0);
131 * We also choose the server and allocate an operation ID to be cleaned up
137 struct TCP_Server_Info *server;
147 server = cifs_pick_channel(tlink_tcon(req->cfile->tlink)->ses);
148 rdata->server = server;
152 server->ops->negotiate_rsize(tlink_tcon(req->cfile->tlink),
156 rc = server->ops->wait_mtu_credits(server, cifs_sb->ctx->rsize, &rsize,
165 if (server->smbd_conn)
166 subreq->max_nr_segs = server->smbd_conn->max_frmr_depth;
206 rc = adjust_credits(rdata->server, &rdata->credits, rdata->subreq.len);
211 rc = rdata->server->ops->async_readv(rdata);
334 add_credits_and_wake_if(rdata->server, &rdata->credits, 0);
357 * were closed when session to server was lost.
539 struct TCP_Server_Info *server = tcon->ses->server;
543 if (!server->ops->open)
598 rc = server->ops->open(xid, &oparms, oplock, buf);
619 server->ops->close(xid, tcon, fid);
664 struct TCP_Server_Info *server = tcon->ses->server;
707 * If the server returned a read oplock and we have mandatory brlocks,
710 if (server->ops->is_read_op(oplock) && cifs_has_mand_locks(cinode)) {
725 server->ops->set_fid(cfile, fid, oplock);
798 struct TCP_Server_Info *server = tcon->ses->server;
804 if (server->ops->close_getattr)
805 rc = server->ops->close_getattr(0, tcon, cifs_file);
806 else if (server->ops->close)
807 rc = server->ops->close(0, tcon, &cifs_file->fid);
841 * server. Must be called without holding tcon->open_file_lock,
858 struct TCP_Server_Info *server = tcon->ses->server;
880 if (server->ops->get_lease_key)
881 server->ops->get_lease_key(inode, &fid);
911 struct TCP_Server_Info *server = tcon->ses->server;
916 if (server->ops->close_getattr)
917 rc = server->ops->close_getattr(xid, tcon, cifs_file);
918 else if (server->ops->close)
919 rc = server->ops->close(xid, tcon, &cifs_file->fid);
952 struct TCP_Server_Info *server;
977 server = tcon->ses->server;
1011 if (server->oplocks)
1029 cifs_dbg(VFS, "server %s of type %s returned unexpected error on SMB posix open, disabling posix open support. Check if server update available.\n",
1043 if (server->ops->get_lease_key)
1044 server->ops->get_lease_key(inode, &fid);
1049 if (server->ops->get_lease_key)
1050 server->ops->get_lease_key(inode, &fid);
1062 if (server->ops->close)
1063 server->ops->close(xid, tcon, &fid);
1112 * to server was lost.
1138 rc = tcon->ses->server->ops->push_mand_locks(cfile);
1152 struct TCP_Server_Info *server;
1174 server = tcon->ses->server;
1179 * called and if the server was down that means we end up here, and we
1194 if (tcon->ses->server->oplocks)
1238 if (server->ops->get_lease_key)
1239 server->ops->get_lease_key(inode, &cfile->fid);
1256 * file might have write behind data that needs to be flushed and server
1260 rc = server->ops->open(xid, &oparms, &oplock, NULL);
1263 rc = server->ops->open(xid, &oparms, &oplock, NULL);
1307 * Else we are writing out data to server already and could deadlock if
1309 * would invalidate the current end of file on the server we can not go
1310 * to the server to get the new inode info.
1314 * If the server returned a read oplock and we have mandatory brlocks,
1317 if (server->ops->is_read_op(oplock) && cifs_has_mand_locks(cinode)) {
1322 server->ops->set_fid(cfile, &cfile->fid, oplock);
1445 struct TCP_Server_Info *server;
1455 server = tcon->ses->server;
1459 if (server->ops->dir_needs_close(cfile)) {
1462 if (server->ops->close_dir)
1463 rc = server->ops->close_dir(xid, tcon, &cfile->fid);
1530 struct TCP_Server_Info *server = tlink_tcon(cfile->tlink)->ses->server;
1537 server->ops->compare_fids(cfile, cur_cfile)) {
1539 if (!(li->type & server->vals->shared_lock_type) ||
1543 if ((type & server->vals->shared_lock_type) &&
1544 ((server->ops->compare_fids(cfile, cur_cfile) &&
1549 server->ops->compare_fids(cfile, cur_cfile))
1583 * the server or 1 otherwise.
1592 struct TCP_Server_Info *server = tlink_tcon(cfile->tlink)->ses->server;
1604 if (conf_lock->type & server->vals->shared_lock_type)
1628 * 1) 0, if we set the lock and don't need to request to the server;
1629 * 2) 1, if no locks prevent us but we need to request to the server;
1680 * the server or 1 otherwise.
1707 * 2) 0, if we set the lock and don't need to request to the server;
1709 * 4) FILE_LOCK_DEFERRED + 1, if we need to request to the server.
1753 max_buf = tcon->ses->server->maxBuf;
1940 rc = tcon->ses->server->ops->push_mand_locks(cfile);
1949 bool *wait_flag, struct TCP_Server_Info *server)
1969 *type = server->vals->large_lock_type;
1972 *type |= server->vals->exclusive_lock_type;
1976 *type |= server->vals->unlock_lock_type;
1981 *type |= server->vals->shared_lock_type;
1985 *type |= server->vals->exclusive_lock_type;
1989 *type |= server->vals->shared_lock_type;
2003 struct TCP_Server_Info *server = tcon->ses->server;
2014 if (type & server->vals->shared_lock_type)
2031 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length, type,
2034 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
2043 if (type & server->vals->shared_lock_type) {
2048 type &= ~server->vals->exclusive_lock_type;
2050 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
2051 type | server->vals->shared_lock_type,
2054 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
2055 type | server->vals->shared_lock_type, 0, 1, false);
2110 max_buf = tcon->ses->server->maxBuf;
2155 * the server.
2209 struct TCP_Server_Info *server = tcon->ses->server;
2220 if (type & server->vals->shared_lock_type)
2252 * Windows 7 server can delay breaking lease from read to None
2254 * before sending the lock to the server to be sure the next
2266 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
2275 rc = server->ops->mand_unlock_range(cfile, flock, xid);
2282 * unlocking failed as both cifs.ko and the SMB server
2318 tcon->ses->server);
2367 tcon->ses->server);
2629 struct TCP_Server_Info *server;
2655 server = tcon->ses->server;
2656 if (server->ops->flush == NULL) {
2664 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2669 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2685 struct TCP_Server_Info *server;
2703 server = tcon->ses->server;
2704 if (server->ops->flush == NULL) {
2712 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2717 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2753 struct TCP_Server_Info *server = tlink_tcon(cfile->tlink)->ses->server;
2771 server->vals->exclusive_lock_type, 0,
2811 * to the server exactly from the pos to pos+len-1 rather than flush all
2819 * request to the server thus making data in the cache stale.
2822 * operations will read new data from the server.
2897 * In strict cache mode we need to read from the server all the time
2898 * if we don't have level II oplock because the server can delay mtime
2921 tcon->ses->server->vals->shared_lock_type,
2995 /* We do not want to update the file size from server for inodes
3035 struct TCP_Server_Info *server;
3049 server = tcon->ses->server;
3051 server->ops->downgrade_oplock(server, cinode, cfile->oplock_level,
3105 rc = server->ops->oplock_response(tcon, persistent_fid,
3194 * cifs_readahead requires the server to support a buffer large enough to