From 8e4c89fdecee07d9c5d0042e1e989fb8b982d4cb Mon Sep 17 00:00:00 2001 From: "mooredan@suncup.net" Date: Thu, 20 Jan 2011 22:40:59 +0000 Subject: [PATCH] Checkpoint for large file (> 2GB) upload capability needs more testing. git-svn-id: http://s3fs.googlecode.com/svn/trunk@302 df820570-a93a-0410-bd06-b72b767a4274 --- configure.ac | 4 +++- src/s3fs.cpp | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index decdb5c..ec29031 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(s3fs, 1.33) +AC_INIT(s3fs, 1.34) AC_CANONICAL_SYSTEM @@ -9,6 +9,8 @@ AM_INIT_AUTOMAKE() AC_PROG_CXX +CXXFLAGS="$CXXFLAGS -Wall -D_FILE_OFFSET_BITS=64" + PKG_CHECK_MODULES([DEPS], [fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9]) AC_CONFIG_FILES(Makefile src/Makefile test/Makefile) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index c7bd48b..c591c90 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -1367,7 +1367,7 @@ static int put_local_fd_small_file(const char* path, headers_t meta, int fd) { //###rewind(f); - if(debug) syslog(LOG_DEBUG, "upload path=%s size=%llu", path, st.st_size); + // if(debug) syslog(LOG_DEBUG, "upload path=%s size=%zu", path, st.st_size); if(foreground) cout << " uploading[path=" << path << "][fd=" << fd << "][size="< 20MB, then multipart will kick in ///////////////////////////////////////////////////////////// - if(st.st_size > 2147483647) { // 2GB - 1 + if(st.st_size > 68719476735LL ) { // 64GB - 1 // close f ? return -ENOTSUP; } @@ -2125,7 +2126,7 @@ static int s3fs_readlink(const char *path, char *buf, size_t size) { return -errno; } - if (st.st_size < size) { + if (st.st_size < (off_t)size) { size = st.st_size; }