Skip to content
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: readdir: do not construct markers w/leading '/' #29670

Merged
merged 1 commit into from Aug 15, 2019

Conversation

mattbenjamin
Copy link
Contributor

@mattbenjamin mattbenjamin commented Aug 14, 2019

This case arises when listing the top directory of a bucket, and,
with proper continued enumeration, would generate a non-terminating
loop if a directory contained names which sort lexically before '/'.

Fixes: https://tracker.ceph.com/issues/41252

Signed-off-by: Matt Benjamin mbenjamin@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test docs
  • jenkins render docs

This case arises when listing the top directory of a bucket, and,
with proper continued enumeration, would generate a non-terminating
loop if a directory contained names which sort lexically before '/'.

Fixes: https://tracker.ceph.com/issues/41252

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
}
path += *s;
++pos;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm having trouble understanding this change from bool first to int pos; are the two not logically equivalent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I staged and reverted a change here, which needed to look past first position. I decided that this logic is preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants