]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
posixdriver: add bde.flags to in bucket cache serde cycle
authorMatt Benjamin <mbenjamin@redhat.com>
Sun, 15 Feb 2026 15:21:28 +0000 (10:21 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Tue, 17 Feb 2026 17:39:13 +0000 (12:39 -0500)
commit9962452d790e941f48d4ffeac3aa5bfcf2ead6f2
tree8a3d777b5ed52d8342a270df0a7fbf1918178993
parent1503ab1ca7430ce66e025879a17f4834f5818bc5
posixdriver: add bde.flags to in bucket cache serde cycle

The upstream logic (mostly?) correctly uses bde.flags when filling
the cache for versioned objects, but cache ser(de)ialization has
been discarding that member.

This change suppresses the visible result where RGW incorrectly produces
multiple versions in non-versioned listing because none uniquely sets
FLAG_CURRENT:

mbenjamin@fedora:~/dev/rgw/s3_py/python$ s3cmd ls s3://sheik2
2026-02-14 22:44           22  s3://sheik2/ginfizz_1
2026-02-14 22:44           22  s3://sheik2/ginfizz_1
2026-02-14 22:44           22  s3://sheik2/ginfizz_1
2026-02-14 22:44           22  s3://sheik2/ginfizz_2
2026-02-14 22:44           22  s3://sheik2/ginfizz_2
2026-02-14 22:44           22  s3://sheik2/ginfizz_2

Corrected result is:

mbenjamin@fedora:~/dev/rgw/s3_py/python$ s3cmd ls s3://sheik2
2026-02-14 22:44           22  s3://sheik2/ginfizz_1
2026-02-14 22:44           22  s3://sheik2/ginfizz_2

Cached listings for versions are still incorrect in containing an
an extra entry for the "current" version in with empty instance
(from the Symlink)--the visible effect being that list-object-versions
output is incorrect (no entry is sent with IsLatest, after the
empty instance version has been filtered out).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/driver/posix/bucket_cache.h