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/bluestore/BlueFS: do not op_file_update deleted files #10686

Merged
merged 1 commit into from Aug 17, 2016

Conversation

liewegas
Copy link
Member

Make truncate and preallocate no-op if the file has been
deleted. Otherwise we may get an op_file_update after
the op_file_remove in the log, confusing replay.

Signed-off-by: Sage Weil sage@redhat.com

Make truncate and preallocate no-op if the file has been
deleted.  Otherwise we may get an op_file_update *after*
the op_file_remove in the log, confusing replay.

Signed-off-by: Sage Weil <sage@redhat.com>
@markhpc
Copy link
Member

markhpc commented Aug 11, 2016

Checks are good, but it feels like we might be wallpapering over the issue. :)

@liewegas
Copy link
Member Author

liewegas commented Aug 11, 2016 via email

@varadakari
Copy link
Contributor

Just a dumb question, If we unlink a file, don't file descriptor should be invalidated? Technically file no longer exist. Should we report the user, that file is already deleted, by returning an error?

@tchaikov
Copy link
Contributor

If we unlink a file, don't file descriptor should be invalidated?

@varadakari no, it is still valid.

Technically file no longer exist. Should we report the user, that file is already deleted, by returning an error?

no, it's fine. like sage put, it's a common programming practice.

@liewegas
Copy link
Member Author

The 'user' is rocksdb. It is probably doing something like

unlink(name);
delete handle;
flush(this);

or some other cleanup on file close that happens even when the file is
unlinked. It's probably harmless (as it is with a normal posix
unix-like file system).. I don't think we need to worry about.

@liewegas liewegas merged commit 2611cdc into ceph:master Aug 17, 2016
@liewegas liewegas deleted the wip-bluefs-remove branch August 17, 2016 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants