-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util/file.hh: implement remove_file_via_blocks_discarding()
In order to allow splitting the removal of a big file into smaller steps a new function has been implemented. It removes a regular file via blocks discarding -- step by step. The discard requests are processed by the I/O queue. Therefore, they are issued to the disk according to the given configuration. The removal may be delayed when the bandwidth is not available in the queue. Fundamentally, the new function performs four steps: 1. Open the file. 2. Unlink it. 3. Punch holes until nothing is left. 4. Close the file. Signed-off-by: Patryk Wrobel <[email protected]>
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters