osd: filestore: fast abort if statfs encounters ENOENT #7703
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a supplement patch for #6869.
The original case is that if we remove the root directory of an OSD by accident or something alike, and the OSD is currently idle, the OSD process will be able to survive a long time before it does have some consumers to take it down, which may confuse other OSDs and decrease the reliability of the cluster.
This patch try to find out the above case as soon as possible, that is: if statfs to the basedir returned ENOENT, which means the file referred to by path does not exist any more, we abort quickly.
And also for other forgivable errors such as EINTR, we want update heartbeat peers normally.
Verified locally, and below is part of the result: