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
7713cd04
Commit
7713cd04
authored
May 27, 2004
by
Steve French
Committed by
Steve French
May 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add additional cifs stats
parent
cb104629
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
15 deletions
+73
-15
fs/cifs/CHANGES
fs/cifs/CHANGES
+5
-1
fs/cifs/TODO
fs/cifs/TODO
+21
-7
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+17
-6
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+5
-0
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+22
-1
fs/cifs/misc.c
fs/cifs/misc.c
+3
-0
No files found.
fs/cifs/CHANGES
View file @
7713cd04
...
@@ -2,7 +2,11 @@ Version 1.16
...
@@ -2,7 +2,11 @@ Version 1.16
------------
------------
Fix incorrect file size in file handle based setattr on big endian hardware.
Fix incorrect file size in file handle based setattr on big endian hardware.
Fix oops in build_path_from_dentry when out of memory. Add checks for invalid
Fix oops in build_path_from_dentry when out of memory. Add checks for invalid
and closing file structs in writepage/partialpagewrite
and closing file structs in writepage/partialpagewrite. Add statistics
for each mounted share (new menuconfig option). Fix endianness problem in
volume information displayed in /proc/fs/cifs/DebugData (only affects
affects big endian architectures). Prevent renames while constructing
path names for open, mkdir and rmdir.
Version 1.15
Version 1.15
------------
------------
...
...
fs/cifs/TODO
View file @
7713cd04
version 1.1
4 May 14
, 2004
version 1.1
6 May 27
, 2004
A Partial List of
Known Problems and
Missing Features
A Partial List of Missing Features
==================================
===================
==================================
Contributions are welcome. There are plenty of opportunities
Contributions are welcome. There are plenty of opportunities
for visible, important contributions to this module. Here
for visible, important contributions to this module. Here
...
@@ -54,7 +54,8 @@ than resending (helps reduce server resource utilization and avoid
...
@@ -54,7 +54,8 @@ than resending (helps reduce server resource utilization and avoid
spurious oplock breaks).
spurious oplock breaks).
p) Improve performance of readpages by sending more than one read
p) Improve performance of readpages by sending more than one read
at a time when 8 pages or more are requested.
at a time when 8 pages or more are requested. Evaluate whether
reads larger than 16K would be helpful.
q) For support of Windows9x/98 we need to retry failed mounts
q) For support of Windows9x/98 we need to retry failed mounts
to *SMBSERVER (default server name) with the uppercase hostname
to *SMBSERVER (default server name) with the uppercase hostname
...
@@ -66,8 +67,10 @@ to Windows servers)
...
@@ -66,8 +67,10 @@ to Windows servers)
s) Finish fcntl D_NOTIFY support so kde and gnome file list windows
s) Finish fcntl D_NOTIFY support so kde and gnome file list windows
will autorefresh
will autorefresh
t) Add GUI tool to configure /proc/fs/cifs settings and for display of
the CIFS statistics
KNOWN BUGS (updated May
14
, 2004)
KNOWN BUGS (updated May
27
, 2004)
====================================
====================================
1) existing symbolic links (Windows reparse points) are recognized but
1) existing symbolic links (Windows reparse points) are recognized but
can not be created remotely. They are implemented for Samba and those that
can not be created remotely. They are implemented for Samba and those that
...
@@ -88,9 +91,19 @@ than to Windows.
...
@@ -88,9 +91,19 @@ than to Windows.
page writes begin in the middle of a page (pages can get zeroed).
page writes begin in the middle of a page (pages can get zeroed).
6) Write caching done incorrectly when files are only opened
6) Write caching done incorrectly when files are only opened
with write permission by the application.
with write permission by the application.
7) Rename of files that are hardlinked does not work correctly e.g.
ln source target
mv source target
This should be no op since files are linked but in cifs it causes
the source file to go away. This may require implementation of
the cifs POSIX extensions (Unix Extensions version 2) for
it to be done correctly since Samba is failing the rename,
(rather than ignoring it) so the client not knowing they
are linked proceeds to delete the target and then retry the
move which succeeds this time (but the source is gone).
Misc testing to do
Misc testing to do
=================
=================
=
1) check out max path names and max path name components against various server
1) check out max path names and max path name components against various server
types. Return max path name in stat -f information
types. Return max path name in stat -f information
...
@@ -102,5 +115,6 @@ there are some easy changes that can be done to parallelize sequential writes,
...
@@ -102,5 +115,6 @@ there are some easy changes that can be done to parallelize sequential writes,
and when signing is disabled to request larger read sizes (larger than
and when signing is disabled to request larger read sizes (larger than
negotiated size) and send larger write sizes to modern servers.
negotiated size) and send larger write sizes to modern servers.
4) More exhaustively test the recently added NT4 support
4) More exhaustively test the recently added NT4 support against various
NT4 service pack levels.
fs/cifs/cifs_debug.c
View file @
7713cd04
...
@@ -84,12 +84,12 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
...
@@ -84,12 +84,12 @@ 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\t
SMB session status: %d
\t
TCP s
ession s
tatus: %d"
,
"
\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 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
->
status
,
ses
->
server
->
tcpStatus
);
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 S
ame S
erver: %d SecMode: 0x%x Req Active: %d"
,
buf
+=
sprintf
(
buf
,
"
\n\t
Local Users To Server: %d SecMode: 0x%x Req Active: %d"
,
atomic_read
(
&
ses
->
server
->
socketUseCount
),
atomic_read
(
&
ses
->
server
->
socketUseCount
),
ses
->
server
->
secMode
,
ses
->
server
->
secMode
,
atomic_read
(
&
ses
->
server
->
inFlight
));
atomic_read
(
&
ses
->
server
->
inFlight
));
...
@@ -125,7 +125,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
...
@@ -125,7 +125,7 @@ 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 c
haracteristics: 0x%x Attributes: 0x%x
\n
PathComponentMax: %d Status: %d"
,
"
\n
%d) %s Uses: %d
Type: %s C
haracteristics: 0x%x Attributes: 0x%x
\n
PathComponentMax: %d Status: %d"
,
i
,
tcon
->
treeName
,
i
,
tcon
->
treeName
,
atomic_read
(
&
tcon
->
useCount
),
atomic_read
(
&
tcon
->
useCount
),
tcon
->
nativeFileSystem
,
tcon
->
nativeFileSystem
,
...
@@ -145,14 +145,25 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
...
@@ -145,14 +145,25 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
if
(
tcon
->
tidStatus
==
CifsNeedReconnect
)
if
(
tcon
->
tidStatus
==
CifsNeedReconnect
)
buf
+=
sprintf
(
buf
,
"
\t
DISCONNECTED "
);
buf
+=
sprintf
(
buf
,
"
\t
DISCONNECTED "
);
#ifdef CONFIG_CIFS_STATS
#ifdef CONFIG_CIFS_STATS
length
=
sprintf
(
buf
,
length
=
sprintf
(
buf
,
"
\n
SMBs: %d Oplock Breaks: %d"
,
"
\n
Total SMBs: %d Reads: %d BytesRead %lld Writes: %d BytesWritten %lld"
,
atomic_read
(
&
tcon
->
num_smbs_sent
),
atomic_read
(
&
tcon
->
num_smbs_sent
),
atomic_read
(
&
tcon
->
num_oplock_brks
));
buf
+=
length
;
length
=
sprintf
(
buf
,
"
\n
Reads: %d Bytes %lld"
,
atomic_read
(
&
tcon
->
num_reads
),
atomic_read
(
&
tcon
->
num_reads
),
(
long
long
)(
tcon
->
bytes_read
),
(
long
long
)(
tcon
->
bytes_read
));
buf
+=
length
;
length
=
sprintf
(
buf
,
"
\n
Writes: %d Bytes: %lld"
,
atomic_read
(
&
tcon
->
num_writes
),
atomic_read
(
&
tcon
->
num_writes
),
(
long
long
)(
tcon
->
bytes_written
));
(
long
long
)(
tcon
->
bytes_written
));
buf
+=
length
;
buf
+=
length
;
length
=
sprintf
(
buf
,
"
\n
Opens: %d Deletes: %d
\n
Mkdirs: %d Rmdirs: %d"
,
atomic_read
(
&
tcon
->
num_opens
),
atomic_read
(
&
tcon
->
num_deletes
),
atomic_read
(
&
tcon
->
num_mkdirs
),
atomic_read
(
&
tcon
->
num_rmdirs
));
buf
+=
length
;
#endif
#endif
}
}
...
...
fs/cifs/cifsglob.h
View file @
7713cd04
...
@@ -201,6 +201,11 @@ struct cifsTconInfo {
...
@@ -201,6 +201,11 @@ struct cifsTconInfo {
atomic_t
num_smbs_sent
;
atomic_t
num_smbs_sent
;
atomic_t
num_writes
;
atomic_t
num_writes
;
atomic_t
num_reads
;
atomic_t
num_reads
;
atomic_t
num_oplock_brks
;
atomic_t
num_opens
;
atomic_t
num_deletes
;
atomic_t
num_mkdirs
;
atomic_t
num_rmdirs
;
__u64
bytes_read
;
__u64
bytes_read
;
__u64
bytes_written
;
__u64
bytes_written
;
spinlock_t
stat_lock
;
spinlock_t
stat_lock
;
...
...
fs/cifs/cifssmb.c
View file @
7713cd04
...
@@ -436,7 +436,13 @@ CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon,
...
@@ -436,7 +436,13 @@ CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon,
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
0
);
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
0
);
if
(
rc
)
{
if
(
rc
)
{
cFYI
(
1
,
(
"Error in RMFile = %d"
,
rc
));
cFYI
(
1
,
(
"Error in RMFile = %d"
,
rc
));
}
}
#ifdef CONFIG_CIFS_STATS
else
{
atomic_inc
(
&
tcon
->
num_deletes
);
}
#endif
if
(
pSMB
)
if
(
pSMB
)
cifs_buf_release
(
pSMB
);
cifs_buf_release
(
pSMB
);
if
(
rc
==
-
EAGAIN
)
if
(
rc
==
-
EAGAIN
)
...
@@ -483,6 +489,12 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon,
...
@@ -483,6 +489,12 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon,
if
(
rc
)
{
if
(
rc
)
{
cFYI
(
1
,
(
"Error in RMDir = %d"
,
rc
));
cFYI
(
1
,
(
"Error in RMDir = %d"
,
rc
));
}
}
#ifdef CONFIG_CIFS_STATS
else
{
atomic_inc
(
&
tcon
->
num_rmdirs
);
}
#endif
if
(
pSMB
)
if
(
pSMB
)
cifs_buf_release
(
pSMB
);
cifs_buf_release
(
pSMB
);
if
(
rc
==
-
EAGAIN
)
if
(
rc
==
-
EAGAIN
)
...
@@ -528,6 +540,11 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
...
@@ -528,6 +540,11 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
if
(
rc
)
{
if
(
rc
)
{
cFYI
(
1
,
(
"Error in Mkdir = %d"
,
rc
));
cFYI
(
1
,
(
"Error in Mkdir = %d"
,
rc
));
}
}
#ifdef CONFIG_CIFS_STATS
else
{
atomic_inc
(
&
tcon
->
num_mkdirs
);
}
#endif
if
(
pSMB
)
if
(
pSMB
)
cifs_buf_release
(
pSMB
);
cifs_buf_release
(
pSMB
);
if
(
rc
==
-
EAGAIN
)
if
(
rc
==
-
EAGAIN
)
...
@@ -624,6 +641,10 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon,
...
@@ -624,6 +641,10 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon,
pfile_info
->
EndOfFile
=
pSMBr
->
EndOfFile
;
pfile_info
->
EndOfFile
=
pSMBr
->
EndOfFile
;
pfile_info
->
NumberOfLinks
=
cpu_to_le32
(
1
);
pfile_info
->
NumberOfLinks
=
cpu_to_le32
(
1
);
}
}
#ifdef CONFIG_CIFS_STATS
atomic_inc
(
&
tcon
->
num_opens
);
#endif
}
}
if
(
pSMB
)
if
(
pSMB
)
cifs_buf_release
(
pSMB
);
cifs_buf_release
(
pSMB
);
...
...
fs/cifs/misc.c
View file @
7713cd04
...
@@ -392,6 +392,9 @@ is_valid_oplock_break(struct smb_hdr *buf)
...
@@ -392,6 +392,9 @@ is_valid_oplock_break(struct smb_hdr *buf)
list_for_each
(
tmp
,
&
GlobalTreeConnectionList
)
{
list_for_each
(
tmp
,
&
GlobalTreeConnectionList
)
{
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
cifsConnectionList
);
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
cifsConnectionList
);
if
(
tcon
->
tid
==
buf
->
Tid
)
{
if
(
tcon
->
tid
==
buf
->
Tid
)
{
#ifdef CONFIG_CIFS_STATS
atomic_inc
(
&
tcon
->
num_oplock_brks
);
#endif
list_for_each
(
tmp1
,
&
tcon
->
openFileList
){
list_for_each
(
tmp1
,
&
tcon
->
openFileList
){
netfile
=
list_entry
(
tmp1
,
struct
cifsFileInfo
,
tlist
);
netfile
=
list_entry
(
tmp1
,
struct
cifsFileInfo
,
tlist
);
if
(
pSMB
->
Fid
==
netfile
->
netfid
)
{
if
(
pSMB
->
Fid
==
netfile
->
netfid
)
{
...
...
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