summaryrefslogtreecommitdiff
path: root/include/linux/if_tun.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-07-12 01:16:25 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-21 20:28:01 +0400
commitea05dc56faeea5a3e0eaafe6de9fae196ed7f036 (patch)
tree559c37bd822097139daa4ec8d01ca7cbaa9f2a5f /include/linux/if_tun.h
parent6a52f3c682cf4c191885d1029449d68fd60b40e6 (diff)
downloadlinux-ea05dc56faeea5a3e0eaafe6de9fae196ed7f036.tar.xz
jbd: Fix assertion failure in commit code due to lacking transaction credits
commit 09e05d4805e6c524c1af74e524e5d0528bb3fef3 upstream. ext3 users of data=journal mode with blocksize < pagesize were occasionally hitting assertion failure in 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. Under some rare circumstances this bug could even hit data=ordered mode users. There the assertion won't trigger and we would end up corrupting the filesystem. 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. Reviewed-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/if_tun.h')
0 files changed, 0 insertions, 0 deletions