Skip to content

Alicepoolfix#43

Open
Jo-stfc wants to merge 2 commits intov5.8.4patchedfrom
alicepoolfix
Open

Alicepoolfix#43
Jo-stfc wants to merge 2 commits intov5.8.4patchedfrom
alicepoolfix

Conversation

@Jo-stfc
Copy link
Copy Markdown
Collaborator

@Jo-stfc Jo-stfc commented Mar 18, 2026

add EC correction factor for pool space reporting

Comment thread src/XrdCeph/XrdCephOss.cc
Comment thread src/XrdCeph/XrdCephOss.cc Outdated
return 1;
}
// EC correction factor for pool reporting
if (!strncmp(var, "ceph.ECcorrectionFactor", 8)) { // size in bytes
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For readability, it would be good to increase indentation for this block (+1 space for this if, so that it is aligned with the above code, and then +2 spaces for the body of this if).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Comment thread src/XrdCeph/XrdCephOss.cc Outdated
return 1;
}
}
else{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This else should be on the previous line?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

merged

Comment thread src/XrdCeph/XrdCephOss.cc Outdated
return -EINVAL;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Comment thread src/XrdCeph/XrdCephOss.cc Outdated
return 1;
}
// EC correction factor for pool reporting
if (!strncmp(var, "ceph.ECcorrectionFactor", 8)) { // size in bytes
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The last argument for strncmp should be 23 (length of the "ceph.ECcorrectionFactor" string)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Comment thread src/XrdCeph/XrdCephOss.cc
Eroute.Emsg("Config", "Invalid value for ceph.ECcorrectionFactor in config file; enter a value between 0 and 1", configfn, var);
return 1;
}
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think, it's better to add 2 spaces in the beginning of this line, as well as 3 lines below, so that the block matches indentation of the corresponding if.

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.

2 participants