Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helper to calc dev extent length for chunk
chunk.length is the amount of real user data we can store in this chunk. When we want to know how much raw disk space is occupied by a btrfs chunk, we need to know how many device extents are used for it, and how big they are (they are all the same size). The amount can be found by looking at the amount of "stripe" objects which are stored inside the "chunk" metadata object. The size of them is not stored in there, but can be calculated using some simple rules, so that we don't have to go and look up dev extent objects from another tree.
- Loading branch information