This fixes an issue when using -o notsup_compat_dir flag, dating back
to its introduction 3ac39d61f84134bb4dbc60b203be154cf56eae1b. The new
default exposed this in my local testing but a test runner bug masked
a test failure in test_external_directory_creation. References #927.
References #1984.
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 should improve performance in many situations. s3fs already
enables the stat cache by default so memorizing noobj makes this more
consistent. Fixes#1901.
Changed s3fs_truncate function.
This change reduces the number of file uploads if the file size is changed.
On macOS, I have found that the truncate call when "size=0" cannot reflect the file size.(This reason is not understood...)
To avoid this, only when "size=0", the flush method is called as before.
Other than that, I found a bug in FdEntity::Open() and fixed it.
Fixes#1875.
PATH_MAX constant is not visible from any of currently included header
files in system with musl libc, where compilation fails with an error
below. The constant is defined in limits.h which is directly include via
climits header file.
fdcache.cpp: In static member function 'static FILE* FdManager::MakeTempFile()':
fdcache.cpp:381:14: error: 'PATH_MAX' was not declared in this scope
381 | char cfn[PATH_MAX];
| ^~~~~~~~
Fixes: d67b83e671f1 ("Allow configuration for temporary files directory")
Previously s3fs only created files that had dirty data and not those
with zero-bytes. Regression from
771bbfeac5e93da96ee39cb32d59e0b5dfe96377. References #1013. Found
via pjdfstest. References #1589.
e01ded9e27f41af45e8614860b29164d13c0101e introduced this compatibility
shim but macOS 10.12 (2016) added this:
https://stackoverflow.com/a/39801564 . Also remove fallback to
time(3) which loses precision.