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

jewel: rgw: user quota did not work well on multipart upload #17277

Merged
merged 1 commit into from
Sep 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/rgw/rgw_rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6240,9 +6240,16 @@ int RGWRados::Object::Write::write_meta(uint64_t size,
string index_tag;
uint64_t epoch;
int64_t poolid;

bool orig_exists = state->exists;
uint64_t orig_size = state->size;
bool orig_exists;
uint64_t orig_size;

if (!reset_obj) { //Multipart upload, it has immutable head.
orig_exists = false;
orig_size = 0;
} else {
orig_exists = state->exists;
orig_size = state->size;
}

bool versioned_target = (meta.olh_epoch > 0 || !obj.get_instance().empty());

Expand Down