Lines Matching defs:server
186 struct TCP_Server_Info *server = tcon->ses->server;
189 if (!server->ops->open)
242 rc = server->ops->open(xid, &oparms, oplock, buf);
256 server->ops->close(xid, tcon, fid);
302 struct TCP_Server_Info *server = tcon->ses->server;
333 * If the server returned a read oplock and we have mandatory brlocks,
336 if (server->ops->is_read_op(oplock) && cifs_has_mand_locks(cinode)) {
351 server->ops->set_fid(cfile, fid, oplock);
430 * server. Must be called without holding tcon->open_file_lock,
444 struct TCP_Server_Info *server = tcon->ses->server;
463 if (server->ops->get_lease_key)
464 server->ops->get_lease_key(inode, &fid);
494 struct TCP_Server_Info *server = tcon->ses->server;
498 if (server->ops->close_getattr)
499 server->ops->close_getattr(xid, tcon, cifs_file);
500 else if (server->ops->close)
501 server->ops->close(xid, tcon, &cifs_file->fid);
523 struct TCP_Server_Info *server;
541 server = tcon->ses->server;
560 if (server->oplocks)
577 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",
590 if (server->ops->get_lease_key)
591 server->ops->get_lease_key(inode, &fid);
596 if (server->ops->get_lease_key)
597 server->ops->get_lease_key(inode, &fid);
609 if (server->ops->close)
610 server->ops->close(xid, tcon, &fid);
647 * to server was lost.
669 rc = tcon->ses->server->ops->push_mand_locks(cfile);
683 struct TCP_Server_Info *server;
704 server = tcon->ses->server;
709 * called and if the server was down that means we end up here, and we
723 if (tcon->ses->server->oplocks)
761 if (server->ops->get_lease_key)
762 server->ops->get_lease_key(inode, &cfile->fid);
776 * file might have write behind data that needs to be flushed and server
780 rc = server->ops->open(xid, &oparms, &oplock, NULL);
783 rc = server->ops->open(xid, &oparms, &oplock, NULL);
815 * Else we are writing out data to server already and could deadlock if
817 * would invalidate the current end of file on the server we can not go
818 * to the server to get the new inode info.
822 * If the server returned a read oplock and we have mandatory brlocks,
825 if (server->ops->is_read_op(oplock) && cifs_has_mand_locks(cinode)) {
830 server->ops->set_fid(cfile, &cfile->fid, oplock);
893 struct TCP_Server_Info *server;
903 server = tcon->ses->server;
907 if (server->ops->dir_needs_close(cfile)) {
910 if (server->ops->close_dir)
911 rc = server->ops->close_dir(xid, tcon, &cfile->fid);
978 struct TCP_Server_Info *server = tlink_tcon(cfile->tlink)->ses->server;
985 server->ops->compare_fids(cfile, cur_cfile)) {
987 if (!(li->type & server->vals->shared_lock_type) ||
991 if ((type & server->vals->shared_lock_type) &&
992 ((server->ops->compare_fids(cfile, cur_cfile) &&
997 server->ops->compare_fids(cfile, cur_cfile))
1031 * the server or 1 otherwise.
1040 struct TCP_Server_Info *server = tlink_tcon(cfile->tlink)->ses->server;
1052 if (conf_lock->type & server->vals->shared_lock_type)
1076 * 1) 0, if we set the lock and don't need to request to the server;
1077 * 2) 1, if no locks prevent us but we need to request to the server;
1127 * the server or 1 otherwise.
1154 * 2) 0, if we set the lock and don't need to request to the server;
1156 * 4) FILE_LOCK_DEFERRED + 1, if we need to request to the server.
1200 max_buf = tcon->ses->server->maxBuf;
1378 rc = tcon->ses->server->ops->push_mand_locks(cfile);
1387 bool *wait_flag, struct TCP_Server_Info *server)
1406 *type = server->vals->large_lock_type;
1409 *type |= server->vals->exclusive_lock_type;
1413 *type |= server->vals->unlock_lock_type;
1418 *type |= server->vals->shared_lock_type;
1422 *type |= server->vals->exclusive_lock_type;
1426 *type |= server->vals->shared_lock_type;
1440 struct TCP_Server_Info *server = tcon->ses->server;
1450 if (type & server->vals->shared_lock_type)
1466 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length, type,
1469 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
1478 if (type & server->vals->shared_lock_type) {
1483 type &= ~server->vals->exclusive_lock_type;
1485 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
1486 type | server->vals->shared_lock_type,
1489 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
1490 type | server->vals->shared_lock_type, 0, 1, false);
1544 max_buf = tcon->ses->server->maxBuf;
1589 * the server.
1642 struct TCP_Server_Info *server = tcon->ses->server;
1652 if (type & server->vals->shared_lock_type)
1684 * Windows 7 server can delay breaking lease from read to None
1686 * before sending the lock to the server to be sure the next
1698 rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length,
1707 rc = server->ops->mand_unlock_range(cfile, flock, xid);
1714 * unlocking failed as both cifs.ko and the SMB server
1750 tcon->ses->server);
1798 tcon->ses->server);
1852 struct TCP_Server_Info *server;
1862 server = tcon->ses->server;
1864 if (!server->ops->sync_write)
1880 server now */
1886 len = min(server->ops->wp_retry_size(d_inode(dentry)),
1895 rc = server->ops->sync_write(xid, &open_file->fid,
2306 rc = adjust_credits(wdata->server, &wdata->credits, wdata->bytes);
2313 rc = wdata->server->ops->async_writev(wdata,
2324 struct TCP_Server_Info *server;
2351 server = cifs_pick_channel(cifs_sb_master_tcon(cifs_sb)->ses);
2370 rc = server->ops->wait_mtu_credits(server, cifs_sb->wsize,
2384 add_credits_and_wake_if(server, credits, 0);
2390 add_credits_and_wake_if(server, credits, 0);
2400 add_credits_and_wake_if(server, credits, 0);
2406 wdata->server = server;
2424 add_credits_and_wake_if(server, &wdata->credits, 0);
2597 struct TCP_Server_Info *server;
2623 server = tcon->ses->server;
2624 if (server->ops->flush == NULL) {
2632 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2637 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2650 struct TCP_Server_Info *server;
2668 server = tcon->ses->server;
2669 if (server->ops->flush == NULL) {
2677 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2682 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2833 struct TCP_Server_Info *server = wdata->server;
2851 rc = server->ops->wait_mtu_credits(server, wdata->bytes,
2857 add_credits_and_wake_if(server, &credits, 0);
2863 rc = adjust_credits(server, &wdata->credits, wdata->bytes);
2876 rc = server->ops->async_writev(wdata,
2888 add_credits_and_wake_if(server, &wdata->credits, 0);
2909 struct TCP_Server_Info *server;
2919 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses);
2935 rc = server->ops->wait_mtu_credits(server, cifs_sb->wsize,
2955 add_credits_and_wake_if(server, credits, 0);
2968 add_credits_and_wake_if(server, credits, 0);
2985 add_credits_and_wake_if(server, credits, 0);
2993 add_credits_and_wake_if(server, credits, 0);
3005 add_credits_and_wake_if(server, credits, 0);
3023 wdata->server = server;
3031 rc = adjust_credits(server, &wdata->credits, wdata->bytes);
3037 rc = server->ops->async_writev(wdata,
3042 add_credits_and_wake_if(server, &wdata->credits, 0);
3175 if (!tcon->ses->server->ops->async_writev)
3268 struct TCP_Server_Info *server = tlink_tcon(cfile->tlink)->ses->server;
3283 server->vals->exclusive_lock_type, 0,
3324 * to the server exactly from the pos to pos+len-1 rather than flush all
3332 * request to the server thus making data in the cache stale.
3335 * operations will read new data from the server.
3488 uncached_fill_pages(struct TCP_Server_Info *server,
3535 server, page, page_offset, n);
3547 cifs_uncached_read_into_pages(struct TCP_Server_Info *server,
3550 return uncached_fill_pages(server, rdata, NULL, len);
3554 cifs_uncached_copy_into_pages(struct TCP_Server_Info *server,
3558 return uncached_fill_pages(server, rdata, iter, iter->count);
3568 struct TCP_Server_Info *server;
3571 server = rdata->server;
3588 rc = server->ops->wait_mtu_credits(server, rdata->bytes,
3595 add_credits_and_wake_if(server, &credits, 0);
3601 rc = adjust_credits(server, &rdata->credits, rdata->bytes);
3613 rc = server->ops->async_readv(rdata);
3625 add_credits_and_wake_if(server, &rdata->credits, 0);
3645 struct TCP_Server_Info *server;
3650 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses);
3669 rc = server->ops->wait_mtu_credits(server, cifs_sb->rsize,
3691 add_credits_and_wake_if(server, credits, 0);
3700 add_credits_and_wake_if(server, credits, 0);
3718 add_credits_and_wake_if(server, credits, 0);
3727 add_credits_and_wake_if(server, credits, 0);
3734 rdata->server = server;
3747 rc = adjust_credits(server, &rdata->credits, rdata->bytes);
3753 rc = server->ops->async_readv(rdata);
3757 add_credits_and_wake_if(server, &rdata->credits, 0);
3910 if (!tcon->ses->server->ops->async_readv)
4014 * In strict cache mode we need to read from the server all the time
4015 * if we don't have level II oplock because the server can delay mtime
4035 tcon->ses->server->vals->shared_lock_type,
4052 struct TCP_Server_Info *server;
4073 server = cifs_pick_channel(tcon->ses);
4075 if (!server->ops->sync_read) {
4099 tcon->ses->server->vals->cap_large_files)) {
4112 io_parms.server = server;
4113 rc = server->ops->sync_read(xid, &open_file->fid, &io_parms,
4224 readpages_fill_pages(struct TCP_Server_Info *server,
4235 /* determine the eof that the server (probably) has */
4298 server, page, page_offset, n);
4310 cifs_readpages_read_into_pages(struct TCP_Server_Info *server,
4313 return readpages_fill_pages(server, rdata, NULL, len);
4317 cifs_readpages_copy_into_pages(struct TCP_Server_Info *server,
4321 return readpages_fill_pages(server, rdata, iter, iter->count);
4392 struct TCP_Server_Info *server;
4417 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses);
4449 rc = server->ops->wait_mtu_credits(server, cifs_sb->rsize,
4461 add_credits_and_wake_if(server, credits, 0);
4470 add_credits_and_wake_if(server, credits, 0);
4484 add_credits_and_wake_if(server, credits, 0);
4489 rdata->server = server;
4505 rc = adjust_credits(server, &rdata->credits, rdata->bytes);
4511 rc = server->ops->async_readv(rdata);
4515 add_credits_and_wake_if(server, &rdata->credits, 0);
4627 /* We do not want to update the file size from server for inodes
4683 * the server. If the write is short, we'll end up doing a sync write
4779 struct TCP_Server_Info *server = tcon->ses->server;
4786 server->ops->downgrade_oplock(server, cinode, cfile->oplock_level,
4820 * not bother sending an oplock release if session to server still is
4821 * disconnected since oplock already released by the server
4824 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid,
4928 * cifs_readpages requires the server to support a buffer large enough to