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: handle rctime updates for snaps #42894
Conversation
Conditionally update snap rctime only if snap btime is greater than new rctime. If snapshots are taken frequently when lazyio is being used, then the rctime may not be updated for the snapshot for which the capabilities are flushed by the client, but a subsequent snapshot. This is due to the fact that this patch assumes that all relevant data writes have been persisted to the OSDs and caps flushed to the MDS before the snapshot is taken. To avoid skipping a snapshot or two for correct rctime updates to snapshot directories, the client should wait for at least twice the client_oc_max_dirty_age duration before creating the snapshot dir. Fixes: https://tracker.ceph.com/issues/50238 Signed-off-by: Milind Changire <mchangir@redhat.com>
Is that enforced in any way? What happens if you don't wait? Does this apply to the kclient too? |
pin->dirty_old_rstats.insert(last); | ||
} else { | ||
break; | ||
} |
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.
This indentation looks really weird.
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.
that's probably how the TAB character is emulated by the web browser code display component
things look okay in the code (Vim editor)
The waiting period is not enforced by MDS in any way. Since things are asynchronous between snap creation and data and metadata flush, its difficult to uniformly enforce the rstat updates for various rstat update scenarios. So, this patch updates snap rstat only for snaps whose |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
Fixing rctime is probably going to take a redesign of how recursive stats are tracked in the MDS. Till that gets prioritized, designed and implemented, users can set (correct) rctime as a workaround. This is tracked by #37938 |
Hmm, does that PR work on snapshots? I would have thought not since users are generally prevented from writing updates in to them. |
PR #37938 works on non-snapshotted inodes. This PR was aimed at fixing issues with rctime in general. @mchangir IIRC, you ran into rctime issues with non-snapshotted inodes too? |
Conditionally update snap rctime only if snap btime is greater than new
rctime.
If snapshots are taken frequently when lazyio is being used, then the
rctime may not be updated for the snapshot for which the capabilities
are flushed by the client, but a subsequent snapshot. This is due to
the fact that this patch assumes that all relevant data writes have
been persisted to the OSDs and caps flushed to the MDS before the
snapshot is taken.
To avoid skipping a snapshot or two for correct rctime updates to
snapshot directories, the client should wait for at least twice the
client_oc_max_dirty_age duration before creating the snapshot dir.
Fixes: https://tracker.ceph.com/issues/50238
Signed-off-by: Milind Changire mchangir@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox