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

rgw_file: fix flags set on unsuccessful unlink #15222

Merged
merged 2 commits into from May 31, 2017

Conversation

Projects
None yet
3 participants
@guihecheng
Contributor

guihecheng commented May 23, 2017

Only set FLAG_DELETED when the object/bucket is successfully
deleted.

Signed-off-by: Gui Hecheng guihecheng@cmss.chinamobile.com

@mattbenjamin

I think that the action to delete the local file handle is based on the thinking that this attempt to perform the delete obj/bucket at the cluster could have raced with another attempt in S3 or another gateway, and should force an invalidate; I agree that if the result is neither success nor ENOENT, we should avoid discarding the handle

@liewegas liewegas added the rgw label May 23, 2017

@guihecheng

This comment has been minimized.

Contributor

guihecheng commented May 25, 2017

@mattbenjamin ok, I agree we should check ENOENT, too, will resolve this conflict.

Gui Hecheng added some commits May 25, 2017

Gui Hecheng
rgw_file: fix flags set on unsuccessful unlink
Only set FLAG_DELETED when the object/bucket is successfully
deleted or ENOENT returned due to race with other s3 gateway.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Gui Hecheng
rgw_file: fix double lock on unlink bucket
When stat_buckets with FLAG_LOCKED, we would not want to lock_guard
again to protect time attrs.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
@guihecheng

This comment has been minimized.

Contributor

guihecheng commented May 25, 2017

@mattbenjamin updated patch and add a deadlock fix detected during testing.

@mattbenjamin mattbenjamin self-assigned this May 31, 2017

@mattbenjamin

looks good

@mattbenjamin mattbenjamin merged commit dc12370 into ceph:master May 31, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@guihecheng guihecheng deleted the guihecheng:rgw_file-fix-unlink branch Jun 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment