Remove some unused parameters (#2565)

This commit is contained in:
Andrew Gaul 2024-10-22 20:34:22 +09:00 committed by GitHub
parent cc5271ef2b
commit fe0a62118d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 15 additions and 15 deletions

View File

@ -1461,7 +1461,7 @@ int S3fsCurl::ParallelMultipartUploadRequest(const char* tpath, headers_t& meta,
return -errno;
}
if(0 != (result = s3fscurl.PreMultipartPostRequest(tpath, meta, upload_id, false))){
if(0 != (result = s3fscurl.PreMultipartPostRequest(tpath, meta, upload_id))){
return result;
}
s3fscurl.DestroyCurlHandle();
@ -1533,7 +1533,7 @@ int S3fsCurl::ParallelMixMultipartUploadRequest(const char* tpath, headers_t& me
return -errno;
}
if(0 != (result = s3fscurl.PreMultipartPostRequest(tpath, meta, upload_id, true))){
if(0 != (result = s3fscurl.PreMultipartPostRequest(tpath, meta, upload_id))){
return result;
}
s3fscurl.DestroyCurlHandle();
@ -3892,7 +3892,7 @@ int S3fsCurl::ListBucketRequest(const char* tpath, const char* query)
// Date: Mon, 1 Nov 2010 20:34:56 GMT
// Authorization: AWS VGhpcyBtZXNzYWdlIHNpZ25lZCBieSBlbHZpbmc=
//
int S3fsCurl::PreMultipartPostRequest(const char* tpath, headers_t& meta, std::string& upload_id, bool is_copy)
int S3fsCurl::PreMultipartPostRequest(const char* tpath, headers_t& meta, std::string& upload_id)
{
S3FS_PRN_INFO3("[tpath=%s]", SAFESTRPTR(tpath));
@ -4422,7 +4422,7 @@ bool S3fsCurl::MixMultipartPostComplete()
return result;
}
int S3fsCurl::MultipartHeadRequest(const char* tpath, off_t size, headers_t& meta, bool is_copy)
int S3fsCurl::MultipartHeadRequest(const char* tpath, off_t size, headers_t& meta)
{
int result;
std::string upload_id;
@ -4432,7 +4432,7 @@ int S3fsCurl::MultipartHeadRequest(const char* tpath, off_t size, headers_t& met
S3FS_PRN_INFO3("[tpath=%s]", SAFESTRPTR(tpath));
if(0 != (result = PreMultipartPostRequest(tpath, meta, upload_id, is_copy))){
if(0 != (result = PreMultipartPostRequest(tpath, meta, upload_id))){
return result;
}
DestroyCurlHandle();
@ -4527,7 +4527,7 @@ int S3fsCurl::MultipartRenameRequest(const char* from, const char* to, headers_t
meta["Content-Type"] = S3fsCurl::LookupMimeType(to);
meta["x-amz-copy-source"] = srcresource;
if(0 != (result = PreMultipartPostRequest(to, meta, upload_id, true))){
if(0 != (result = PreMultipartPostRequest(to, meta, upload_id))){
return result;
}
DestroyCurlHandle();

View File

@ -384,13 +384,13 @@ class S3fsCurl
int GetObjectRequest(const char* tpath, int fd, off_t start = -1, off_t size = -1);
int CheckBucket(const char* check_path, bool compat_dir, bool force_no_sse);
int ListBucketRequest(const char* tpath, const char* query);
int PreMultipartPostRequest(const char* tpath, headers_t& meta, std::string& upload_id, bool is_copy);
int PreMultipartPostRequest(const char* tpath, headers_t& meta, std::string& upload_id);
int CompleteMultipartPostRequest(const char* tpath, const std::string& upload_id, const etaglist_t& parts);
int UploadMultipartPostRequest(const char* tpath, int part_num, const std::string& upload_id);
bool MixMultipartPostComplete();
int MultipartListRequest(std::string& body);
int AbortMultipartUpload(const char* tpath, const std::string& upload_id);
int MultipartHeadRequest(const char* tpath, off_t size, headers_t& meta, bool is_copy);
int MultipartHeadRequest(const char* tpath, off_t size, headers_t& meta);
int MultipartUploadRequest(const std::string& upload_id, const char* tpath, int fd, off_t offset, off_t size, etagpair* petagpair);
int MultipartRenameRequest(const char* from, const char* to, headers_t& meta, off_t size);

View File

@ -634,7 +634,7 @@ int FdEntity::Open(const headers_t* pmeta, off_t size, const struct timespec& ts
// So we do not check disk space for this option mode, if there is no enough
// disk space this method will be failed.
//
bool FdEntity::LoadAll(int fd, headers_t* pmeta, off_t* size, bool force_load)
bool FdEntity::LoadAll(int fd, off_t* size, bool force_load)
{
const std::lock_guard<std::mutex> lock(fdent_lock);
@ -1234,7 +1234,7 @@ int FdEntity::NoCachePreMultipartPost(PseudoFdInfo* pseudo_obj)
S3fsCurl s3fscurl(true);
std::string upload_id;
int result;
if(0 != (result = s3fscurl.PreMultipartPostRequest(path.c_str(), orgmeta, upload_id, false))){
if(0 != (result = s3fscurl.PreMultipartPostRequest(path.c_str(), orgmeta, upload_id))){
return result;
}
s3fscurl.DestroyCurlHandle();
@ -1782,7 +1782,7 @@ int FdEntity::RowFlushStreamMultipart(PseudoFdInfo* pseudo_obj, const char* tpat
//
S3fsCurl s3fscurl(true);
std::string upload_id;
if(0 != (result = s3fscurl.PreMultipartPostRequest(path.c_str(), orgmeta, upload_id, true))){
if(0 != (result = s3fscurl.PreMultipartPostRequest(path.c_str(), orgmeta, upload_id))){
S3FS_PRN_ERR("failed to setup multipart upload(create upload id) by errno(%d)", result);
return result;
}

View File

@ -135,7 +135,7 @@ class FdEntity : public std::enable_shared_from_this<FdEntity>
}
bool FindPseudoFdWithLock(int fd) const REQUIRES(FdEntity::fdent_lock);
int Open(const headers_t* pmeta, off_t size, const struct timespec& ts_mctime, int flags);
bool LoadAll(int fd, headers_t* pmeta = nullptr, off_t* size = nullptr, bool force_load = false);
bool LoadAll(int fd, off_t* size = nullptr, bool force_load = false);
int Dup(int fd) {
const std::lock_guard<std::mutex> lock(fdent_lock);
return DupWithLock(fd);

View File

@ -588,7 +588,7 @@ ssize_t PseudoFdInfo::UploadBoundaryLastUntreatedArea(const char* path, headers_
S3fsCurl s3fscurl(true);
std::string tmp_upload_id;
int result;
if(0 != (result = s3fscurl.PreMultipartPostRequest(path, meta, tmp_upload_id, true))){
if(0 != (result = s3fscurl.PreMultipartPostRequest(path, meta, tmp_upload_id))){
S3FS_PRN_ERR("failed to setup multipart upload(create upload id) by errno(%d)", result);
return result;
}

View File

@ -888,7 +888,7 @@ static int get_local_fent(AutoFdEntity& autoent, FdEntity **entity, const char*
return -EIO;
}
// load
if(is_load && !ent->LoadAll(autoent.GetPseudoFd(), &meta)){
if(is_load && !ent->LoadAll(autoent.GetPseudoFd())){
S3FS_PRN_ERR("Could not load file. errno(%d)", errno);
autoent.Close();
return -EIO;
@ -929,7 +929,7 @@ int put_headers(const char* path, headers_t& meta, bool is_copy, bool use_st_siz
}
if(!nocopyapi && !nomultipart && size >= multipart_threshold){
if(0 != (result = s3fscurl.MultipartHeadRequest(strpath.c_str(), size, meta, is_copy))){
if(0 != (result = s3fscurl.MultipartHeadRequest(strpath.c_str(), size, meta))){
return result;
}
}else{