Merge pull request #212 from s3fs-fuse/master

update content of the master to macosx branch.
This commit is contained in:
Takeshi Nakatani 2015-07-20 01:38:42 +09:00
commit 730262f000
9 changed files with 118 additions and 17 deletions

View File

@ -1,16 +1,69 @@
ChangeLog for S3FS
------------------
Version 1.79 -- Jul 19, 2015
issue #60 - Emit user-friendly log messages on failed CheckBucket requests
issue #62 - Remove stray chars from source files
issue #63 - Fix spelling errors
issue #68 - FreeBSD issue
issue #69 - Address clang always true warnings
issue #73 - Small gitignore fixes
issue #74 - url: handle scheme omission
issue #83 - Changed option processing to use strtol() to get a umask
issue #93 - Add simple unit tests for trim functions
issue #100 - CURL handles not properly initialized to use DNS or SSL session caching
issue #101 - Optimized function "bool directory_empty()"
issue #103 - Remove prefix option in s3fs man page - issue#87
issue #104 - fix rename before close
issue #116 - Supported signature version 4
issue #119 - Added new mp_umask option about issue#107, pr#110
issue #124 - Fallback to v2 signatures correctly.
issue #130 - refactor integration tests create/cleanup file
issue #131 - Test ls
issue #132 - Use S3Proxy to run integration tests
issue #134 - Include Content-Type in complete MPU V2 signature
issue #135 - Correct V4 signature for initiate multipart upload
issue #136 - Small fixes to integration tests
issue #137 - Add test for multi-part upload
issue #138 - Fixed bugs, not turn use_cache off and ty to load to end - issue#97
issue #143 - Fixed a bug no use_cache case about fixed #138 - issue#141
issue #144 - Add Travis configuration
issue #146 - add exit handler to cleanup on failures
issue #147 - Use S3Proxy 1.4.0-SNAPSHOT
issue #150 - Fixed a bug not handling fsync - #145
issue #154 - Fixed url-encoding for ampersand etc on sigv4 - Improvement/#149
issue #155 - Fixed a bug: unable to mount bucket subdirectory
issue #156 - Fixed a bug about ssl session sharing with libcurl older 7.23.0 - issue#126
issue #159 - Upgrade to S3Proxy 1.4.0
issue #164 - send the correct Host header when using -o url
issue #165 - Auth v4 refactor
issue #167 - Increased default connecting/reading/writing timeout value
issue #168 - switch to use region specific endpoints to compute correct v4 signature
issue #170 - Reviewed and fixed response codes print in curl.cpp - #157
issue #171 - Support buckets with mixed-case names
issue #173 - Run integration tests via Travis
issue #176 - configure.ac: detect target, if target is darwin (OSX), then #176
issue #177 - Add .mailmap
issue #178 - Update .gitignore
issue #184 - Add usage information for multipart_size
issue #185 - Correct obvious typos in usage and README
issue #190 - Add a no_check_certificate option.
issue #194 - Tilda in a file-name breaks things (EPERM)
issue #198 - Disasble integration tests for Travis
issue #199 - Supported extended attributes(retry)
issue #200 - fixed fallback to sigv2 for bucket create and GCS
issue #202 - Specialize {set,get}xattr for OS X
issue #204 - Add integration test for xattr
issue #207 - Fixed a few small spelling issues.
Version 1.78 -- Sep 15, 2014
issue #29 - Possible to create Debian/Ubuntu packages?(googlecode issue 109)
issue 417(googlecode) - Password file with DOS format is not handled properly
issue #41 - Failed making signature
issue #40 - Moving a directory containing more than 1000 files truncates the
directory
issue #40 - Moving a directory containing more than 1000 files truncates the directory
issue #49 - use_sse is ignored when creating new files
issue #39 - Support for SSE-C
issue #50 - Cannot find pkg-config when configured with any SSL backend except
openssl
issue #50 - Cannot find pkg-config when configured with any SSL backend except openssl
Version 1.77 -- Apr 19, 2014
issue 405(googlecode) - enable_content_md5 Input/output error

View File

@ -20,7 +20,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(s3fs, 1.78)
AC_INIT(s3fs, 1.79)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE()

