OSDN Git Service

f2fs: Keep alloc_valid_block_count in sync
authorDaniel Rosenberg <drosen@google.com>
Tue, 10 Jul 2018 03:32:42 +0000 (20:32 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 18 Sep 2018 20:37:05 +0000 (13:37 -0700)
commit5e39f1496f8eb41f19cef9be713c5abef787153b
tree16647e2fa968a41b1c06f9e6740fb139b0bdf593
parent7b1c7d07d000f7e0c90d0c9930c9e360d4f33878
f2fs: Keep alloc_valid_block_count in sync

If we attempt to request more blocks than we have room for, we try to
instead request as much as we can, however, alloc_valid_block_count
is not decremented to match the new value, allowing it to drift higher
until the next checkpoint. This always decrements it when the requested
amount cannot be fulfilled.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h