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

os/filestore/FileJournal: fail out if FileJournal is not block device… #11146

Merged
merged 1 commit into from Sep 21, 2016

Conversation

tchaikov
Copy link
Contributor

… or regular file

otherwise JournalingFileStore will assert when deleting FileJournal
which still has the non block/regular file opened.

Fixes: http://tracker.ceph.com/issues/17307
Signed-off-by: Kefu Chai kchai@redhat.com

… or regular file

otherwise JournalingFileStore will assert when deleting FileJournal
which still has the non block/regular file opened.

Fixes: http://tracker.ceph.com/issues/17307
Signed-off-by: Kefu Chai <kchai@redhat.com>
@dzafman
Copy link
Contributor

dzafman commented Sep 20, 2016

👍

@tchaikov tchaikov merged commit 2718e0f into ceph:master Sep 21, 2016
@tchaikov tchaikov deleted the wip-17307 branch September 21, 2016 02:56
@@ -134,6 +138,7 @@ int FileJournal::_open(bool forwrite, bool create)

out_fd:
VOID_TEMP_FAILURE_RETRY(::close(fd));
fd = -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

@tchaikov This one line is really the fix. but the other changes improve the error output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for helping me understand this fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

I led you astray. Actually, the open doesn't fail, so without the S_ISREG check, it would crash later upon read failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants