]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: avoid an overflow during utilization calculation
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 3 Sep 2013 04:41:37 +0000 (13:41 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 3 Sep 2013 04:41:37 +0000 (13:41 +0900)
commitf2f985341e0cc5533793be71cf82e245f77a0d78
treee691abcacb3c28bae55dfd8896e3a2662cd6936e
parent16b20f1eba9e303b8bb09b2e26df68fe1348de88
f2fs: avoid an overflow during utilization calculation

The current f2fs uses all the block counts with 32 bit numbers, which is able to
cover about 15TB volume.

But in calculation of utilization, f2fs multiplies the count by 100 which can
induce overflow.
This patch fixes this.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/segment.h