mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-03 13:07:24 +00:00
Enable notsup_compat_dir by default (#1970)
Few applications create the dir_$folder$ objects and users can enable compat_dir if required. This commit reduces readdir latency by 33%. Also remove notsup_compat_dir from tests since these directories are never created. Fixes #927. References #1643.
This commit is contained in:
parent
ac72bf34dd
commit
8b90cd6ba1
@ -331,15 +331,13 @@ This name will be added to logging messages and user agent headers sent by s3fs.
|
|||||||
s3fs complements lack of information about file/directory mode if a file or a directory object does not have x-amz-meta-mode header.
|
s3fs complements lack of information about file/directory mode if a file or a directory object does not have x-amz-meta-mode header.
|
||||||
As default, s3fs does not complements stat information for a object, then the object will not be able to be allowed to list/modify.
|
As default, s3fs does not complements stat information for a object, then the object will not be able to be allowed to list/modify.
|
||||||
.TP
|
.TP
|
||||||
\fB\-o\fR notsup_compat_dir (disable support of alternative directory names)
|
\fB\-o\fR compat_dir (enable support of alternative directory names)
|
||||||
.RS
|
.RS
|
||||||
s3fs supports the three different naming schemas "dir/", "dir" and "dir_$folder$" to map directory names to S3 objects and vice versa. As a fourth variant, directories can be determined indirectly if there is a file object with a path (e.g. "/dir/file") but without the parent directory.
|
s3fs supports two different naming schemas "dir/" and "dir" to map directory names to S3 objects and vice versa by default. As a third variant, directories can be determined indirectly if there is a file object with a path (e.g. "/dir/file") but without the parent directory. This option enables a fourth variant, "dir_$folder$", created by older applications.
|
||||||
.TP
|
.TP
|
||||||
S3fs uses only the first schema "dir/" to create S3 objects for directories.
|
S3fs uses only the first schema "dir/" to create S3 objects for directories.
|
||||||
.TP
|
.TP
|
||||||
The support for these different naming schemas causes an increased communication effort.
|
The support for these different naming schemas causes an increased communication effort.
|
||||||
.TP
|
|
||||||
If all applications exclusively use the "dir/" naming scheme and the bucket does not contain any objects with a different naming scheme, this option can be used to disable support for alternative naming schemes. This reduces access time and can save costs.
|
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
\fB\-o\fR use_wtf8 - support arbitrary file system encoding.
|
\fB\-o\fR use_wtf8 - support arbitrary file system encoding.
|
||||||
|
@ -90,7 +90,7 @@ static off_t multipart_threshold = 25 * 1024 * 1024;
|
|||||||
static int64_t singlepart_copy_limit = 512 * 1024 * 1024;
|
static int64_t singlepart_copy_limit = 512 * 1024 * 1024;
|
||||||
static bool is_specified_endpoint = false;
|
static bool is_specified_endpoint = false;
|
||||||
static int s3fs_init_deferred_exit_status = 0;
|
static int s3fs_init_deferred_exit_status = 0;
|
||||||
static bool support_compat_dir = true;// default supports compatibility directory type
|
static bool support_compat_dir = false;// default does not support compatibility directory type
|
||||||
static int max_keys_list_object = 1000;// default is 1000
|
static int max_keys_list_object = 1000;// default is 1000
|
||||||
static off_t max_dirty_data = 5LL * 1024LL * 1024LL * 1024LL;
|
static off_t max_dirty_data = 5LL * 1024LL * 1024LL * 1024LL;
|
||||||
static bool use_wtf8 = false;
|
static bool use_wtf8 = false;
|
||||||
@ -4164,9 +4164,15 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(0 == strcmp(arg, "notsup_compat_dir")){
|
if(0 == strcmp(arg, "notsup_compat_dir")){
|
||||||
|
S3FS_PRN_WARN("notsup_compat_dir is enabled by default and a future version will remove this option.");
|
||||||
|
|
||||||
support_compat_dir = false;
|
support_compat_dir = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if(0 == strcmp(arg, "compat_dir")){
|
||||||
|
support_compat_dir = true;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if(0 == strcmp(arg, "enable_content_md5")){
|
if(0 == strcmp(arg, "enable_content_md5")){
|
||||||
S3fsCurl::SetContentMd5(true);
|
S3fsCurl::SetContentMd5(true);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -412,12 +412,14 @@ static const char help_string[] =
|
|||||||
" for a object, then the object will not be able to be allowed to\n"
|
" for a object, then the object will not be able to be allowed to\n"
|
||||||
" list/modify.\n"
|
" list/modify.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" notsup_compat_dir (disable support of alternative directory names)\n"
|
" compat_dir (enable support of alternative directory names)\n"
|
||||||
" s3fs supports the three different naming schemas \"dir/\",\n"
|
" s3fs supports two different naming schemas \"dir/\" and\n"
|
||||||
" \"dir\" and \"dir_$folder$\" to map directory names to S3\n"
|
" \"dir\" to map directory names to S3 objects and\n"
|
||||||
" objects and vice versa. As a fourth variant, directories can be\n"
|
" vice versa by default. As a third variant, directories can be\n"
|
||||||
" determined indirectly if there is a file object with a path (e.g.\n"
|
" determined indirectly if there is a file object with a path (e.g.\n"
|
||||||
" \"/dir/file\") but without the parent directory.\n"
|
" \"/dir/file\") but without the parent directory.\n"
|
||||||
|
" This option enables a fourth variant, \"dir_$folder$\", created by\n"
|
||||||
|
" older applications.\n"
|
||||||
" \n"
|
" \n"
|
||||||
" S3fs uses only the first schema \"dir/\" to create S3 objects for\n"
|
" S3fs uses only the first schema \"dir/\" to create S3 objects for\n"
|
||||||
" directories."
|
" directories."
|
||||||
@ -425,11 +427,6 @@ static const char help_string[] =
|
|||||||
" The support for these different naming schemas causes an increased\n"
|
" The support for these different naming schemas causes an increased\n"
|
||||||
" communication effort.\n"
|
" communication effort.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" If all applications exclusively use the \"dir/\" naming scheme and\n"
|
|
||||||
" the bucket does not contain any objects with a different naming \n"
|
|
||||||
" scheme, this option can be used to disable support for alternative\n"
|
|
||||||
" naming schemes. This reduces access time and can save costs.\nq"
|
|
||||||
"\n"
|
|
||||||
" use_wtf8 - support arbitrary file system encoding.\n"
|
" use_wtf8 - support arbitrary file system encoding.\n"
|
||||||
" S3 requires all object names to be valid UTF-8. But some\n"
|
" S3 requires all object names to be valid UTF-8. But some\n"
|
||||||
" clients, notably Windows NFS clients, use their own encoding.\n"
|
" clients, notably Windows NFS clients, use their own encoding.\n"
|
||||||
|
@ -48,7 +48,6 @@ if [ -n "${ALL_TESTS}" ]; then
|
|||||||
"max_stat_cache_size=100"
|
"max_stat_cache_size=100"
|
||||||
nocopyapi
|
nocopyapi
|
||||||
nomultipart
|
nomultipart
|
||||||
notsup_compat_dir
|
|
||||||
sigv2
|
sigv2
|
||||||
sigv4
|
sigv4
|
||||||
"singlepart_copy_limit=10" # limit size to exercise multipart code paths
|
"singlepart_copy_limit=10" # limit size to exercise multipart code paths
|
||||||
|
Loading…
Reference in New Issue
Block a user