-
-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nfs feature vfd swmr #1208
Nfs feature vfd swmr #1208
Conversation
Feature/vfd swmr
VFD SWMR: Updates the mirror VFD tests so they compile and pass tests…
Feature/vfd swmr
Feature/vfd swmr
Feature/vfd swmr
Feature/vfd swmr
src/H5Pfapl.c src/H5Fvfd_swmr.c src/H5Fpublic.h src/H5Fpkg.h src/H5Fprivate.h 2) For VFD SWMR testing, add private property for checksum generation of metadata files: src/H5Fint.c src/H5Fvfd_swmr.c src/H5Pfapl.c src/H5Fpkg.h src/H5Fprivate.h 3) Fix the following in H5F_vfd_swmr_init() and H5F_vfd_swmr_close_or_flush(): (a) Allocate metadata file index right after metadata file header. (b) Set tick number to 0 when creating header and index for file open case. (c) Remove tick number increment at file close. src/H5Fvfd_swmr.c src/H5Ftest.c 4) To be consistent with the RFC, change the name for field "chksum" to "checksum" in struct H5FD_vfd_swmr_idx_entry_t: src/H5FDprivate.h src/H5FDtest.c src/H5FDvfd_swmr.c src/H5Ftest.c src/H5PB.c 4) Add tests for NFS/updater test/vfd_swmr.c 5) Modify common routine init_vfd_swmr_config() to accept updater_file_path test/vfd_swmr_common.c test/vfd_swmr_common.h 6) Changes to the tests due to the common routine init_vfd_swmr_config(): test/vfd_swmr_addrem_writer.c test/vfd_swmr_attrdset_writer.c test/vfd_swmr_bigset_writer.c test/vfd_swmr_dsetchks_writer.c test/vfd_swmr_dsetops_writer.c test/vfd_swmr_generator.c test/vfd_swmr_gfail_writer.c test/vfd_swmr_gperf_writer.c test/vfd_swmr_group_writer.c test/vfd_swmr_reader.c test/vfd_swmr_remove_reader.c test/vfd_swmr_remove_writer.c test/vfd_swmr_sparse_reader.c test/vfd_swmr_sparse_writer.c test/vfd_swmr_vlstr_reader.c test/vfd_swmr_vlstr_writer.c test/vfd_swmr_writer.c test/page_buffer.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments are mostly trivial. After Vailin check them and make change as appropriate. I don't need to review them again.
src/H5Fint.c
Outdated
hbool_t ci_write = FALSE; /* Whether MDC CI write requested */ | ||
hbool_t file_create = FALSE; /* Creating a new file or not */ | ||
H5F_vfd_swmr_config_t * vfd_swmr_config_ptr = NULL; /* Points to VFD SMWR config info */ | ||
H5F_generate_md_ck_cb_t cb_info = {NULL}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May add a comment on what this callback is for like the other variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/H5Fint.c
Outdated
hbool_t evict_on_close; /* Evict on close value from plist */ | ||
hbool_t use_file_locking = TRUE; /* Using file locks? */ | ||
hbool_t ci_load = FALSE; /* Whether MDC ci load requested */ | ||
hbool_t ci_write = FALSE; /* Whether MDC CI write requested */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: CI in the comment may ci like the last line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/H5Fprivate.h
Outdated
+ 4 /* Page size */ \ | ||
+ 8 /* Sequence number */ \ | ||
+ 8 /* Tick number */ \ | ||
+ 8 /* Chnage list offset */ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: typo - Chnage should be Change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/H5Fprivate.h
Outdated
* | ||
* An array of instances of H5F_vfd_swmr_updater_cl_entry_t of length equal to | ||
* the number of metadata pages and multi-page metadata entries modified in | ||
* the past tick is used ot aseemble the assoicated data in preparation for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo: "used ot aseemble the assoicated" should be "used to assemble the associated"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/H5Fprivate.h
Outdated
* array of H5F_vfd_swmr_updater_cl_ entry_t whose base address | ||
* is stored in the change_list field below. This value is also the | ||
* number of metadata pages and multi-page metadata entries that have | ||
* been modified in the past tick |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor add a '.' at the end of "past tick"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
test/vfd_swmr.c
Outdated
|
||
/* Remove all the updater files if exist: <updater_file_path>.<i> */ | ||
for (i = 0;; i++) { | ||
sprintf(ud_name, "%s.%lu", updater_file_path, i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May still use HDsprintf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
test/vfd_swmr.c
Outdated
static herr_t | ||
verify_ud_chk(char *md_file_path, char *ud_file_path) | ||
{ | ||
char chk_name[1024 + 4]; /* Checksum file name */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Should we use a constant to replace 1024 here? Also should the local variables be initialized? Should the ";" in 'FAIL_STACK_ERROR; ' and 'TEST_ERROR;' be removed or make them consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the constant for chk_name[].
As for the ";" after FAIL_STACK_ERROR and TEST_ERROR, I will add ";" to be consistent with most of those calls in this file. I checked the files in the test directory, some of those calls have ";" and some without.
test/vfd_swmr.c
Outdated
* Purpose: This is the callback function used by | ||
* test_updater_generate_md_checksums() when the | ||
* H5F_ACS_GENERATE_MD_CK_CB_NAME property is set in fapl. | ||
* --Opens and read the metadata file into a buffer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: Open instead of Opens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
test/vfd_swmr.c
Outdated
cb_info.func = md_ck_cb; | ||
|
||
/* Activate private property to generate checksums for updater's metadata file */ | ||
H5Pset(fapl, H5F_ACS_GENERATE_MD_CK_CB_NAME, &cb_info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check the return value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
test/vfd_swmr.c
Outdated
TEST_ERROR; | ||
} | ||
else { | ||
fid = H5Fcreate(FILENAME4, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check the returned values of APIs in this block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this branch. It worked with some basic tests.
…oup/hdf5 into nfs_feature_vfd_swmr
No description provided.