mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-03 13:07:24 +00:00
Add support for glacier storage class.
Just a copy of what have been done in PR #271.
This commit is contained in:
parent
9dc4148743
commit
7d0c66e08a
@ -83,7 +83,7 @@ delete local file cache when s3fs starts and exits.
|
|||||||
\fB\-o\fR storage_class (default="standard")
|
\fB\-o\fR storage_class (default="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, onezone_ia, reduced_redundancy, and intelligent_tiering.
|
Possible values: standard, standard_ia, onezone_ia, reduced_redundancy, intelligent_tiering, and glacier.
|
||||||
.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.
|
||||||
|
@ -3280,6 +3280,8 @@ int S3fsCurl::PutHeadRequest(const char* tpath, headers_t& meta, bool is_copy)
|
|||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
||||||
} else if(INTELLIGENT_TIERING == GetStorageClass()) {
|
} else if(INTELLIGENT_TIERING == GetStorageClass()) {
|
||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "INTELLIGENT_TIERING");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "INTELLIGENT_TIERING");
|
||||||
|
} else if(GLACIER == GetStorageClass()) {
|
||||||
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "GLACIER");
|
||||||
}
|
}
|
||||||
// SSE
|
// SSE
|
||||||
if(!is_copy){
|
if(!is_copy){
|
||||||
@ -3411,6 +3413,8 @@ int S3fsCurl::PutRequest(const char* tpath, headers_t& meta, int fd)
|
|||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
||||||
} else if(INTELLIGENT_TIERING == GetStorageClass()) {
|
} else if(INTELLIGENT_TIERING == GetStorageClass()) {
|
||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "INTELLIGENT_TIERING");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "INTELLIGENT_TIERING");
|
||||||
|
} else if(GLACIER == GetStorageClass()) {
|
||||||
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "GLACIER");
|
||||||
}
|
}
|
||||||
// SSE
|
// SSE
|
||||||
string ssevalue;
|
string ssevalue;
|
||||||
@ -3674,6 +3678,8 @@ int S3fsCurl::PreMultipartPostRequest(const char* tpath, headers_t& meta, string
|
|||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "ONEZONE_IA");
|
||||||
} else if(INTELLIGENT_TIERING == GetStorageClass()) {
|
} else if(INTELLIGENT_TIERING == GetStorageClass()) {
|
||||||
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "INTELLIGENT_TIERING");
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "INTELLIGENT_TIERING");
|
||||||
|
} else if(GLACIER == GetStorageClass()) {
|
||||||
|
requestHeaders = curl_slist_sort_insert(requestHeaders, "x-amz-storage-class", "GLACIER");
|
||||||
}
|
}
|
||||||
// SSE
|
// SSE
|
||||||
if(!is_copy){
|
if(!is_copy){
|
||||||
|
@ -202,7 +202,8 @@ enum storage_class_t {
|
|||||||
STANDARD_IA,
|
STANDARD_IA,
|
||||||
ONEZONE_IA,
|
ONEZONE_IA,
|
||||||
REDUCED_REDUNDANCY,
|
REDUCED_REDUNDANCY,
|
||||||
INTELLIGENT_TIERING
|
INTELLIGENT_TIERING,
|
||||||
|
GLACIER
|
||||||
};
|
};
|
||||||
|
|
||||||
enum acl_t {
|
enum acl_t {
|
||||||
|
@ -4626,6 +4626,8 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
|||||||
S3fsCurl::SetStorageClass(REDUCED_REDUNDANCY);
|
S3fsCurl::SetStorageClass(REDUCED_REDUNDANCY);
|
||||||
}else if(0 == strcmp(storage_class, "intelligent_tiering")){
|
}else if(0 == strcmp(storage_class, "intelligent_tiering")){
|
||||||
S3fsCurl::SetStorageClass(INTELLIGENT_TIERING);
|
S3fsCurl::SetStorageClass(INTELLIGENT_TIERING);
|
||||||
|
}else if(0 == strcmp(storage_class, "glacier")){
|
||||||
|
S3fsCurl::SetStorageClass(GLACIER);
|
||||||
}else{
|
}else{
|
||||||
S3FS_PRN_EXIT("unknown value for storage_class: %s", storage_class);
|
S3FS_PRN_EXIT("unknown value for storage_class: %s", storage_class);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1153,7 +1153,7 @@ void show_help ()
|
|||||||
"\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, onezone_ia, reduced_redundancy and intelligent_tiering.\n"
|
" standard, standard_ia, onezone_ia, reduced_redundancy, intelligent_tiering and glacier.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" use_rrs (default is disable)\n"
|
" use_rrs (default is disable)\n"
|
||||||
" - use Amazon's Reduced Redundancy Storage.\n"
|
" - use Amazon's Reduced Redundancy Storage.\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user