kernel-ark/fs/jbd2
Jan Kara b794e7a6eb jbd2: fix assertion failure in commit code due to lacking transaction credits
ext4 users of data=journal mode with blocksize < pagesize were
occasionally hitting assertion failure in
jbd2_journal_commit_transaction() checking whether the transaction has
at least as many credits reserved as buffers attached.  The core of the
problem is that when a file gets truncated, buffers that still need
checkpointing or that are attached to the committing transaction are
left with buffer_mapped set. When this happens to buffers beyond i_size
attached to a page stradding i_size, subsequent write extending the file
will see these buffers and as they are mapped (but underlying blocks
were freed) things go awry from here.

The assertion failure just coincidentally (and in this case luckily as
we would start corrupting filesystem) triggers due to journal_head not
being properly cleaned up as well.

We fix the problem by unmapping buffers if possible (in lots of cases we
just need a buffer attached to a transaction as a place holder but it
must not be written out anyway).  And in one case, we just have to bite
the bullet and wait for transaction commit to finish.

CC: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2012-09-26 23:11:13 -04:00
..
checkpoint.c jbd2: remove bh_state lock from checkpointing code 2012-03-13 22:45:25 -04:00
commit.c jbd2: fix assertion failure in commit code due to lacking transaction credits 2012-09-26 23:11:13 -04:00
journal.c jbd2: don't write superblock when if its empty 2012-08-18 22:29:40 -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: check return value of blkdev_issue_flush() 2012-08-17 09:56:17 -04:00
revoke.c jbd2: checksum revocation blocks 2012-05-27 08:08:24 -04:00
transaction.c jbd2: fix assertion failure in commit code due to lacking transaction credits 2012-09-26 23:11:13 -04:00