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: interned RGWFileHandle objects need parent refs #13084

Merged
merged 1 commit into from Jan 24, 2017

Conversation

Projects
None yet
4 participants
@mattbenjamin
Contributor

mattbenjamin commented Jan 24, 2017

RGW NFS fhcache/RGWFileHandle operators assume existence of the
full chain of parents from any object to the its fs_root--this is
a consequence of the weakly-connected namespace design goal, and
not a defect.

This change ensures the invariant by taking a parent ref when
objects are interned (when a parent ref is guaranteed). Parent
refs are returned when objects are destroyed--essentially by the
invariant, such a ref must exist.

The extra ref is omitted when parent->is_root(), as that node is
not in the LRU cache.

Fixes: http://tracker.ceph.com/issues/18650

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

@mattbenjamin mattbenjamin requested review from yehudasa and cbodley Jan 24, 2017

@mattbenjamin mattbenjamin added this to the jewel milestone Jan 24, 2017

@mattbenjamin

This comment has been minimized.

Contributor

mattbenjamin commented Jan 24, 2017

@yehudasa, @cbodley this may be a root cause for 1414324; cherry-picked from my DNM attrs PR; (hoping for speedy merge so can cp to downstream)

@dang

dang approved these changes Jan 24, 2017

rgw_file: interned RGWFileHandle objects need parent refs
RGW NFS fhcache/RGWFileHandle operators assume existence of the
full chain of parents from any object to the its fs_root--this is
a consequence of the weakly-connected namespace design goal, and
not a defect.

This change ensures the invariant by taking a parent ref when
objects are interned (when a parent ref is guaranteed).  Parent
refs are returned when objects are destroyed--essentially by the
invariant, such a ref must exist.

The extra ref is omitted when parent->is_root(), as that node is
not in the LRU cache.

Fixes: http://tracker.ceph.com/issues/18650

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

@mattbenjamin mattbenjamin merged commit 3534595 into ceph:master Jan 24, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment