Skip to content
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

quadiron integration #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

quadiron integration #1

wants to merge 3 commits into from

Conversation

vrancurel
Copy link

No description provided.

@vrancurel vrancurel force-pushed the feat/quadiron-fnt branch 2 times, most recently from 4b9d6ff to 63d230a Compare December 7, 2018 17:59
Copy link

@lamphamsy lamphamsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice. Are there CI tests for the repo?

src/erasurecode_helpers.c Show resolved Hide resolved
@vrancurel vrancurel force-pushed the feat/quadiron-fnt branch 2 times, most recently from 4ebab59 to 195a52d Compare February 7, 2019 02:40
src/erasurecode_helpers.c Show resolved Hide resolved
src/erasurecode_helpers.c Show resolved Hide resolved
src/erasurecode_helpers.c Outdated Show resolved Hide resolved
src/erasurecode_helpers.c Outdated Show resolved Hide resolved
src/erasurecode_helpers.c Show resolved Hide resolved

int quadiron_fnt_exit(void *desc)
{
quadiron_fnt_descriptor *quadiron_fnt_desc = NULL;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why initialize to NULL? You're setting a value just below.


size_t quadiron_fnt_common_get_metadata_size(void *desc, int block_size)
{
quadiron_fnt_descriptor *quadiron_fnt_desc = NULL;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, useless init

void * quadiron_fnt_common_init(struct ec_backend_args *args, void *backend_sohandle,
int systematic)
{
quadiron_fnt_descriptor *desc = NULL;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, useless init

quadiron_fnt_descriptor *desc = NULL;

desc = (quadiron_fnt_descriptor *)malloc(sizeof(quadiron_fnt_descriptor));
if (NULL == desc) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for Yoda-condition with modern compiler (same remark apply below).

goto error;
}

func_handle.vptr = dlsym(backend_sohandle, "quadiron_hex_dump");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No func_handle.vptr = NULL; before? No NULL check after?

The function get_data_ptr_from_fragment() actually returns a pointer
to the metadata header. In most of the code it is the expected behavior but in
fragments_to_string() we want the actual content without the metadata.
Creation of a new function prefixed by _ to address this particular case.
The code already has some logic to support more than 32 fragments (bitvalues)
but it is currently not fully functional. This changeset brings full support
to backends supporting more than 32 fragments, especially by changing from
bitmaps to bitvalues in some specific functions.
QuadIron is an open source library that supports a large number of
parities in a systematic or non-systematic setting. This changeset also
include the proper unit tests to validate the new backend.
@vrancurel vrancurel force-pushed the feat/quadiron-fnt branch 2 times, most recently from a6420ca to dfb5e62 Compare February 7, 2019 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants