From 892e7129c58436d55a9a376b33ffcc5530139a79 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Thu, 20 Aug 2020 23:41:36 +0900 Subject: [PATCH] Add support for deep archive storage class --- doc/man/s3fs.1 | 3 +-- src/s3fs_util.cpp | 3 ++- src/types.h | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/man/s3fs.1 b/doc/man/s3fs.1 index 3affe25..6f87c21 100644 --- a/doc/man/s3fs.1 +++ b/doc/man/s3fs.1 @@ -82,8 +82,7 @@ delete local file cache when s3fs starts and exits. .TP \fB\-o\fR storage_class (default="standard") store object with specified storage class. -this option replaces the old option use_rrs. -Possible values: standard, standard_ia, onezone_ia, reduced_redundancy, intelligent_tiering, and glacier. +Possible values: standard, standard_ia, onezone_ia, reduced_redundancy, intelligent_tiering, glacier, and deep_archive. .TP \fB\-o\fR use_rrs (default is disable) use Amazon's Reduced Redundancy Storage. diff --git a/src/s3fs_util.cpp b/src/s3fs_util.cpp index a41250e..2a281b2 100644 --- a/src/s3fs_util.cpp +++ b/src/s3fs_util.cpp @@ -1168,7 +1168,8 @@ void show_help () "\n" " storage_class (default=\"standard\")\n" " - store object with specified storage class. Possible values:\n" - " standard, standard_ia, onezone_ia, reduced_redundancy, intelligent_tiering and glacier.\n" + " standard, standard_ia, onezone_ia, reduced_redundancy,\n" + " intelligent_tiering, glacier, and deep_archive.\n" "\n" " use_rrs (default is disable)\n" " - use Amazon's Reduced Redundancy Storage.\n" diff --git a/src/types.h b/src/types.h index a8cb86b..d107e5f 100644 --- a/src/types.h +++ b/src/types.h @@ -30,6 +30,7 @@ class storage_class_t{ REDUCED_REDUNDANCY, INTELLIGENT_TIERING, GLACIER, + DEEP_ARCHIVE, UNKNOWN }; @@ -52,6 +53,8 @@ class storage_class_t{ return "INTELLIGENT_TIERING"; case GLACIER: return "GLACIER"; + case DEEP_ARCHIVE: + return "DEEP_ARCHIVE"; case UNKNOWN: return NULL; } @@ -71,6 +74,8 @@ class storage_class_t{ return INTELLIGENT_TIERING; }else if(0 == strcmp(str, "glacier")){ return GLACIER; + }else if(0 == strcmp(str, "deep_archive")){ + return DEEP_ARCHIVE; }else{ return UNKNOWN; }