Skip to content

ext[34]: Fix deadlock between truncate and get_block()

Jan Kara linux-ext4 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4jbd: Annotate transaction start also for journal_restart()fs/jbd/transaction.c+2 -20 replies
2/4ext3: Fix possible deadlock between ext3_truncate() and ext3_get_blocks()fs/ext3/inode.c+15 -42 replies
3/4jbd2: Annotate transaction start also for jbd2_journal_restart()fs/jbd2/transaction.c+2 -01 reply
4/4ext4: Fix possible deadlock between ext4_truncate() and ext4_get_blocks()fs/ext4/ext4.h fs/ext4/extents.c fs/ext4/inode.c+32 -71 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] ext[34]: Fix deadlock between truncate and get_block()

Hello,

below come patches that fix lockdep annotations in JBD / JBD2 so that we are
properly warned about possibly deadlocks caused by a transaction being restarted. Further follow patches that fix a possible deadlock between truncate and get_blocks() in ext3/ext4 which Ted spotted. I'm quite confident in the ext3 fix but the ext4 fix definitely needs a serious review because there are cosiderably more places working with the extent tree. I *think* ext4 patch is fine as I argue in the changelog and I went through all places acquiring i_data_sem but I might have missed some interaction / callsite...

Honza