View File

@ -138,7 +138,7 @@ It is necessary to set this value depending on a CPU and a network band.
This option is lated to fd_page_size option and affects it.
.TP
\fB\-o\fR fd_page_size(default="52428800"(50MB))
number of internal management page size for each file discriptor.
number of internal management page size for each file descriptor.
For delayed reading and writing by s3fs, s3fs manages pages which is separated from object. Each pages has a status that data is already loaded(or not loaded yet).
This option should not be changed when you don't have a trouble with performance.
This value is changed automatically by parallel_count and multipart_size values(fd_page_size value = parallel_count * multipart_size).

View File

@ -1053,14 +1053,14 @@ int S3fsCurl::ParallelMultipartUploadRequest(const char* tpath, headers_t& meta,
// duplicate fd
if(-1 == (fd2 = dup(fd)) || 0 != lseek(fd2, 0, SEEK_SET)){
DPRN("Cloud not duplicate file discriptor(errno=%d)", errno);
DPRN("Could not duplicate file descriptor(errno=%d)", errno);
if(-1 != fd2){
close(fd2);
}
return -errno;
}
if(-1 == fstat(fd2, &st)){
DPRN("Invalid file discriptor(errno=%d)", errno);
DPRN("Invalid file descriptor(errno=%d)", errno);
close(fd2);
return -errno;
}
@ -3192,14 +3192,14 @@ int S3fsCurl::MultipartUploadRequest(const char* tpath, headers_t& meta, int fd,
// duplicate fd
if(-1 == (fd2 = dup(fd)) || 0 != lseek(fd2, 0, SEEK_SET)){
DPRN("Cloud not duplicate file discriptor(errno=%d)", errno);
DPRN("Could not duplicate file descriptor(errno=%d)", errno);
if(-1 != fd2){
close(fd2);
}
return -errno;
}
if(-1 == fstat(fd2, &st)){
DPRN("Invalid file discriptor(errno=%d)", errno);
DPRN("Invalid file descriptor(errno=%d)", errno);
close(fd2);
return -errno;
}

View File

@ -65,7 +65,7 @@ struct filepart
{
bool uploaded; // does finish uploading
std::string etag; // expected etag value
int fd; // base file(temporary full file) discriptor
int fd; // base file(temporary full file) descriptor
off_t startpos; // seek fd point for uploading
ssize_t size; // uploading size
etaglist_t* etaglist; // use only parallel upload

View File

@ -1001,10 +1001,10 @@ ssize_t FdEntity::Write(const char* bytes, off_t start, size_t size)
// NOCACHE_PATH_PREFIX symbol needs for not using cache mode.
// Now s3fs I/F functions in s3fs.cpp has left the processing
// to FdManager and FdEntity class. FdManager class manages
// the list of local file stat and file discriptor in conjunction
// the list of local file stat and file descriptor in conjunction
// with the FdEntity class.
// When s3fs is not using local cache, it means FdManager must
// return new temporary file discriptor at each opening it.
// return new temporary file descriptor at each opening it.
// Then FdManager caches fd by key which is dummy file path
// instead of real file path.
// This process may not be complete, but it is easy way can
@ -1176,7 +1176,7 @@ FdEntity* FdManager::GetFdEntity(const char* path, int existfd)
if(0 == strcmp((*iter).second->GetPath(), path)){
return (*iter).second;
}
// found fd, but it is used another file(file discriptor is recycled)
// found fd, but it is used another file(file descriptor is recycled)
// so returns NULL.
break;
}
@ -1259,7 +1259,7 @@ FdEntity* FdManager::ExistOpen(const char* path, int existfd)
return NULL;
}
}else{
// found fd, but it is used another file(file discriptor is recycled)
// found fd, but it is used another file(file descriptor is recycled)
// so returns NULL.
}
break;

View File

@ -102,7 +102,7 @@ class FdEntity
int refcnt; // reference count
std::string path; // object path
std::string cachepath; // local cache file path
int fd; // file discriptor(tmp file or cache file)
int fd; // file descriptor(tmp file or cache file)
FILE* file; // file pointer(tmp file or cache file)
bool is_modify; // if file is changed, this flag is true

