Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EOS-25302 After delete, storage is not reclaimed completely. (Seagate…
…#1215) Problem : In some cases, after deleting the object, entire space used by object is not reclaimed. Root cause: This issues is observed in some cases where we do not write a complete parity group in one IO request. Following happens in 3+2 config (an example) 1.Write 1 M at offset 0 - space consumed is 3M (1M for data and 2 M for parity) 2.Write 2 M at offset 1048576 - space consumed is 4M (2M for data and 2 M for parity) Total space consumed is 7M, after unlink space reclaimed is 5M. Leak of 2M. This leak is because of parity units. In step 2, a memory leak happens. We do not deallocated the space consumed by parity units because of step 1 and we reallocate space for the parity units again. Because of this leak we are not able to reclaim space even after object delete. Memory leak happens because in motr code, to release a balloc segment, a condition check is done and this condition check is always false as of today. Solution: Removed the condition check which was preventing balloc segment to be released and causing this leak. Testing done: verified the issues is not getting reproduced after changes. ST's (mostly related to healthy IO path, dgmode IO and SNS repair). Signed-off-by: Shipra Gupta <shipra.gupta@seagate.com> * EOS-25302 After delete, storage is not reclaimed completely Problem : In some cases, after deleting the object, entire space used by object is not reclaimed. Root cause: This issues is observed in some cases where we do not write a complete parity group in one IO request. Following happens in 3+2 config (an example) 1.Write 1 M at offset 0 - space consumed is 3M (1M for data and 2 M for parity) 2.Write 2 M at offset 1048576 - space consumed is 4M (2M for data and 2 M for parity) Total space consumed is 7M, after unlink space reclaimed is 5M. Leak of 2M. This leak is because of parity units. In step 2, a memory leak happens. We do not deallocated the space consumed by parity units because of step 1 and we reallocate space for the parity units again. Because of this leak we are not able to reclaim space even after object delete. Memory leak happens because in motr code, to release a balloc segment, a condition check is done and this condition check is always false as of today. Solution: sad_overwrite was added a kept default to false to fix bulk_server_ut. sad_overwrite is set to true by default. Added a fault point to make sad_overwrite false for bulk_server_ut. Signed-off-by: Shipra Gupta <shipra.gupta@seagate.com> Co-authored-by: Yatin Mahajan <yatin.mahajan@seagate.com>
- Loading branch information