Commit 37e19384 authored by Steve French's avatar Steve French

Merge bk://cifs.bkbits.net/linux-2.5cifs

into stevef95.austin.ibm.com:/home/stevef/linux-2.5cifs
parents 0bcf0c3c c208b35c
......@@ -1562,7 +1562,7 @@ config SMB_NLS_REMOTE
smbmount from samba 2.2.0 or later supports this.
config CIFS
tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)"
tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)"
depends on INET
select NLS
help
......@@ -1592,7 +1592,16 @@ config CIFS_STATS
depends on CIFS
help
Enabling this option will cause statistics for each server share
mounted by the cifs client to be displayed in /proc/fs/cifs/DebugData
mounted by the cifs client to be displayed in /proc/fs/cifs/Stats
config CIFS_POSIX
bool "CIFS statistics (EXPERIMENTAL)"
depends on CIFS
help
Enabling this option will cause the cifs client to attempt to
negotiate a newer dialect with servers, such as Samba 3.0.5
or later, that optionally can handle more POSIX like (rather
than Windows like) file behavior. If unsure, say N.
config NCP_FS
tristate "NCP file system support (to mount NetWare volumes)"
......
Version 1.19
------------
Fix /proc/fs/cifs/Stats and DebugData display to handle larger
amounts of return data.
Version 1.18
------------
Do not rename hardlinked files (since that should be a noop). Flush
cached write behind data when reopening a file after session abend,
except when already in write. Grab per socket sem during reconnect
to avoid oops in sendmsg if overlapping with reconnect.
to avoid oops in sendmsg if overlapping with reconnect. Do not
reset cached inode file size on readdir for files open for write on
client.
Version 1.17
......
......@@ -62,12 +62,17 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
int count, int *eof, void *data)
{
struct list_head *tmp;
struct list_head *tmp1;
struct mid_q_entry * mid_entry;
struct cifsSesInfo *ses;
struct cifsTconInfo *tcon;
int i;
int length = 0;
char *buf_start = buf;
char * original_buf = buf;
*beginBuffer = buf + offset;
length =
sprintf(buf,
"Display Internal CIFS Data Structures for Debugging\n"
......@@ -94,7 +99,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
ses->server->secMode,
atomic_read(&ses->server->inFlight));
/* length = sprintf(buf, "\nMIDs: \n");
length = sprintf(buf, "\nMIDs: \n");
buf += length;
spin_lock(&GlobalMid_Lock);
......@@ -107,7 +112,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
buf += length;
}
}
spin_unlock(&GlobalMid_Lock); */
spin_unlock(&GlobalMid_Lock);
}
}
......@@ -152,19 +157,22 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
length = sprintf(buf, "\n");
buf += length;
*eof = 1;
/* BB add code to dump additional info such as TCP session info now */
/*
if (offset >= (buf - buf_start))
{
*beginBuffer = buf;
return 0;
}
*beginBuffer = buf + offset;
if ((buf - buf_start - offset) > count)
return count;
else */
return (buf - buf_start - offset);
/* Now calculate total size of returned data */
length = buf - original_buf;
if(offset + count >= length)
*eof = 1;
if(length < offset) {
*eof = 1;
return 0;
} else {
length = length - offset;
}
if (length > count)
length = count;
return length;
}
int
......@@ -183,12 +191,14 @@ cifs_total_xid_read(char *buf, char **beginBuffer, off_t offset,
#ifdef CONFIG_CIFS_STATS
int
cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
int length, int *eof, void *data)
int count, int *eof, void *data)
{
int item_length,i;
int item_length,i,length;
struct list_head *tmp;
struct cifsTconInfo *tcon;
*beginBuffer = buf + offset;
length = sprintf(buf,
"Resources in use\nCIFS Session: %d\n",
sesInfoAllocCount.counter);
......@@ -235,10 +245,12 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
atomic_read(&tcon->num_reads),
(long long)(tcon->bytes_read));
buf += item_length;
length += item_length;
item_length = sprintf(buf,"\nWrites: %d Bytes: %lld",
atomic_read(&tcon->num_writes),
(long long)(tcon->bytes_written));
buf += item_length;
length += item_length;
item_length = sprintf(buf,
"\nOpens: %d Deletes: %d\nMkdirs: %d Rmdirs: %d",
atomic_read(&tcon->num_opens),
......@@ -250,7 +262,20 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
}
read_unlock(&GlobalSMBSeslock);
buf += sprintf(buf,"\n");
length++;
if(offset + count >= length)
*eof = 1;
if(length < offset) {
*eof = 1;
return 0;
} else {
length = length - offset;
}
if (length > count)
length = count;
return length;
}
#endif
......
......@@ -93,5 +93,5 @@ extern int cifs_setxattr(struct dentry *, const char *, const void *,
size_t, int);
extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t);
extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
#define CIFS_VERSION "1.18"
#define CIFS_VERSION "1.19"
#endif /* _CIFSFS_H */
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