View File

@ -201,8 +201,13 @@ static int s3fs_readdir(const char* path, void* buf, fuse_fill_dir_t filler, off
static int s3fs_access(const char* path, int mask);
static void* s3fs_init(struct fuse_conn_info* conn);
static void s3fs_destroy(void*);
#if defined(__APPLE__)
static int s3fs_setxattr(const char* path, const char* name, const char* value, size_t size, int flags, uint32_t position);
static int s3fs_getxattr(const char* path, const char* name, char* value, size_t size, uint32_t position);
#else
static int s3fs_setxattr(const char* path, const char* name, const char* value, size_t size, int flags);
static int s3fs_getxattr(const char* path, const char* name, char* value, size_t size);
#endif
static int s3fs_listxattr(const char* path, char* list, size_t size);
static int s3fs_removexattr(const char* path, const char* name);
@ -1803,7 +1808,7 @@ static int s3fs_utimens_nocopy(const char* path, const struct timespec ts[2])
FPRNN("[path=%s][mtime=%s]", path, str(ts[1].tv_sec).c_str());
if(0 == strcmp(path, "/")){
DPRNNN("Could not change mtime for maount point.");
DPRNNN("Could not change mtime for mount point.");
return -EIO;
}
if(0 != (result = check_parent_object_access(path, X_OK))){
@ -2884,7 +2889,11 @@ static int set_xattrs_to_header(headers_t& meta, const char* name, const char* v
return 0;
}
#if defined(__APPLE__)
static int s3fs_setxattr(const char* path, const char* name, const char* value, size_t size, int flags, uint32_t position)
#else
static int s3fs_setxattr(const char* path, const char* name, const char* value, size_t size, int flags)
#endif
{
FPRN("[path=%s][name=%s][value=%p][size=%zu][flags=%d]", path, name, value, size, flags);
@ -2893,6 +2902,13 @@ static int s3fs_setxattr(const char* path, const char* name, const char* value,
return 0;
}
#if defined(__APPLE__)
if (position != 0) {
// No resource fork support
return -EINVAL;
}
#endif
int result;
string strpath;
string newpath;
@ -2963,7 +2979,11 @@ static int s3fs_setxattr(const char* path, const char* name, const char* value,
return 0;
}
#if defined(__APPLE__)
static int s3fs_getxattr(const char* path, const char* name, char* value, size_t size, uint32_t position)
#else
static int s3fs_getxattr(const char* path, const char* name, char* value, size_t size)
#endif
{
FPRN("[path=%s][name=%s][value=%p][size=%zu]", path, name, value, size);
@ -2971,6 +2991,13 @@ static int s3fs_getxattr(const char* path, const char* name, char* value, size_t
return -EIO;
}
#if (__APPLE__)
if (position != 0) {
// No resource fork support
return -EINVAL;
}
#endif
int result;
headers_t meta;
xattrs_t xattrs;

View File

@ -314,6 +314,27 @@ ls 'special*' 2>&1 | grep -q 'No such file or directory'
ls 'special~' 2>&1 | grep -q 'No such file or directory'
ls 'specialµ' 2>&1 | grep -q 'No such file or directory'
##########################################################
# Testing extended attributes
##########################################################
rm -f $TEST_TEXT_FILE
touch $TEST_TEXT_FILE
# set value
setfattr -n key1 -v value1 $TEST_TEXT_FILE
getfattr -n key1 --only-values $TEST_TEXT_FILE | grep -q '^value1$'
# append value
setfattr -n key2 -v value2 $TEST_TEXT_FILE
getfattr -n key1 --only-values $TEST_TEXT_FILE | grep -q '^value1$'
getfattr -n key2 --only-values $TEST_TEXT_FILE | grep -q '^value2$'
# remove value
setfattr -x key1 $TEST_TEXT_FILE
! getfattr -n key1 --only-values $TEST_TEXT_FILE
getfattr -n key2 --only-values $TEST_TEXT_FILE | grep -q '^value2$'
#####################################################################
# Tests are finished
#####################################################################