mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 16:58:55 +00:00
Merge pull request #831 from JoohnSF/onezone_ia_support
Add support for storage class ONEZONE_IA.
This commit is contained in:
commit
8649a68766
@ -78,7 +78,7 @@ delete local file cache when s3fs starts and exits.
|
|||||||
\fB\-o\fR storage_class (default is standard)
|
\fB\-o\fR storage_class (default is standard)
|
||||||
store object with specified storage class.
|
store object with specified storage class.
|
||||||
this option replaces the old option use_rrs.
|
this option replaces the old option use_rrs.
|
||||||
Possible values: standard, standard_ia, and reduced_redundancy.
|
Possible values: standard, standard_ia, onezone_ia and reduced_redundancy.
|
||||||
.TP
|
.TP
|
||||||
\fB\-o\fR use_rrs (default is disable)
|
\fB\-o\fR use_rrs (default is disable)
|
||||||
use Amazon's Reduced Redundancy Storage.
|
use Amazon's Reduced Redundancy Storage.
|
||||||
|
@ -2816,6 +2816,8 @@ int S3fsCurl::PutHeadRequest(const char* tpath, headers_t& meta, bool is_copy)
|
|||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "REDUCED_REDUNDANCY");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "REDUCED_REDUNDANCY");
|
||||||
} else if(STANDARD_IA == GetStorageClass()){
|
} else if(STANDARD_IA == GetStorageClass()){
|
||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "STANDARD_IA");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "STANDARD_IA");
|
||||||
|
} else if(ONEZONE_IA == GetStorageClass()){
|
||||||
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
||||||
}
|
}
|
||||||
// SSE
|
// SSE
|
||||||
if(!is_copy){
|
if(!is_copy){
|
||||||
@ -2945,6 +2947,8 @@ int S3fsCurl::PutRequest(const char* tpath, headers_t& meta, int fd)
|
|||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "REDUCED_REDUNDANCY");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "REDUCED_REDUNDANCY");
|
||||||
} else if(STANDARD_IA == GetStorageClass()){
|
} else if(STANDARD_IA == GetStorageClass()){
|
||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "STANDARD_IA");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "STANDARD_IA");
|
||||||
|
} else if(ONEZONE_IA == GetStorageClass()){
|
||||||
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
||||||
}
|
}
|
||||||
// SSE
|
// SSE
|
||||||
string ssevalue("");
|
string ssevalue("");
|
||||||
@ -3212,6 +3216,8 @@ int S3fsCurl::PreMultipartPostRequest(const char* tpath, headers_t& meta, string
|
|||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "REDUCED_REDUNDANCY");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "REDUCED_REDUNDANCY");
|
||||||
} else if(STANDARD_IA == GetStorageClass()){
|
} else if(STANDARD_IA == GetStorageClass()){
|
||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "STANDARD_IA");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "STANDARD_IA");
|
||||||
|
} else if(ONEZONE_IA == GetStorageClass()){
|
||||||
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
||||||
}
|
}
|
||||||
// SSE
|
// SSE
|
||||||
if(!is_copy){
|
if(!is_copy){
|
||||||
|
@ -163,6 +163,7 @@ typedef std::list<sseckeymap_t> sseckeylist_t;
|
|||||||
enum storage_class_t {
|
enum storage_class_t {
|
||||||
STANDARD,
|
STANDARD,
|
||||||
STANDARD_IA,
|
STANDARD_IA,
|
||||||
|
ONEZONE_IA,
|
||||||
REDUCED_REDUNDANCY
|
REDUCED_REDUNDANCY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4390,6 +4390,8 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
|||||||
S3fsCurl::SetStorageClass(STANDARD);
|
S3fsCurl::SetStorageClass(STANDARD);
|
||||||
}else if(0 == strcmp(storage_class, "standard_ia")){
|
}else if(0 == strcmp(storage_class, "standard_ia")){
|
||||||
S3fsCurl::SetStorageClass(STANDARD_IA);
|
S3fsCurl::SetStorageClass(STANDARD_IA);
|
||||||
|
}else if(0 == strcmp(storage_class, "onezone_ia")){
|
||||||
|
S3fsCurl::SetStorageClass(ONEZONE_IA);
|
||||||
}else if(0 == strcmp(storage_class, "reduced_redundancy")){
|
}else if(0 == strcmp(storage_class, "reduced_redundancy")){
|
||||||
S3fsCurl::SetStorageClass(REDUCED_REDUNDANCY);
|
S3fsCurl::SetStorageClass(REDUCED_REDUNDANCY);
|
||||||
}else{
|
}else{
|
||||||
|
@ -1024,7 +1024,7 @@ void show_help (void)
|
|||||||
"\n"
|
"\n"
|
||||||
" storage_class (default=\"standard\")\n"
|
" storage_class (default=\"standard\")\n"
|
||||||
" - store object with specified storage class. Possible values:\n"
|
" - store object with specified storage class. Possible values:\n"
|
||||||
" standard, standard_ia, and reduced_redundancy.\n"
|
" standard, standard_ia, onezone_ia and reduced_redundancy.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" use_sse (default is disable)\n"
|
" use_sse (default is disable)\n"
|
||||||
" - Specify three type Amazon's Server-Site Encryption: SSE-S3,\n"
|
" - Specify three type Amazon's Server-Site Encryption: SSE-S3,\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user