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

mds: include nfiles/nsubdirs of directory inode in MClientCaps #21668

Merged
merged 1 commit into from
May 7, 2018

Conversation

ukernel
Copy link
Contributor

@ukernel ukernel commented Apr 26, 2018

Directory inode's dirstat gets updated by request reply, but not by
cap message. This causes problem for following case.

  1. MDS modifies a directory
  2. MDS issues CEPH_CAP_ANY_SHARED to client
  3. The client satifies stat(2) by its cached metadata.

Signed-off-by: "Yan, Zheng" zyan@redhat.com
Fixes: http://tracker.ceph.com/issues/23855

@ukernel ukernel added bug-fix cephfs Ceph File System labels Apr 26, 2018
change_attr(0),
truncate_seq(0),
time_warp_seq(0),
osd_epoch_barrier(oeb),
Copy link
Member

Choose a reason for hiding this comment

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

This was accidentally removed. It's initializing osd_epoch_barrier(0) (the default). Causes: http://tracker.ceph.com/issues/23927

@ukernel
Copy link
Contributor Author

ukernel commented May 1, 2018

fixed, thanks

@batrick
Copy link
Member

batrick commented May 2, 2018

2018-05-02T14:27:18.543 INFO:tasks.cephfs_test_runner:======================================================================
2018-05-02T14:27:18.543 INFO:tasks.cephfs_test_runner:FAIL: test_barrier (tasks.cephfs.test_full.TestClusterFull)
2018-05-02T14:27:18.543 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2018-05-02T14:27:18.544 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2018-05-02T14:27:18.544 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_wip-pdonnell-testing-20180501.191840/qa/tasks/cephfs/test_full.py", line 116, in test_barrier
2018-05-02T14:27:18.544 INFO:tasks.cephfs_test_runner:    self.assertEqual(mount_a_epoch, mount_a_initial_epoch)
2018-05-02T14:27:18.544 INFO:tasks.cephfs_test_runner:AssertionError: 31 != 29

From: /ceph/teuthology-archive/pdonnell-2018-05-01_20:44:02-kcephfs-wip-pdonnell-testing-20180501.191840-testing-basic-smithi/2463226/teuthology.log

Because kclient not patched yet?

@ukernel
Copy link
Contributor Author

ukernel commented May 3, 2018

patch for kclient is buggy

@ukernel
Copy link
Contributor Author

ukernel commented May 3, 2018

previous patch is buggy, it didn't check if cap message contains valid dirstat

Directory inode's dirstat gets updated by request reply, but not by
cap message. This causes problem for following case.

1. MDS modifies a directory
2. MDS issues CEPH_CAP_ANY_SHARED to client
3. The client satifies stat(2) by its cached metadata.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/23855
@batrick batrick merged commit ee2c628 into ceph:master May 7, 2018
batrick added a commit that referenced this pull request May 7, 2018
* refs/pull/21668/head:
	mds: include nfiles/nsubdirs of directory inode in MClientCaps

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

Successfully merging this pull request may close these issues.

2 participants