@@ -897,14 +897,20 @@ BEGIN_CP_FUNC(encrypted_volume) {
897
897
struct libos_encrypted_volume * new_volume = NULL ;
898
898
899
899
size_t off = ADD_CP_OFFSET (sizeof (struct libos_encrypted_volume ));
900
+
900
901
new_volume = (struct libos_encrypted_volume * )(base + off );
901
902
903
+ // TODO (MST): do something with remaining fields of struct
904
+ log_debug ("CP(encrypted_volume): protection_mode=%d file_state_mape=%p" ,
905
+ volume -> protection_mode , volume -> files_state_map ); // TODO (MST): DEBUG
906
+ // - protection_mode -> automatically copied
907
+ // - files_state_map
908
+ // - files_state_map_lock
909
+
902
910
lock (& g_keys_lock );
903
911
DO_CP_MEMBER (encrypted_files_key , volume , new_volume , key );
904
912
unlock (& g_keys_lock );
905
913
906
- // TODO (MST): do something with remaining fields of struct
907
-
908
914
ADD_CP_FUNC_ENTRY (off );
909
915
910
916
if (objp )
@@ -917,11 +923,19 @@ BEGIN_RS_FUNC(encrypted_volume) {
917
923
struct libos_encrypted_volume * volume = (void * )(base + GET_CP_FUNC_ENTRY ());
918
924
__UNUSED (offset );
919
925
920
- CP_REBASE (volume -> key );
921
-
922
926
// TODO (MST): do something with remaining fields of struct
927
+ log_debug ("RS(encrypted_volume): protection_mode=%d file_state_mape=%p" ,
928
+ volume -> protection_mode , volume -> files_state_map ); // TODO (MST): DEBUG
929
+ // - protection_mode -> automatically copied
930
+ // - files_state_map
931
+ // - files_state_map_lock
932
+ if (!create_lock (& volume -> files_state_map_lock )) {
933
+ return - ENOMEM ;
934
+ }
935
+
936
+ CP_REBASE (volume -> key );
923
937
}
924
- END_CP_FUNC (encrypted_volume )
938
+ END_RS_FUNC (encrypted_volume )
925
939
926
940
BEGIN_CP_FUNC (encrypted_file ) {
927
941
__UNUSED (size );
@@ -940,6 +954,7 @@ BEGIN_CP_FUNC(encrypted_file) {
940
954
941
955
new_enc -> use_count = enc -> use_count ;
942
956
DO_CP_MEMBER (str , enc , new_enc , uri );
957
+ DO_CP_MEMBER (str , enc , new_enc , norm_path );
943
958
944
959
DO_CP_MEMBER (encrypted_volume , enc , new_enc , volume );
945
960
@@ -963,6 +978,8 @@ BEGIN_RS_FUNC(encrypted_file) {
963
978
__UNUSED (offset );
964
979
965
980
CP_REBASE (enc -> uri );
981
+ CP_REBASE (enc -> norm_path );
982
+
966
983
CP_REBASE (enc -> volume );
967
984
968
985
/* If the file was used, recreate `enc->pf` based on the PAL handle */
0 commit comments