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

mimic: mds: fix bug that file's max_size doesn't get updated properly #22137

Merged
merged 2 commits into from May 24, 2018

Conversation

ukernel
Copy link
Contributor

@ukernel ukernel commented May 22, 2018

commit de3f3d8 make Locker::_do_cap_update() get called before
adjusting wanted caps. This is wrong because Locker::_do_cap_update()
need uptodate wanted caps to calculate max size.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: https://tracker.ceph.com/issues/24111
(cherry picked from commit 4b13d3f)
MDCache::cow_inode() checks "cap->issued() & CEPH_CAP_ANY_WR" to decide
if it needs to setup client_need_snapflush for the new snap inode. If
cap message flushes dirty caps and releases the same caps, cap->issued()
may have no WR caps when MDCache::cow_inode() gets called. The solution
is temporarily setting NEEDSNAPFLUSH on Capability::state.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 9fb61cd)
@ukernel ukernel added bug-fix cephfs Ceph File System labels May 22, 2018
@ukernel ukernel added this to the mimic milestone May 22, 2018
@batrick
Copy link
Member

batrick commented May 22, 2018

batrick added a commit to batrick/ceph that referenced this pull request May 23, 2018
* refs/pull/22137/head:
	mds: properly setup client_need_snapflush for snap inode
	Revert "mds: properly setup need_snapflush for snapped inode"
@batrick batrick merged commit 0faa143 into ceph:mimic May 24, 2018
batrick added a commit that referenced this pull request May 24, 2018
* refs/pull/22137/head:
	mds: properly setup client_need_snapflush for snap inode
	Revert "mds: properly setup need_snapflush for snapped inode"

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
@ukernel ukernel deleted the mimic-24111 branch June 11, 2018 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants