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
rgw_file: implement variant offset readdir processing #18335
Conversation
src/rgw/rgw_file.cc
Outdated
RGWFileHandle::readdir_offset const &offset) | ||
{ | ||
if (unlikely(!! get<uint64_t*>(&offset))) { | ||
uint64_t* ioff = get<uint64_t*>(offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confused here - the first call to get()
passes &offset
while the others pass offset
also probably worth qualifying as boost::get
- i'm guessing that this resolves to std::get
, so i'm surprised that it compiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a wired-in idiom of boost::variant: the versions that take a pointer argument do not throw and return either a pointer to the stored object, or nullptr if the type coercion fails; the versions that take a reference return either a reference to the stored object or throw boost::bad_get. The apparent alternative is to code to typeid or an interface "which()" that returns an integer index into the defined variants--pretty ugly. I will specify boost::get.
Introduce new rgw_readdir2(...), which in which continues from an arbitrary dirent name, which presumably has been seen in a prior partial enumeration. Add single-file unit test for READDIR cases, librgw_file_marker.cc. Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2c9b840
to
a2c34c5
Compare
a. upstream motivating behavior no longer reproduces b. incorrect stat behavior observed, traced to exact match enforcement Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Let's make sure this goes into luminous - mind filing a tracker ticket? |
jenkins test docs |
thanks @cbodley |
@mattbenjamin do we need to revert "rgw_file: disable FLAG_EXACT_MATCH enforcement" here? |
Introduce new rgw_readdir2(...), which in which continues
from an arbitrary dirent name, which presumably has been
seen in a prior partial enumeration.
Add single-file unit test for READDIR cases, librgw_file_marker.cc.
Signed-off-by: Matt Benjamin mbenjamin@redhat.com