Skip to content

Commit 94c4ffa

Browse files
committed
tools: make rados ls aware about the locator concept
Fixes: https://tracker.ceph.com/issues/71966 Signed-off-by: Radoslaw Zarzynski <[email protected]>
1 parent be41017 commit 94c4ffa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/rados/rados.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2533,7 +2533,8 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
25332533
#endif // WITH_LIBRADOSSTRIPER
25342534
if (pgid) {
25352535
uint32_t ps;
2536-
if (io_ctx.get_object_pg_hash_position2(i->get_oid(), &ps) || pgid->ps() != ps) {
2536+
if (const auto& key = i->get_locator().size() ? i->get_locator() : i->get_oid();
2537+
io_ctx.get_object_pg_hash_position2(key, &ps) || pgid->ps() != ps) {
25372538
break;
25382539
}
25392540
}

0 commit comments

Comments
 (0)