Commit 7713cd04 authored by Steve French's avatar Steve French Committed by Steve French

add additional cifs stats

parent cb104629
......@@ -2,7 +2,11 @@ Version 1.16
------------
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
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.14 May 14, 2004
version 1.16 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
for visible, important contributions to this module. Here
......@@ -54,7 +54,8 @@ than resending (helps reduce server resource utilization and avoid
spurious oplock breaks).
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
to *SMBSERVER (default server name) with the uppercase hostname
......@@ -66,8 +67,10 @@ to Windows servers)
s) Finish fcntl D_NOTIFY support so kde and gnome file list windows
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
can not be created remotely. They are implemented for Samba and those that
......@@ -88,9 +91,19 @@ than to Windows.
page writes begin in the middle of a page (pages can get zeroed).
6) Write caching done incorrectly when files are only opened
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
=================
==================
1) check out max path names and max path name components against various server
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,
and when signing is disabled to request larger read sizes (larger than
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.
......@@ -84,12 +84,12 @@ 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\tServerNOS: %s\tCapabilities: 0x%x\n\tSMB session status: %d\tTCP session status: %d",
"\n%d) Name: %s Domain: %s Mounts: %d ServerOS: %s \n\tServerNOS: %s\tCapabilities: 0x%x\n\tSMB session status: %d\tTCP status: %d",
i, ses->serverName, ses->serverDomain, atomic_read(&ses->inUse),
ses->serverOS, ses->serverNOS, ses->capabilities,ses->status,ses->server->tcpStatus);
buf += length;
if(ses->server) {
buf += sprintf(buf, "\n\tLocal Users To Same Server: %d SecMode: 0x%x Req Active: %d",
buf += sprintf(buf, "\n\tLocal Users To Server: %d SecMode: 0x%x Req Active: %d",
atomic_read(&ses->server->socketUseCount),
ses->server->secMode,
atomic_read(&ses->server->inFlight));
......@@ -125,7 +125,7 @@ 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\nPathComponentMax: %d Status: %d",
"\n%d) %s Uses: %d Type: %s Characteristics: 0x%x Attributes: 0x%x\nPathComponentMax: %d Status: %d",
i, tcon->treeName,
atomic_read(&tcon->useCount),
tcon->nativeFileSystem,
......@@ -145,14 +145,25 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
if(tcon->tidStatus == CifsNeedReconnect)
buf += sprintf(buf, "\tDISCONNECTED ");
#ifdef CONFIG_CIFS_STATS
length = sprintf(buf,
"\nTotal SMBs: %d Reads: %d BytesRead %lld Writes: %d BytesWritten %lld",
length = sprintf(buf,"\nSMBs: %d Oplock Breaks: %d",
atomic_read(&tcon->num_smbs_sent),
atomic_read(&tcon->num_oplock_brks));
buf += length;
length = sprintf(buf,"\nReads: %d Bytes %lld",
atomic_read(&tcon->num_reads),
(long long)(tcon->bytes_read),
(long long)(tcon->bytes_read));
buf += length;
length = sprintf(buf,"\nWrites: %d Bytes: %lld",
atomic_read(&tcon->num_writes),
(long long)(tcon->bytes_written));
buf += length;
length = sprintf(buf,
"\nOpens: %d Deletes: %d\nMkdirs: %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
}
......
......@@ -201,6 +201,11 @@ struct cifsTconInfo {
atomic_t num_smbs_sent;
atomic_t num_writes;
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_written;
spinlock_t stat_lock;
......
......@@ -437,6 +437,12 @@ CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon,
if (rc) {
cFYI(1, ("Error in RMFile = %d", rc));
}
#ifdef CONFIG_CIFS_STATS
else {
atomic_inc(&tcon->num_deletes);
}
#endif
if (pSMB)
cifs_buf_release(pSMB);
if (rc == -EAGAIN)
......@@ -483,6 +489,12 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon,
if (rc) {
cFYI(1, ("Error in RMDir = %d", rc));
}
#ifdef CONFIG_CIFS_STATS
else {
atomic_inc(&tcon->num_rmdirs);
}
#endif
if (pSMB)
cifs_buf_release(pSMB);
if (rc == -EAGAIN)
......@@ -528,6 +540,11 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
if (rc) {
cFYI(1, ("Error in Mkdir = %d", rc));
}
#ifdef CONFIG_CIFS_STATS
else {
atomic_inc(&tcon->num_mkdirs);
}
#endif
if (pSMB)
cifs_buf_release(pSMB);
if (rc == -EAGAIN)
......@@ -624,6 +641,10 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon,
pfile_info->EndOfFile = pSMBr->EndOfFile;
pfile_info->NumberOfLinks = cpu_to_le32(1);
}
#ifdef CONFIG_CIFS_STATS
atomic_inc(&tcon->num_opens);
#endif
}
if (pSMB)
cifs_buf_release(pSMB);
......
......@@ -392,6 +392,9 @@ is_valid_oplock_break(struct smb_hdr *buf)
list_for_each(tmp, &GlobalTreeConnectionList) {
tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
if (tcon->tid == buf->Tid) {
#ifdef CONFIG_CIFS_STATS
atomic_inc(&tcon->num_oplock_brks);
#endif
list_for_each(tmp1,&tcon->openFileList){
netfile = list_entry(tmp1,struct cifsFileInfo,tlist);
if(pSMB->Fid == netfile->netfid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment