diff options
author | Qu Wenruo <wqu@suse.com> | 2023-07-15 19:08:27 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:16 +0200 |
commit | 257deed2a955fd73cc1ef53a96583edeab3ece1a (patch) | |
tree | a8443b7af35c800bd35617dbae2333d45092920d /fs/ntfs | |
parent | b9d97cff256f0efafd00f76b8d10d668f64436e9 (diff) |
btrfs: tests: enhance extent buffer bitmap tests
Enhance extent bitmap tests for the following aspects:
- Remove unnecessary @len from __test_eb_bitmaps()
We can fetch the length from extent buffer
- Explicitly distinguish bit and byte length
Now every start/len inside bitmap tests would have either "byte_" or
"bit_" prefix to make it more explicit.
- Better error reporting
If we have mismatch bits, the error report would dump the following
contents:
* start bytenr
* bit number
* the full byte from bitmap
* the full byte from the extent
This is to save developers time so obvious problem can be found
immediately
- Extract bitmap set/clear and check operation into two helpers
This is to save some code lines, as we will have more tests to do.
- Add new tests
The following tests are added, mostly for the incoming extent bitmap
accessor refactoring:
* Set bits inside the same byte
* Clear bits inside the same byte
* Cross byte boundary set
* Cross byte boundary clear
* Cross multi-byte boundary set
* Cross multi-byte boundary clear
Those new tests have already saved my backend for the incoming extent
buffer bitmap refactoring.
Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/ntfs')
0 files changed, 0 insertions, 0 deletions