mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-10 14:50:58 +00:00
Merge pull request #471 from ggtakec/master
Added use_xattr option for #467 and #460
This commit is contained in:
commit
9f174d7614
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@
|
||||
/stamp-h1
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.h.in~
|
||||
/configure
|
||||
/depcomp
|
||||
/test-driver
|
||||
|
@ -205,6 +205,12 @@ Because s3fs always checks MD5 when uploading large object, this option does not
|
||||
\fB\-o\fR iam_role ( default is no IAM role )
|
||||
This option requires the IAM role name or "auto". If you specify "auto", s3fs will automatically use the IAM role names that are set to an instance. If you specify this option without any argument, it is the same as that you have specified the "auto".
|
||||
.TP
|
||||
\fB\-o\fR use_xattr ( default is not handling the extended attribute )
|
||||
Enable to handle the extended attribute(xattrs).
|
||||
If you set this option, you can use the extended attribute.
|
||||
For example, encfs and ecryptfs need to support the extended attribute.
|
||||
Notice: if s3fs handles the extended attribute, s3fs can not work to copy command with preserve=mode.
|
||||
.TP
|
||||
\fB\-o\fR noxmlns - disable registing xml name space.
|
||||
disable registing xml name space for response of ListBucketResult and ListVersionsResult etc. Default name space is looked up from "http://s3.amazonaws.com/doc/2006-03-01".
|
||||
This option should not be specified now, because s3fs looks up xmlns automatically after v1.66.
|
||||
|
26
src/s3fs.cpp
26
src/s3fs.cpp
@ -121,6 +121,7 @@ static bool is_s3fs_uid = false;// default does not set.
|
||||
static bool is_s3fs_gid = false;// default does not set.
|
||||
static bool is_s3fs_umask = false;// default does not set.
|
||||
static bool is_remove_cache = false;
|
||||
static bool is_use_xattr = false;
|
||||
static bool create_bucket = false;
|
||||
static int64_t singlepart_copy_limit = FIVE_GB;
|
||||
static bool is_specified_endpoint = false;
|
||||
@ -4694,6 +4695,21 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
||||
S3fsCurl::SetUserAgentFlag(false);
|
||||
return 0;
|
||||
}
|
||||
if(0 == strcmp(arg, "use_xattr")){
|
||||
is_use_xattr = true;
|
||||
return 0;
|
||||
}else if(0 == STR2NCMP(arg, "use_xattr=")){
|
||||
const char* strflag = strchr(arg, '=') + sizeof(char);
|
||||
if(0 == strcmp(strflag, "1")){
|
||||
is_use_xattr = true;
|
||||
}else if(0 == strcmp(strflag, "0")){
|
||||
is_use_xattr = false;
|
||||
}else{
|
||||
S3FS_PRN_EXIT("option use_xattr has unknown parameter(%s).", strflag);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// debug option for s3fs
|
||||
//
|
||||
@ -4970,10 +4986,12 @@ int main(int argc, char* argv[])
|
||||
s3fs_oper.access = s3fs_access;
|
||||
s3fs_oper.create = s3fs_create;
|
||||
// extended attributes
|
||||
s3fs_oper.setxattr = s3fs_setxattr;
|
||||
s3fs_oper.getxattr = s3fs_getxattr;
|
||||
s3fs_oper.listxattr = s3fs_listxattr;
|
||||
s3fs_oper.removexattr = s3fs_removexattr;
|
||||
if(is_use_xattr){
|
||||
s3fs_oper.setxattr = s3fs_setxattr;
|
||||
s3fs_oper.getxattr = s3fs_getxattr;
|
||||
s3fs_oper.listxattr = s3fs_listxattr;
|
||||
s3fs_oper.removexattr = s3fs_removexattr;
|
||||
}
|
||||
|
||||
if(!s3fs_init_global_ssl()){
|
||||
S3FS_PRN_EXIT("could not initialize for ssl libraries.");
|
||||
|
@ -1114,6 +1114,13 @@ void show_help (void)
|
||||
" to an instance. If you specify this option without any argument, it\n"
|
||||
" is the same as that you have specified the \"auto\".\n"
|
||||
"\n"
|
||||
" use_xattr (default is not handling the extended attribute)\n"
|
||||
" Enable to handle the extended attribute(xattrs).\n"
|
||||
" If you set this option, you can use the extended attribute.\n"
|
||||
" For example, encfs and ecryptfs need to support the extended attribute.\n"
|
||||
" Notice: if s3fs handles the extended attribute, s3fs can not work to\n"
|
||||
" copy command with preserve=mode.\n"
|
||||
"\n"
|
||||
" noxmlns (disable registering xml name space)\n"
|
||||
" disable registering xml name space for response of \n"
|
||||
" ListBucketResult and ListVersionsResult etc. Default name \n"
|
||||
|
Loading…
Reference in New Issue
Block a user