Lines Matching refs:volume_info
317 static int cifs_setup_volume_info(struct smb_vol *volume_info, char *mount_data,
2356 cifs_get_tcp_session(struct smb_vol *volume_info) in cifs_get_tcp_session() argument
2361 cifs_dbg(FYI, "UNC: %s\n", volume_info->UNC); in cifs_get_tcp_session()
2364 tcp_ses = cifs_find_tcp_session(volume_info); in cifs_get_tcp_session()
2374 tcp_ses->ops = volume_info->ops; in cifs_get_tcp_session()
2375 tcp_ses->vals = volume_info->vals; in cifs_get_tcp_session()
2377 tcp_ses->hostname = extract_hostname(volume_info->UNC); in cifs_get_tcp_session()
2383 tcp_ses->noblocksnd = volume_info->noblocksnd; in cifs_get_tcp_session()
2384 tcp_ses->noautotune = volume_info->noautotune; in cifs_get_tcp_session()
2385 tcp_ses->tcp_nodelay = volume_info->sockopt_tcp_nodelay; in cifs_get_tcp_session()
2386 tcp_ses->rdma = volume_info->rdma; in cifs_get_tcp_session()
2394 volume_info->source_rfc1001_name, RFC1001_NAME_LEN_WITH_NULL); in cifs_get_tcp_session()
2396 volume_info->target_rfc1001_name, RFC1001_NAME_LEN_WITH_NULL); in cifs_get_tcp_session()
2406 memcpy(&tcp_ses->srcaddr, &volume_info->srcaddr, in cifs_get_tcp_session()
2408 memcpy(&tcp_ses->dstaddr, &volume_info->dstaddr, in cifs_get_tcp_session()
2419 if (volume_info->echo_interval >= SMB_ECHO_INTERVAL_MIN && in cifs_get_tcp_session()
2420 volume_info->echo_interval <= SMB_ECHO_INTERVAL_MAX) in cifs_get_tcp_session()
2421 tcp_ses->echo_interval = volume_info->echo_interval * HZ; in cifs_get_tcp_session()
2431 tcp_ses, (struct sockaddr *)&volume_info->dstaddr); in cifs_get_tcp_session()
2531 cifs_setup_ipc(struct cifs_ses *ses, struct smb_vol *volume_info) in cifs_setup_ipc() argument
2543 if (volume_info->seal) { in cifs_setup_ipc()
2809 cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) in cifs_get_smb_ses() argument
2819 ses = cifs_find_smb_ses(server, volume_info); in cifs_get_smb_ses()
2836 volume_info->local_nls); in cifs_get_smb_ses()
2865 if (volume_info->username) { in cifs_get_smb_ses()
2866 ses->user_name = kstrdup(volume_info->username, GFP_KERNEL); in cifs_get_smb_ses()
2872 if (volume_info->password) { in cifs_get_smb_ses()
2873 ses->password = kstrdup(volume_info->password, GFP_KERNEL); in cifs_get_smb_ses()
2877 if (volume_info->domainname) { in cifs_get_smb_ses()
2878 ses->domainName = kstrdup(volume_info->domainname, GFP_KERNEL); in cifs_get_smb_ses()
2882 if (volume_info->domainauto) in cifs_get_smb_ses()
2883 ses->domainAuto = volume_info->domainauto; in cifs_get_smb_ses()
2884 ses->cred_uid = volume_info->cred_uid; in cifs_get_smb_ses()
2885 ses->linux_uid = volume_info->linux_uid; in cifs_get_smb_ses()
2887 ses->sectype = volume_info->sectype; in cifs_get_smb_ses()
2888 ses->sign = volume_info->sign; in cifs_get_smb_ses()
2893 rc = cifs_setup_session(xid, ses, volume_info->local_nls); in cifs_get_smb_ses()
2905 cifs_setup_ipc(ses, volume_info); in cifs_get_smb_ses()
2915 static int match_tcon(struct cifs_tcon *tcon, struct smb_vol *volume_info) in match_tcon() argument
2919 if (strncmp(tcon->treeName, volume_info->UNC, MAX_TREE_SIZE)) in match_tcon()
2921 if (tcon->seal != volume_info->seal) in match_tcon()
2923 if (tcon->snapshot_time != volume_info->snapshot_time) in match_tcon()
2929 cifs_find_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) in cifs_find_tcon() argument
2937 if (!match_tcon(tcon, volume_info)) in cifs_find_tcon()
3002 cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) in cifs_get_tcon() argument
3007 tcon = cifs_find_tcon(ses, volume_info); in cifs_get_tcon()
3029 if (volume_info->snapshot_time) { in cifs_get_tcon()
3036 tcon->snapshot_time = volume_info->snapshot_time; in cifs_get_tcon()
3040 if (volume_info->password) { in cifs_get_tcon()
3041 tcon->password = kstrdup(volume_info->password, GFP_KERNEL); in cifs_get_tcon()
3048 if (volume_info->seal) { in cifs_get_tcon()
3064 if (volume_info->linux_ext) { in cifs_get_tcon()
3081 rc = ses->server->ops->tree_connect(xid, ses, volume_info->UNC, tcon, in cifs_get_tcon()
3082 volume_info->local_nls); in cifs_get_tcon()
3088 if (volume_info->nodfs) { in cifs_get_tcon()
3094 if (volume_info->persistent) { in cifs_get_tcon()
3111 && (volume_info->nopersistent == false)) { in cifs_get_tcon()
3114 } else if (volume_info->resilient) { in cifs_get_tcon()
3129 tcon->retry = volume_info->retry; in cifs_get_tcon()
3130 tcon->nocase = volume_info->nocase; in cifs_get_tcon()
3131 tcon->nohandlecache = volume_info->nohandlecache; in cifs_get_tcon()
3132 tcon->local_lease = volume_info->local_lease; in cifs_get_tcon()
3225 struct smb_vol *volume_info; in cifs_match_super() local
3244 volume_info = mnt_data->vol; in cifs_match_super()
3246 if (!match_server(tcp_srv, volume_info) || in cifs_match_super()
3247 !match_session(ses, volume_info) || in cifs_match_super()
3248 !match_tcon(tcon, volume_info) || in cifs_match_super()
3750 cleanup_volume_info_contents(struct smb_vol *volume_info) in cleanup_volume_info_contents() argument
3752 kfree(volume_info->username); in cleanup_volume_info_contents()
3753 kzfree(volume_info->password); in cleanup_volume_info_contents()
3754 kfree(volume_info->UNC); in cleanup_volume_info_contents()
3755 kfree(volume_info->domainname); in cleanup_volume_info_contents()
3756 kfree(volume_info->iocharset); in cleanup_volume_info_contents()
3757 kfree(volume_info->prepath); in cleanup_volume_info_contents()
3761 cifs_cleanup_volume_info(struct smb_vol *volume_info) in cifs_cleanup_volume_info() argument
3763 if (!volume_info) in cifs_cleanup_volume_info()
3765 cleanup_volume_info_contents(volume_info); in cifs_cleanup_volume_info()
3766 kfree(volume_info); in cifs_cleanup_volume_info()
3814 struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb, in expand_dfs_referral() argument
3822 full_path = build_unc_path_to_root(volume_info, cifs_sb); in expand_dfs_referral()
3827 ref_path = check_prefix ? full_path + 1 : volume_info->UNC + 1; in expand_dfs_referral()
3845 cleanup_volume_info_contents(volume_info); in expand_dfs_referral()
3846 rc = cifs_setup_volume_info(volume_info, mdata, in expand_dfs_referral()
3859 cifs_setup_volume_info(struct smb_vol *volume_info, char *mount_data, in cifs_setup_volume_info() argument
3864 if (cifs_parse_mount_options(mount_data, devname, volume_info, is_smb3)) in cifs_setup_volume_info()
3867 if (volume_info->nullauth) { in cifs_setup_volume_info()
3869 kfree(volume_info->username); in cifs_setup_volume_info()
3870 volume_info->username = NULL; in cifs_setup_volume_info()
3871 } else if (volume_info->username) { in cifs_setup_volume_info()
3873 cifs_dbg(FYI, "Username: %s\n", volume_info->username); in cifs_setup_volume_info()
3882 if (volume_info->iocharset == NULL) { in cifs_setup_volume_info()
3884 volume_info->local_nls = load_nls_default(); in cifs_setup_volume_info()
3886 volume_info->local_nls = load_nls(volume_info->iocharset); in cifs_setup_volume_info()
3887 if (volume_info->local_nls == NULL) { in cifs_setup_volume_info()
3889 volume_info->iocharset); in cifs_setup_volume_info()
3901 struct smb_vol *volume_info; in cifs_get_volume_info() local
3903 volume_info = kmalloc(sizeof(struct smb_vol), GFP_KERNEL); in cifs_get_volume_info()
3904 if (!volume_info) in cifs_get_volume_info()
3907 rc = cifs_setup_volume_info(volume_info, mount_data, devname, is_smb3); in cifs_get_volume_info()
3909 cifs_cleanup_volume_info(volume_info); in cifs_get_volume_info()
3910 volume_info = ERR_PTR(rc); in cifs_get_volume_info()
3913 return volume_info; in cifs_get_volume_info()
3955 cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) in cifs_mount() argument
3992 server = cifs_get_tcp_session(volume_info); in cifs_mount()
3997 if ((volume_info->max_credits < 20) || in cifs_mount()
3998 (volume_info->max_credits > 60000)) in cifs_mount()
4001 server->max_credits = volume_info->max_credits; in cifs_mount()
4003 ses = cifs_get_smb_ses(server, volume_info); in cifs_mount()
4010 if ((volume_info->persistent == true) && ((ses->server->capabilities & in cifs_mount()
4018 tcon = cifs_get_tcon(ses, volume_info); in cifs_mount()
4036 reset_cifs_unix_caps(xid, tcon, cifs_sb, volume_info); in cifs_mount()
4050 cifs_sb->wsize = server->ops->negotiate_wsize(tcon, volume_info); in cifs_mount()
4051 cifs_sb->rsize = server->ops->negotiate_rsize(tcon, volume_info); in cifs_mount()
4063 int refrc = expand_dfs_referral(xid, ses, volume_info, cifs_sb, in cifs_mount()
4081 full_path = cifs_build_path_to_root(volume_info, cifs_sb, tcon, in cifs_mount()
4122 rc = expand_dfs_referral(xid, ses, volume_info, cifs_sb, true); in cifs_mount()