-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple improvements on code readability and corrected comments. Issue #10224 raised concern whether we are correctly accounting for the size of L2ARC log blocks. We now implement a new arcstat "l2_log_blk_asize" which reflects how l2arc_evict() and l2arc_log_blk_commit() account for the size of L2ARC log blocks. This is also written to the header of the cache device as dh_lb_asize. zdb can compare dh_lb_asize to the sum of all aligned sizes as reported by l2arc_rebuild(). This provides valuable information as to whether the first two functions evict/commit log blocks that are not seen by l2arc_rebuild(). If those two values are not equal zdb exits with an error. For this feature to work correctly there should be no active writes on the cache device. This is also employed in the tests of persistent L2ARC. Since we modify the structure of the cache device header, this change breaks backward compatibility in terms of persistent L2ARC. In l2arc_rebuild_vdev() if the amount of committed log entries in a log block is 0 and the device header is valid we update the device header. This will facilitate trimming of the whole device in this case when TRIM for L2ARC is implemented. Signed-off-by: George Amanakis <gamanakis@gmail.com>
- Loading branch information
Showing
4 changed files
with
144 additions
and
84 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
Oops, something went wrong.