-
Notifications
You must be signed in to change notification settings - Fork 6k
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
hammer: osd: fix fiemap issue in xfs when #extents > 1364 #11615
Conversation
548d612
to
a328e47
Compare
@mslovy Please rebase to get rid of the "This branch is out-of-date" warning. |
@mslovy While you're rebasing, please re-do the cherry-pick of 1a1c126 using Also, please describe how the cherry-pick conflicts were resolved. For complete info, see http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO_backport_commits |
a328e47
to
420f6c0
Compare
Fixes: ceph#17610 Backport: jewel, hammer Signed-off-by: Ning Yao <yaoning@unitedstack.com> (cherry picked from commit 1a1c126) Conflicts: src/os/FileStore.cc in hammer, there is no _do_seek_hole_data() function so remove it in hammer, the logic is in FileStore::fiemap not in _do_fiemap() so port the logic to the else branch in FileStore::fiemap
420f6c0
to
d1e1207
Compare
redo cherry-pick and solve conflict, please review again |
@mslovy Thanks for the backport! I will test it. |
…#extents > 1364 Reviewed-by: Nathan Cutler <ncutler@suse.com>
…#extents > 1364 Reviewed-by: Nathan Cutler <ncutler@suse.com>
@liewegas This PR passed a rados run at http://tracker.ceph.com/issues/17151#note-23 Do you think it can be merged? |
let's make sure this is merged along with the use-after-free fix. otherwise lgtm! |
okey, repush, please review |
@@ -2913,7 +2913,7 @@ int FileStore::fiemap(coll_t cid, const ghobject_t& oid, | |||
} else { | |||
uint64_t i; | |||
struct fiemap_extent *extent = NULL; | |||
struct fiemap_extent *last = NULL; | |||
struct fiemap_extent *last = nullptr; |
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.
please change "nullptr" to 0 (zero) because nullptr is a C++11ism
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.
or just leave the NULL
@mslovy hammer uses C++98 so nullptr will not work, please change it to "NULL" and re-push. |
got it, repushed |
`last` points to fiemap::fm_extends[n], and if fiemap gets freed, we can not reference any of its fieldis. so we could remember the check result before freeing it. Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit c3748fa) Conflicts: src/os/FileStore.cc put the parameter is_last in the right place
ba0f4f7
to
7106f42
Compare
…hen #extents > 1364 Reviewed-by: Nathan Cutler <ncutler@suse.com>
…#extents > 1364 Reviewed-by: Nathan Cutler <ncutler@suse.com>
…#extents > 1364 Reviewed-by: Nathan Cutler <ncutler@suse.com>
…#extents > 1364 Reviewed-by: Nathan Cutler <ncutler@suse.com>
…#extents > 1364 Reviewed-by: Nathan Cutler <ncutler@suse.com>
@athanatos This just passed another rados run at http://tracker.ceph.com/issues/17151#note-38 and it includes the use-after-free fix @liewegas mentioned at #11615 (comment) Do you think it's OK to merge? |
http://tracker.ceph.com/issues/17878
backport: for issue #17610