Btrfs: self-tests: Support non-4k page size
self-tests code assumes 4k as the sectorsize and nodesize. This commit fix hardcoded 4K. Enables the self-tests code to be executed on non-4k page sized systems (e.g. ppc64). Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Feifei Xu <xufeifei@linux.vnet.ibm.com> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -1660,7 +1660,7 @@ static void recalculate_thresholds(struct btrfs_free_space_ctl *ctl)
|
||||
* sure we don't go over our overall goal of MAX_CACHE_BYTES_PER_GIG as
|
||||
* we add more bitmaps.
|
||||
*/
|
||||
bitmap_bytes = (ctl->total_bitmaps + 1) * PAGE_SIZE;
|
||||
bitmap_bytes = (ctl->total_bitmaps + 1) * ctl->unit;
|
||||
|
||||
if (bitmap_bytes >= max_bytes) {
|
||||
ctl->extents_thresh = 0;
|
||||
|
Reference in New Issue
Block a user