]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: fix credits computing for indirect mapped files
authorYongqiang Yang <xiaoqiangnk@gmail.com>
Mon, 4 Apr 2011 19:40:24 +0000 (15:40 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 14 Mar 2012 14:57:08 +0000 (10:57 -0400)
commit5668bf8ea7198eeb1d2f1b82777d70b066482245
treee8a1ae21e8043f57907fcb1b3271415b133cbe47
parent13da1f80f304b303829d36b0bd5c94c589e60646
ext4: fix credits computing for indirect mapped files

commit 5b41395fcc0265fc9f193aef9df39ce49d64677c upstream.

When writing a contiguous set of blocks, two indirect blocks could be
needed depending on how the blocks are aligned, so we need to increase
the number of credits needed by one.

[ Also fixed a another bug which could further underestimate the
  number of journal credits needed by 1; the code was using integer
  division instead of DIV_ROUND_UP() -- tytso]

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ext4/inode.c