This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rgw/sfs: recognize delete-marker on DeleteObj
RGWDeleteObj::execute() relies on the return code from rgw::sal::Object::get_obj_state() to ascert the object being deleted is a regular object rather than a delete-marker. The rule is to return -ENOENT to signal a delete-marker. get_obj_state() in rgw/sfs was returning always 0 for any object, therefore also a delete-marker fell into a regular object in RGWDeleteObj::execute(). This is wrong because, when dealing with object lock checks, a delete-marker is always allowed to be deleted regardless of the object's retention mode. Returing 0 was incorrectly preventing a delete-marker to be deleted for object-lock protected objects. Fixes: https://github.com/aquarist-labs/s3gw/issues/690 Signed-off-by: Giuseppe Baccini <[email protected]>
- Loading branch information