Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
aa243ba4
Commit
aa243ba4
authored
Oct 14, 2003
by
Steve French
Committed by
Steve French
Oct 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix loop on mount failure of session setup
parent
56b4933b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
16 deletions
+13
-16
fs/cifs/CHANGES
fs/cifs/CHANGES
+1
-1
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+4
-4
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+0
-1
fs/cifs/connect.c
fs/cifs/connect.c
+8
-10
No files found.
fs/cifs/CHANGES
View file @
aa243ba4
Version 0.94
Version 0.94
------------
------------
Fix to list processing in reopen_files. Fix reconnection when server hung
Fix to list processing in reopen_files. Fix reconnection when server hung
but tcpip session still alive.
but tcpip session still alive.
Set proper timeout on socket read.
Version 0.93
Version 0.93
------------
------------
...
...
fs/cifs/cifs_debug.c
View file @
aa243ba4
...
@@ -84,9 +84,9 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
...
@@ -84,9 +84,9 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
ses
=
list_entry
(
tmp
,
struct
cifsSesInfo
,
cifsSessionList
);
ses
=
list_entry
(
tmp
,
struct
cifsSesInfo
,
cifsSessionList
);
length
=
length
=
sprintf
(
buf
,
sprintf
(
buf
,
"
\n
%d) Name: %s Domain: %s Mounts: %d ServerOS: %s
\n\t
ServerNOS: %s
\t
Capabilities: 0x%x"
,
"
\n
%d) Name: %s Domain: %s Mounts: %d ServerOS: %s
\n\t
ServerNOS: %s
\t
Capabilities: 0x%x
\n\t
SMB session status: %d
\t
TCP session status: %d
"
,
i
,
ses
->
serverName
,
ses
->
serverDomain
,
atomic_read
(
&
ses
->
inUse
),
i
,
ses
->
serverName
,
ses
->
serverDomain
,
atomic_read
(
&
ses
->
inUse
),
ses
->
serverOS
,
ses
->
serverNOS
,
ses
->
capabilities
);
ses
->
serverOS
,
ses
->
serverNOS
,
ses
->
capabilities
,
ses
->
status
,
ses
->
server
->
tcpStatus
);
buf
+=
length
;
buf
+=
length
;
if
(
ses
->
server
)
if
(
ses
->
server
)
buf
+=
sprintf
(
buf
,
"
\n\t
Local Users To Same Server: %d SecMode: 0x%x"
,
buf
+=
sprintf
(
buf
,
"
\n\t
Local Users To Same Server: %d SecMode: 0x%x"
,
...
@@ -106,13 +106,13 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
...
@@ -106,13 +106,13 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
cifsConnectionList
);
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
cifsConnectionList
);
length
=
length
=
sprintf
(
buf
,
sprintf
(
buf
,
"
\n
%d) %s Uses: %d on FS: %s with characteristics: 0x%x Attributes: 0x%x
\n\t
PathComponentMax: %d"
,
"
\n
%d) %s Uses: %d on FS: %s with characteristics: 0x%x Attributes: 0x%x
\n\t
PathComponentMax: %d
Status: %d
"
,
i
,
tcon
->
treeName
,
i
,
tcon
->
treeName
,
atomic_read
(
&
tcon
->
useCount
),
atomic_read
(
&
tcon
->
useCount
),
tcon
->
nativeFileSystem
,
tcon
->
nativeFileSystem
,
tcon
->
fsDevInfo
.
DeviceCharacteristics
,
tcon
->
fsDevInfo
.
DeviceCharacteristics
,
tcon
->
fsAttrInfo
.
Attributes
,
tcon
->
fsAttrInfo
.
Attributes
,
tcon
->
fsAttrInfo
.
MaxPathNameComponentLength
);
tcon
->
fsAttrInfo
.
MaxPathNameComponentLength
,
tcon
->
tidStatus
);
buf
+=
length
;
buf
+=
length
;
if
(
tcon
->
fsDevInfo
.
DeviceType
==
FILE_DEVICE_DISK
)
if
(
tcon
->
fsDevInfo
.
DeviceType
==
FILE_DEVICE_DISK
)
length
=
sprintf
(
buf
,
" type: DISK "
);
length
=
sprintf
(
buf
,
" type: DISK "
);
...
...
fs/cifs/cifssmb.c
View file @
aa243ba4
...
@@ -822,7 +822,6 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon,
...
@@ -822,7 +822,6 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon,
}
else
{
}
else
{
len_of_str
=
cifs_strtoUCS
((
wchar_t
*
)
rename_info
->
target_name
,
target_name
,
530
,
nls_codepage
);
len_of_str
=
cifs_strtoUCS
((
wchar_t
*
)
rename_info
->
target_name
,
target_name
,
530
,
nls_codepage
);
}
}
cFYI
(
1
,(
"len of str: %d"
,
len_of_str
));
/* BB removeme BB */
rename_info
->
target_name_len
=
cpu_to_le32
(
2
*
len_of_str
);
rename_info
->
target_name_len
=
cpu_to_le32
(
2
*
len_of_str
);
pSMB
->
DataCount
=
12
/* sizeof(struct set_file_rename) */
+
(
2
*
len_of_str
)
+
2
;
pSMB
->
DataCount
=
12
/* sizeof(struct set_file_rename) */
+
(
2
*
len_of_str
)
+
2
;
pSMB
->
ByteCount
+=
pSMB
->
DataCount
;
pSMB
->
ByteCount
+=
pSMB
->
DataCount
;
...
...
fs/cifs/connect.c
View file @
aa243ba4
...
@@ -85,6 +85,8 @@ cifs_reconnect(struct TCP_Server_Info *server)
...
@@ -85,6 +85,8 @@ cifs_reconnect(struct TCP_Server_Info *server)
struct
cifsSesInfo
*
ses
;
struct
cifsSesInfo
*
ses
;
struct
cifsTconInfo
*
tcon
;
struct
cifsTconInfo
*
tcon
;
if
(
server
->
tcpStatus
==
CifsExiting
)
return
rc
;
server
->
tcpStatus
=
CifsNeedReconnect
;
server
->
tcpStatus
=
CifsNeedReconnect
;
server
->
maxBuf
=
0
;
server
->
maxBuf
=
0
;
...
@@ -180,17 +182,15 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
...
@@ -180,17 +182,15 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
smb_msg
.
msg_control
=
NULL
;
smb_msg
.
msg_control
=
NULL
;
smb_msg
.
msg_controllen
=
0
;
smb_msg
.
msg_controllen
=
0
;
cFYI
(
1
,(
"about to rcv csocket %p tcpStatus %d"
,
csocket
,
server
->
tcpStatus
));
/* BB removeme BB */
length
=
length
=
sock_recvmsg
(
csocket
,
&
smb_msg
,
sock_recvmsg
(
csocket
,
&
smb_msg
,
sizeof
(
struct
smb_hdr
)
-
sizeof
(
struct
smb_hdr
)
-
1
/* RFC1001 header and SMB header */
,
1
/* RFC1001 header and SMB header */
,
MSG_PEEK
/* flags see socket.h */
);
MSG_PEEK
/* flags see socket.h */
);
cFYI
(
1
,(
"rcv csocket %p with rc 0x%x smb len of 0x%x tcpStatus %d"
,
csocket
,
length
,
ntohl
(
smb_buffer
->
smb_buf_length
),
server
->
tcpStatus
));
/* BB removeme BB */
if
(
server
->
tcpStatus
==
CifsExiting
)
{
break
;
if
(
server
->
tcpStatus
==
CifsNeedReconnect
)
{
}
else
if
(
server
->
tcpStatus
==
CifsNeedReconnect
)
{
cFYI
(
1
,(
"Reconnecting after server stopped responding"
));
cFYI
(
1
,(
"Reconnecting after server stopped responding"
));
cifs_reconnect
(
server
);
cifs_reconnect
(
server
);
csocket
=
server
->
ssocket
;
csocket
=
server
->
ssocket
;
...
@@ -271,12 +271,8 @@ cFYI(1,("rcv csocket %p with rc 0x%x smb len of 0x%x tcpStatus %d",csocket,lengt
...
@@ -271,12 +271,8 @@ cFYI(1,("rcv csocket %p with rc 0x%x smb len of 0x%x tcpStatus %d",csocket,lengt
iov
.
iov_len
=
pdu_length
;
iov
.
iov_len
=
pdu_length
;
for
(
total_read
=
0
;
total_read
<
pdu_length
;
total_read
+=
length
)
{
for
(
total_read
=
0
;
total_read
<
pdu_length
;
total_read
+=
length
)
{
/* Should improve check for buffer overflow with bad pdu_length */
/* Should improve check for buffer overflow with bad pdu_length */
/* iov.iov_base = smb_buffer+total_read;
iov.iov_len = pdu_length-total_read; */
length
=
sock_recvmsg
(
csocket
,
&
smb_msg
,
length
=
sock_recvmsg
(
csocket
,
&
smb_msg
,
pdu_length
-
total_read
,
0
);
pdu_length
-
total_read
,
0
);
/* cERROR(1,("For iovlen %d Length received: %d with total read %d",
iov.iov_len, length,total_read)); */
if
(
length
==
0
)
{
if
(
length
==
0
)
{
cERROR
(
1
,
cERROR
(
1
,
(
"Zero length receive when expecting %d "
,
(
"Zero length receive when expecting %d "
,
...
@@ -1067,6 +1063,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -1067,6 +1063,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
/* on error free sesinfo and tcon struct if needed */
/* on error free sesinfo and tcon struct if needed */
if
(
rc
)
{
if
(
rc
)
{
if
(
atomic_read
(
&
srvTcp
->
socketUseCount
)
==
0
)
srvTcp
->
tcpStatus
=
CifsExiting
;
/* If find_unc succeeded then rc == 0 so we can not end */
/* If find_unc succeeded then rc == 0 so we can not end */
if
(
tcon
)
/* up here accidently freeing someone elses tcon struct */
if
(
tcon
)
/* up here accidently freeing someone elses tcon struct */
tconInfoFree
(
tcon
);
tconInfoFree
(
tcon
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment