kernel-ark/fs/jbd2
Jan Kara 76c3990456 jbd2: cleanup needed free block estimates when starting a transaction
__jbd2_log_space_left() and jbd_space_needed() were kind of odd.
jbd_space_needed() accounted also credits needed for currently
committing transaction while it didn't account for credits needed for
control blocks.  __jbd2_log_space_left() then accounted for control
blocks as a fraction of free space.  Since results of these two
functions are always only compared against each other, this works
correct but is somewhat strange.  Move the estimates so that
jbd_space_needed() returns number of blocks needed for a transaction
including control blocks and __jbd2_log_space_left() returns free
space in the journal (with the committing transaction already
subtracted).  Rename functions to jbd2_log_space_left() and
jbd2_space_needed() while we are changing them.

Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-06-04 12:12:57 -04:00
..
checkpoint.c jbd2: cleanup needed free block estimates when starting a transaction 2013-06-04 12:12:57 -04:00
commit.c jbd2: refine waiting for shadow buffers 2013-06-04 12:08:56 -04:00
journal.c jbd2: cleanup needed free block estimates when starting a transaction 2013-06-04 12:12:57 -04:00
Kconfig jbd2: Grab a reference to the crc32c driver if necessary 2012-05-27 07:50:56 -04:00
Makefile
recovery.c jbd2: fix block tag checksum verification brokenness 2013-05-28 07:31:59 -04:00
revoke.c jbd2: remove journal_head from descriptor buffers 2013-06-04 12:06:01 -04:00
transaction.c jbd2: cleanup needed free block estimates when starting a transaction 2013-06-04 12:12:57 -04:00