From: Casey Bodley Date: Tue, 3 Feb 2026 15:19:39 +0000 (-0500) Subject: rgw: bucket_stats() uses local variable 'index' X-Git-Tag: v20.2.2~44^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=988f25154f0bf51e10dcd5eeab36cca4def94b8e;p=ceph.git rgw: bucket_stats() uses local variable 'index' Signed-off-by: Casey Bodley (cherry picked from commit a3509f6944f7db71a5930445037c4264b67252cf) --- diff --git a/src/rgw/driver/rados/rgw_bucket.cc b/src/rgw/driver/rados/rgw_bucket.cc index 9128e52af21..06cfa1b5db8 100644 --- a/src/rgw/driver/rados/rgw_bucket.cc +++ b/src/rgw/driver/rados/rgw_bucket.cc @@ -1557,10 +1557,9 @@ static int bucket_stats(rgw::sal::Driver* driver, ::encode_json("explicit_placement", bucket->get_key().explicit_placement, formatter); formatter->dump_string("id", bucket->get_bucket_id()); formatter->dump_string("marker", bucket->get_marker()); - formatter->dump_stream("index_type") << bucket_info.layout.current_index.layout.type; - formatter->dump_int("index_generation", bucket_info.layout.current_index.gen); - formatter->dump_int("num_shards", - bucket_info.layout.current_index.layout.normal.num_shards); + formatter->dump_stream("index_type") << index.layout.type; + formatter->dump_int("index_generation", index.gen); + formatter->dump_int("num_shards", index.layout.normal.num_shards); formatter->dump_string("reshard_status", to_string(bucket_info.layout.resharding)); logrecord_ut.gmtime(formatter->dump_stream("judge_reshard_lock_time")); formatter->dump_bool("object_lock_enabled", bucket_info.obj_lock_enabled());