mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-03 10:55:20 +00:00
Fix calculation of number of dirty segments
The estimate for the number of dirty segment bytes was wildly over calculating the number of segment headers by confusing the length of the segment header with the length of segments. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -625,8 +625,8 @@ long scoutfs_item_dirty_bytes(struct super_block *sb)
|
||||
|
||||
spin_unlock_irqrestore(&cac->lock, flags);
|
||||
|
||||
bytes += DIV_ROUND_UP(bytes, sizeof(struct scoutfs_segment_block)) *
|
||||
sizeof(struct scoutfs_segment_block);
|
||||
bytes += DIV_ROUND_UP(bytes, SCOUTFS_SEGMENT_SIZE) *
|
||||
sizeof(struct scoutfs_segment_block);
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user