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
a14a4254
Commit
a14a4254
authored
Oct 14, 2003
by
Steve French
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://cifs.bkbits.net/linux-2.5cifs
into smfhome2.austin.rr.com:/home/stevef/bk/linux-2.5cifs
parents
a86b115e
aa243ba4
Changes
4
Hide 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 @
a14a4254
Version 0.94
------------
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
------------
...
...
fs/cifs/cifs_debug.c
View file @
a14a4254
...
...
@@ -84,9 +84,9 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
ses
=
list_entry
(
tmp
,
struct
cifsSesInfo
,
cifsSessionList
);
length
=
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
),
ses
->
serverOS
,
ses
->
serverNOS
,
ses
->
capabilities
);
ses
->
serverOS
,
ses
->
serverNOS
,
ses
->
capabilities
,
ses
->
status
,
ses
->
server
->
tcpStatus
);
buf
+=
length
;
if
(
ses
->
server
)
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,
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
cifsConnectionList
);
length
=
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
,
atomic_read
(
&
tcon
->
useCount
),
tcon
->
nativeFileSystem
,
tcon
->
fsDevInfo
.
DeviceCharacteristics
,
tcon
->
fsAttrInfo
.
Attributes
,
tcon
->
fsAttrInfo
.
MaxPathNameComponentLength
);
tcon
->
fsAttrInfo
.
MaxPathNameComponentLength
,
tcon
->
tidStatus
);
buf
+=
length
;
if
(
tcon
->
fsDevInfo
.
DeviceType
==
FILE_DEVICE_DISK
)
length
=
sprintf
(
buf
,
" type: DISK "
);
...
...
fs/cifs/cifssmb.c
View file @
a14a4254
...
...
@@ -822,7 +822,6 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon,
}
else
{
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
);
pSMB
->
DataCount
=
12
/* sizeof(struct set_file_rename) */
+
(
2
*
len_of_str
)
+
2
;
pSMB
->
ByteCount
+=
pSMB
->
DataCount
;
...
...
fs/cifs/connect.c
View file @
a14a4254
...
...
@@ -84,7 +84,9 @@ cifs_reconnect(struct TCP_Server_Info *server)
struct
list_head
*
tmp
;
struct
cifsSesInfo
*
ses
;
struct
cifsTconInfo
*
tcon
;
if
(
server
->
tcpStatus
==
CifsExiting
)
return
rc
;
server
->
tcpStatus
=
CifsNeedReconnect
;
server
->
maxBuf
=
0
;
...
...
@@ -180,17 +182,15 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
smb_msg
.
msg_control
=
NULL
;
smb_msg
.
msg_controllen
=
0
;
cFYI
(
1
,(
"about to rcv csocket %p tcpStatus %d"
,
csocket
,
server
->
tcpStatus
));
/* BB removeme BB */
length
=
sock_recvmsg
(
csocket
,
&
smb_msg
,
sizeof
(
struct
smb_hdr
)
-
1
/* RFC1001 header and SMB header */
,
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
==
CifsNeedReconnect
)
{
if
(
server
->
tcpStatus
==
CifsExiting
)
{
break
;
}
else
if
(
server
->
tcpStatus
==
CifsNeedReconnect
)
{
cFYI
(
1
,(
"Reconnecting after server stopped responding"
));
cifs_reconnect
(
server
);
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
iov
.
iov_len
=
pdu_length
;
for
(
total_read
=
0
;
total_read
<
pdu_length
;
total_read
+=
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
,
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
)
{
cERROR
(
1
,
(
"Zero length receive when expecting %d "
,
...
...
@@ -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 */
if
(
rc
)
{
if
(
atomic_read
(
&
srvTcp
->
socketUseCount
)
==
0
)
srvTcp
->
tcpStatus
=
CifsExiting
;
/* If find_unc succeeded then rc == 0 so we can not end */
if
(
tcon
)
/* up here accidently freeing someone elses tcon struct */
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