-
Notifications
You must be signed in to change notification settings - Fork 6k
mds: update change_attr on dirfrag update #60781
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
base: main
Are you sure you want to change the base?
Conversation
review nudge @kotreshhr |
Can one of the admins verify this patch? |
f3a65e1
to
5cc4c0f
Compare
This looks easily reproducible, I guess a py test case under |
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.
https://jenkins.ceph.com/job/ceph-api/89632/console
/home/jenkins-build/build/workspace/ceph-api/src/mds/MDCache.cc:2342:12: error: no member named 'dirstat' in 'CInode::projected_inode'
pi.dirstat.change_attr++;
projected inode doesn't have member dirstat
.
@hit1943 Would you be able to push an update with the fixes? |
done |
there was something wrong with the github to sync changes, it show info: so i push a blank commit and cancel it. Then i can see the files changed: |
…ry fragment, the change_attr of the directory inode and directory dirstat should be always increased Fixes: https://tracker.ceph.com/issues/67831 Signed-off-by: Tod Chen <[email protected]>
cephfs: when dir updates, the change_attr should always be increased by 1
Now, if a new dentry created under a dir frag whose change_attr is smaller than the dirstat's change_attr, the inode and inode->dirstat's change_attr will not increased, so the client will not be aware of updates of the directory by a getattr request.
So We should make sure that when a dentry is created or deleted in any directory fragment, the change_attr of the frag should be larger than the directory dirstat and increased by 1.
Fixes: https://tracker.ceph.com/issues/67831