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:
Zach Brown
2016-12-08 23:39:41 -08:00
parent acee97ba2a
commit 51a84447dd

View File

@@ -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;
}