-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NBSNEBIUS-351: Erase devices using deallocate in 1GB chunks (#1717)
* NBSNEBIUS-351: Erase devices using deallocate in 1GB chunks Deallocating large device chunks (e.g., 93GB) on certain SSD models resulted in incomplete erasure, leaving ~20 pages uncleared. This commit mitigates the issue by deallocating in smaller 1GB chunks, ensuring complete device erasure.
- Loading branch information
Showing
7 changed files
with
138 additions
and
19 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
|
||
#include "nvme.h" | ||
|
||
namespace NCloud::NBlockStore::NNvme { | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
struct TDeallocateReq | ||
{ | ||
ui64 Offset; | ||
ui64 Size; | ||
|
||
bool operator==(const TDeallocateReq& other) const | ||
{ | ||
return Offset == other.Offset && Size == other.Size; | ||
} | ||
}; | ||
|
||
using TNvmeDeallocateHistory = TVector<TDeallocateReq>; | ||
using TNvmeDeallocateHistoryPtr = std::shared_ptr<TNvmeDeallocateHistory>; | ||
|
||
INvmeManagerPtr CreateNvmeManagerStub( | ||
bool isDeviceSsd = true, | ||
TNvmeDeallocateHistoryPtr deallocateHistory = nullptr); | ||
|
||
} // namespace NCloud::NBlockStore::NNvme |
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
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