Skip to content

Commit fd76b64

Browse files
rgw: remove keep_tail from RGWObjState
Signed-off-by: Jane Zhu <[email protected]>
1 parent 333e4a9 commit fd76b64

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

src/rgw/driver/dbstore/common/dbstore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ class DBOp {
517517
*
518518
* - RGWObjState. Below are omitted from that struct
519519
* as they seem in-memory variables
520-
* * is_atomic, has_atts, exists, prefetch_data, keep_tail,
520+
* * is_atomic, has_atts, exists, prefetch_data,
521521
* - RGWObjManifest
522522
*
523523
* Extra field added "IsMultipart" to flag multipart uploads,

src/rgw/driver/rados/rgw_putobj_processor.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ int AppendObjectProcessor::prepare(optional_yield y)
717717
tail_placement_rule.storage_class = RGW_STORAGE_CLASS_STANDARD;
718718
}
719719
manifest.set_prefix(cur_manifest->get_prefix());
720-
astate->keep_tail = true;
720+
keep_tail = true;
721721
}
722722
manifest.set_multipart_part_rule(store->ctx()->_conf->rgw_obj_stripe_size, cur_part_num);
723723

@@ -789,6 +789,7 @@ int AppendObjectProcessor::complete(
789789
obj_op.meta.user_data = user_data;
790790
obj_op.meta.zones_trace = zones_trace;
791791
obj_op.meta.modify_tail = true;
792+
obj_op.meta.keep_tail = keep_tail;
792793
obj_op.meta.appendable = true;
793794
//Add the append part number
794795
bufferlist cur_part_num_bl;

src/rgw/driver/rados/rgw_putobj_processor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ class MultipartObjectProcessor : public ManifestObjectProcessor {
259259
uint64_t *cur_accounted_size;
260260
std::string cur_etag;
261261
const std::string unique_tag;
262+
bool keep_tail;
262263

263264
RGWObjManifest *cur_manifest;
264265

@@ -276,7 +277,7 @@ class MultipartObjectProcessor : public ManifestObjectProcessor {
276277
: ManifestObjectProcessor(aio, store, bucket_info, ptail_placement_rule,
277278
owner, obj_ctx, _head_obj, dpp, y, trace),
278279
position(position), cur_size(0), cur_accounted_size(cur_accounted_size),
279-
unique_tag(unique_tag), cur_manifest(nullptr)
280+
unique_tag(unique_tag), keep_tail(false), cur_manifest(nullptr)
280281
{}
281282
int prepare(optional_yield y) override;
282283
int complete(size_t accounted_size, const std::string& etag,

src/rgw/driver/rados/rgw_rados.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5011,8 +5011,6 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx,
50115011
pmanifest = &manifest;
50125012
} else {
50135013
pmanifest = amanifest;
5014-
/* don't send the object's tail for garbage collection */
5015-
astate->keep_tail = true;
50165014
}
50175015

50185016
if (copy_first) {
@@ -5662,7 +5660,7 @@ int RGWRados::bucket_suspended(const DoutPrefixProvider *dpp, rgw_bucket& bucket
56625660

56635661
int RGWRados::Object::complete_atomic_modification(const DoutPrefixProvider *dpp, bool keep_tail, optional_yield y)
56645662
{
5665-
if ((!manifest) || state->keep_tail || keep_tail)
5663+
if ((!manifest) || keep_tail)
56665664
return 0;
56675665

56685666
cls_rgw_obj_chain chain;

src/rgw/rgw_sal_store.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ struct RGWObjState {
3737
bool has_data{false};
3838
bufferlist data;
3939
bool prefetch_data{false};
40-
bool keep_tail{false};
4140
bool is_olh{false};
4241
bufferlist olh_tag;
4342
uint64_t pg_ver{false};
@@ -73,7 +72,6 @@ struct RGWObjState {
7372
data = rhs.data;
7473
}
7574
prefetch_data = rhs.prefetch_data;
76-
keep_tail = rhs.keep_tail;
7775
is_olh = rhs.is_olh;
7876
objv_tracker = rhs.objv_tracker;
7977
pg_ver = rhs.pg_ver;

0 commit comments

Comments
 (0)