UnifyFS
UnifyFS copied to clipboard
range_server_bget_op() inconsistent logic for op == MDHIM_GET_NEXT
On this line we have if (op != MDHIM_GET_NEXT) {
https://github.com/LLNL/UnifyCR/blob/2cc38254e3bf25a07c2619bf5fdc577725568869/meta/src/range_server.c#L1029
Yet inside the if body there is code to handle op == MDHIM_GET_NEXT
:
https://github.com/LLNL/UnifyCR/blob/2cc38254e3bf25a07c2619bf5fdc577725568869/meta/src/range_server.c#L1042 and https://github.com/LLNL/UnifyCR/blob/2cc38254e3bf25a07c2619bf5fdc577725568869/meta/src/range_server.c#L1055
I'd like to restructure this function to reduce the nesting level and improve readability. Resolving the above inconsistency will help guide the restructuring. Should the handlers for MDHIM_GET_NEXT within the if body be removed, or is the if conditional statement just wrong? Is there a way to test whether this operation is being handled correctly?