Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
rgw_sal_motr: [CORTX-29221] Fix corner/negative cases in Multipart Li…
Browse files Browse the repository at this point in the history
…stParts API (#127)

The changes will make ListParts API more robust.

Signed-off-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>
  • Loading branch information
DPG17 authored Mar 21, 2022
1 parent 070eda9 commit cfeed8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rgw/rgw_sal_motr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2675,7 +2675,10 @@ int MotrMultipartUpload::list_parts(const DoutPrefixProvider *dpp, CephContext *
int *next_marker, bool *truncated,
bool assume_unsorted)
{
int rc;
int rc = 0;
if (num_parts <= 0 or marker < 0)
return rc;

vector<string> key_vec(num_parts);
vector<bufferlist> val_vec(num_parts);

Expand Down

0 comments on commit cfeed8c

Please sign in to comment.