]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ocfs2: extend enough credits for freeing one truncate record while replaying truncate...
authorXue jiufei <xuejiufei@huawei.com>
Fri, 25 Mar 2016 21:21:44 +0000 (14:21 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 13 Oct 2016 23:36:48 +0000 (16:36 -0700)
commit639c8781f20f99e1f60575586c6440f372ddac13
treef9468a868106675f002b91ad320d97170bbd6a5d
parent451cddf9451ff5e3c2dd05e01daa0bc9a57f9a21
ocfs2: extend enough credits for freeing one truncate record while replaying truncate records

Orabug: 24759174

Now function ocfs2_replay_truncate_records() first modifies tl_used,
then calls ocfs2_extend_trans() to extend transactions for gd and alloc
inode used for freeing clusters.  jbd2_journal_restart() may be called
and it may happen that tl_used in truncate log is decreased but the
clusters are not freed, which means these clusters are lost.  So we
should avoid extending transactions in these two operations.

Signed-off-by: joyce.xue <xuejiufei@huawei.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Acked-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 102c2595aa193f598c0f4b1bf2037d168c80e551)

Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
fs/ocfs2/alloc.c