ext4: decrement free clusters/inodes counters when block group declared bad
authorNamjae Jeon <[email protected]>
Thu, 26 Jun 2014 14:11:53 +0000 (10:11 -0400)
committerTheodore Ts'o <[email protected]>
Thu, 26 Jun 2014 14:11:53 +0000 (10:11 -0400)
commite43bb4e612b402a631bc549ac496f78bc7a79438
treec77a553f96df228a8cf66d970d11f12efa4d7c24
parentec7756ae1517af483d995f386936d00a4cb1ab7d
ext4: decrement free clusters/inodes counters when block group declared bad

We should decrement free clusters counter when block bitmap is marked
as corrupt and free inodes counter when the allocation bitmap is
marked as corrupt to avoid misunderstanding due to incorrect available
size in statfs result.  User can get immediately ENOSPC error from
write begin without reaching for the writepages.

Cc: Darrick J. Wong<[email protected]>
Reported-by: Amit Sahrawat <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Ashish Sangwan <[email protected]>
fs/ext4/balloc.c
fs/ext4/ialloc.c
fs/ext4/mballoc.c