summaryrefslogtreecommitdiff
path: root/source3/smbwrapper
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-04 06:22:08 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-04 06:22:08 +0000
commit5ade894f32377ffaed3fc085810892509a6e8c66 (patch)
tree95f667069884aea60a0abcb97aab5c336683e9c9 /source3/smbwrapper
parentd71c04f927cbcbaae0708c1533748caac20ee5af (diff)
downloadsamba-5ade894f32377ffaed3fc085810892509a6e8c66.tar.gz
samba-5ade894f32377ffaed3fc085810892509a6e8c66.tar.bz2
samba-5ade894f32377ffaed3fc085810892509a6e8c66.zip
modified cli_read() and cli_write() to issue multiple outstanding
read/write requests for large reads. up to max_mux requests may be outstanding. This gives _much_ better throughput and should allow smbsh to saturate just about any network. this is an implementation of the "fast SMB" method I described on the CIFS list a couple of months back. (This used to be commit c728d1c5d6e4626d2f8e318eab4df32acc8cb505)
Diffstat (limited to 'source3/smbwrapper')
-rw-r--r--source3/smbwrapper/smbw.c5
-rw-r--r--source3/smbwrapper/smbw.h1
-rw-r--r--source3/smbwrapper/smbw_dir.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c
index 11192bedd7..e933fc3636 100644
--- a/source3/smbwrapper/smbw.c
+++ b/source3/smbwrapper/smbw.c
@@ -523,7 +523,7 @@ int smbw_open(const char *fname, int flags, mode_t mode)
goto failed;
}
file->srv = srv;
- file->fd = open("/dev/null", O_WRONLY);
+ file->fd = open(SMBW_DUMMY, O_WRONLY);
if (file->fd == -1) {
errno = EMFILE;
goto failed;
@@ -567,7 +567,8 @@ ssize_t smbw_read(int fd, void *buf, size_t count)
struct smbw_file *file;
int ret;
- DEBUG(4,("%s %d\n", __FUNCTION__, (int)count));
+ DEBUG(4,("%s %d\n",
+ __FUNCTION__, (int)count));
smbw_busy++;
diff --git a/source3/smbwrapper/smbw.h b/source3/smbwrapper/smbw.h
index 5fc864456e..af48061ff0 100644
--- a/source3/smbwrapper/smbw.h
+++ b/source3/smbwrapper/smbw.h
@@ -20,6 +20,7 @@
*/
#define SMBW_PREFIX "/smb/"
+#define SMBW_DUMMY "/dev/null"
#define SMBW_CLI_FD 512
#define SMBW_MAX_OPEN 8192
diff --git a/source3/smbwrapper/smbw_dir.c b/source3/smbwrapper/smbw_dir.c
index c437a53e1f..a127048793 100644
--- a/source3/smbwrapper/smbw_dir.c
+++ b/source3/smbwrapper/smbw_dir.c
@@ -175,7 +175,7 @@ int smbw_dir_open(const char *fname)
cur_dir = NULL;
- fd = open("/dev/null", O_WRONLY);
+ fd = open(SMBW_DUMMY, O_WRONLY);
if (fd == -1) {
errno = EMFILE;
goto failed;