Don't clamp write3 max to 32k
[deb_libnfs.git] / lib / libnfs.c
index d2f60dac7cbc68d716f23212a8487f90ea07ab17..0b831234ac0e84479d0847bf0cfc0e88c28972a5 100644 (file)
 
 #ifdef WIN32
 #include "win32_compat.h"
-#else
-#include <strings.h>
+#endif
+
+#ifdef HAVE_UTIME_H
 #include <utime.h>
-#endif /*WIN32*/
+#endif
 
 #ifdef ANDROID
 #define statvfs statfs
 #include <sys/statvfs.h>
 #endif
 
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h>
@@ -59,7 +68,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <netinet/in.h>
 #include "libnfs-zdr.h"
 #include "libnfs.h"
 #include "libnfs-raw.h"
@@ -1020,7 +1028,7 @@ int nfs_pread_async(struct nfs_context *nfs, struct nfsfh *nfsfh, uint64_t offse
 
        /* trying to read more than maximum server read size, we has to chop it up into smaller
         * reads and collect into a reassembly buffer.
-        * we send all reads in parallell so that performance is still good.
+        * we send all reads in parallel so that performance is still good.
         */
        data->max_offset = offset;
        data->start_offset = offset;
@@ -1200,7 +1208,7 @@ int nfs_pwrite_async(struct nfs_context *nfs, struct nfsfh *nfsfh, uint64_t offs
 
        /* trying to write more than maximum server write size, we has to chop it up into smaller
         * chunks.
-        * we send all writes in parallell so that performance is still good.
+        * we send all writes in parallel so that performance is still good.
         */
        data->max_offset = offset;
        data->start_offset = offset;
@@ -2886,9 +2894,6 @@ int nfs_utime_async(struct nfs_context *nfs, const char *path, struct utimbuf *t
 }
 
 
-
-
-
 /*
  * Async access()
  */
@@ -3441,11 +3446,7 @@ uint64_t nfs_get_readmax(struct nfs_context *nfs)
  */
 uint64_t nfs_get_writemax(struct nfs_context *nfs)
 {
-       /* Some ZDR libraries can not marshall PDUs bigger than this */
-        if (nfs->writemax < 32768) {
-               return nfs->writemax;
-       }
-       return 32768;
+       return nfs->writemax;
 }
 
 void nfs_set_error(struct nfs_context *nfs, char *error_string, ...)