Commit Graph

560 Commits

Author SHA1 Message Date
Andrew Gaul
cd9e96a006 Address clang-tidy 18 warnings 2024-03-06 23:06:42 +09:00
Takeshi Nakatani
e89adf6633 Fixed a bug that mounting with ksmid specified to fail 2024-02-18 21:18:50 +09:00
Takeshi Nakatani
fa2bcfc60d Fixed a bug in multi head request parameter 2024-02-12 17:37:03 +09:00
Takeshi Nakatani
ed1d431a1f Improved to output error details when bucket check fails 2024-02-12 17:36:47 +09:00
Takeshi Nakatani
517574c40c Fixed a bug in fdatasync(fsync) 2024-02-06 14:11:37 +09:00
Jason Carpenter
5e6f21a9ff
fix: ListBucket edge cases (#2399) 2024-02-03 13:24:40 +09:00
Takeshi Nakatani
54aa278df0
Fixed errors reported by cppcheck 2.13.0 (#2400) 2024-01-25 00:46:45 +09:00
Takeshi Nakatani
2f9fb74a42
Corrected list_bucket to search in stat cache during creating new file (#2376) 2024-01-24 22:10:14 +09:00
Andrew Gaul
b139507ae6
Simplify locking with C++11 atomics (#2382) 2023-11-27 01:12:49 +09:00
Andrew Gaul
68bbfee8ea
Address clang-tidy modernize-deprecated-headers (#2370) 2023-11-19 10:00:16 +09:00
Takeshi Nakatani
ec8caf64b8 Reverted the macos CI process(using macos-fuse-t) 2023-11-17 21:08:34 +09:00
Eryu Guan
bcacca6599 s3fs: make dir size not zero
Directory has size 0, which looks weired and may confuse users. So fake
dir size as 4k.

Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2023-11-17 17:55:57 +09:00
Andrew Gaul
4845831f93
Convert some const to constexpr (#2342)
This guarantees that the function or value will resolve at compile-time.
2023-11-14 22:15:17 +09:00
Andrew Gaul
0cd73e406d
Address clang-tidy 17 warnings (#2362) 2023-11-12 11:48:08 +09:00
Takeshi Nakatani
e2ac9b45e8 Re-improved updating of temporary stat cache when new file 2023-11-11 07:45:32 +09:00
Takeshi Nakatani
34c379babb Improved updating of temporary stat cache while creating a file 2023-11-10 10:23:15 +09:00
Takeshi Nakatani
7b5111c955 Suppress some message levels on macos 2023-11-09 14:16:43 +09:00
AdamQQQ
3856637cd2
s3fs: add option free_space_ratio to control cache size (#2351)
* Try to cleanup cache directory when initing without enough disk space

Also optimize log messages to print detailed errors to the user.

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>

* s3fs: add option free_space_ratio to control cache size

Since the ensure_diskfree option is not convenient enough, we have added
a new option "-o free_space_ratio" to control the space used by the s3fs
cache based on the current disk size.

The value of this option can be between 0 and 100. It will control the
size of the cache according to this ratio to ensure that the idle ratio
of the disk is greater than this value.

For example, when the value is 10 and the disk space is 50GB, it will
ensure that the disk will reserve at least 50GB * 10% = 5GB of remaining
space.

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>

---------

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>
2023-10-20 18:11:47 +09:00
Andrew Gaul
c5fb42ff10
Use std::unique_ptr in libxml functions (#2317)
References #2261.
2023-09-25 23:46:52 +09:00
Andrew Gaul
01189e99fc
Store mvnode in vector instead of manual linked list (#2312)
This simplifies code and avoids manual memory management.  References #2261.
2023-09-13 22:32:15 +09:00
Takeshi Nakatani
a74034a012 Fixed a bug with setting the statvfs value 2023-09-05 09:03:11 -07:00
AdamQQQ
68c45ce791
s3fs: print unmounting hint when the mount point is stale (#2295)
When the error code returned by the stat information of the mount point
is ENOTCONN, print unmount command hint for user to fix.

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>
2023-09-03 10:50:09 +09:00
Andrew Gaul
7bb9609827
Return errors from AutoFdEntity::Open (#2296)
Found via pjdfstest which creates a PATH_MAX path that should return
NAMETOOLONG.
2023-08-29 22:57:30 +09:00
Andrew Gaul
82107f4b6c
Skip is_uid_include_group when GID available (#2292)
This can avoid an expensive computation which is 20% of test runtime.
2023-08-27 15:24:33 +09:00
Eryu Guan
ee49ca4abf
s3fs: print fuse context in s3fs fuse operations (#2274)
Print fuse context like pid in fuse operations, so we know which process
is triggering this operation.

Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2023-08-27 14:00:57 +09:00
Takeshi Nakatani
6781ef5bd1 Reverted to direct array access instead of std::map emplace 2023-08-20 09:44:38 +09:00
Andrew Gaul
50f6c38c84
Replace xattr_value with std::string (#2280) 2023-08-19 11:12:43 +09:00
Andrew Gaul
2518ff3568
Convert BodyData to std::string (#2276)
This is simpler and avoids some copies.
2023-08-17 22:49:41 +09:00
Andrew Gaul
b2bb12fd2c
Remove unneeded explicit std::string constructors (#2273)
std::string(const char*) implicitly constructs these.  The remaining call sites
requires string literals from C++14.
2023-08-17 22:12:28 +09:00
Andrew Gaul
7f30353fb9
Return std::unique_ptr from S3fsCurl callbacks (#2272)
References #2261.
2023-08-17 22:08:56 +09:00
Andrew Gaul
67e6b9e495
Simplify xattr_value with owned values (#2262)
References #2261.
2023-08-15 22:54:46 +09:00
Andrew Gaul
6823c5a7ec
Enable clang-tidy cppcoreguidelines (#2269) 2023-08-15 22:12:33 +09:00
Andrew Gaul
d1272d296a
Tighten up CLI argument handling (#2268)
This ensures that each option is only handled once.
2023-08-15 21:45:38 +09:00
Andrew Gaul
528a61718d
Convert manual memory allocations to std::unique_ptr (#2253) 2023-08-11 23:26:07 +09:00
Andrew Gaul
26b5658d70
Wrap ps3fscred with std::unique_ptr (#2250)
This removes many manual memory deallocations.
2023-08-06 22:23:25 +09:00
Andrew Gaul
c568a69452
Return std::string from base64 encoding function (#2248)
This is avoids manual memory allocations.
2023-08-06 22:22:02 +09:00
Andrew Gaul
13ad53eef7
Convert most std::list to std::vector (#2247)
This tends to be more efficient due to fewer allocations.  Also fix std::sort
comparator which should be strictly less than.
2023-08-05 10:05:32 +09:00
Andrew Gaul
b29f8d0f2b
Use C++ enum class for most enums (#2241)
This promotes type-safety.
2023-07-30 22:53:17 +09:00
Andrew Gaul
1f04165a33
Convert most str callers to C++11 std::to_string (#2238)
Remaining ones handle timespec.
2023-07-28 18:21:55 +09:00
Andrew Gaul
a4a2841c05
Use C++11 nullptr instead of 0 or NULL (#2234)
This improves type-safety.
2023-07-27 21:56:58 +09:00
Andrew Gaul
6344d74ae3
Replace some raw pointers with std::unique_ptr (#2195)
This simplifies code paths and makes memory leaks less likely.  It
also makes memory ownership more explicit by requiring std::move.
This commit requires C++11.  References #2179.
2023-07-27 09:12:28 +09:00
Takeshi Nakatani
faec0d9d15 Refixed for cppcheck 2.1x 2023-07-26 07:55:33 +09:00
Takeshi Nakatani
d0a944fcaa Fixed data race about fuse_fill_dir_t function and data pointer 2023-07-14 22:32:12 +09:00
Andrew Gaul
537384e9b5
Guard filler calls with filled check (#2215)
Follows on to e650d8c55c.
2023-07-13 22:46:19 +09:00
Andrew Gaul
e650d8c55c
Explicitly handle CommonPrefixes with nocompat_dir (#2212)
Previously the test missed listing implicit directories and another
test was incorrect.  This fixes a regression from 1.91.
2023-07-13 21:15:34 +09:00
Takeshi Nakatani
b2537052ef Fixed data race in threads found thread sanitizer 2023-07-09 20:53:27 +09:00
LiuBingrun
a8edbd8622
fix streamuplod not working (#2204)
fuse_main will do fork to daemonize. if ThreadPool is created before
this, worker thread will not be placed in child process.

Move ThreadPool Init to s3fs_init and destory to s3fs_destory.

Signed-off-by: liubingrun <liubr1@chinatelecom.cn>
2023-07-02 10:56:59 +09:00
Alex Fishman
03066ea29a
Fix extended attribute support when using FUSE-T (#2201)
* Add support for FUSE-T on macos

Signed-off-by: Alex Fishman <alex@fuse-t.org>
Signed-off-by: alex <alex@alex-NUC10.lan>

* Ignore value pointer when size is zero on setattrx

Signed-off-by: Alex Fishman <alex@fuse-t.org>

---------

Signed-off-by: Alex Fishman <alex@fuse-t.org>
Signed-off-by: alex <alex@alex-NUC10.lan>
2023-06-26 22:05:37 +09:00
Takeshi Nakatani
1fc0e52dc3 Fixed mount point stat flag to be thread safe 2023-05-21 13:46:06 +09:00
Andrew Gaul
59c3b26655
Fix clang-tidy 16 nits (#2158) 2023-05-14 01:59:26 +09:00