* [104/165] ext4: Fix estimate of # of blocks needed to write indirect-mapped files
@ 2010-07-30 17:15 Greg KH
0 siblings, 0 replies; only message in thread
From: Greg KH @ 2010-07-30 17:15 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Kara, Theodore Tso
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
commit d330a5befb88875a9b3d2db62f9b74dadf660b13 upstream (as of v2.6.34-rc3)
http://bugzilla.kernel.org/show_bug.cgi?id=15420
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ext4/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1060,7 +1060,7 @@ static int ext4_indirect_calc_metadata_a
sector_t lblock)
{
struct ext4_inode_info *ei = EXT4_I(inode);
- int dind_mask = EXT4_ADDR_PER_BLOCK(inode->i_sb) - 1;
+ sector_t dind_mask = ~((sector_t)EXT4_ADDR_PER_BLOCK(inode->i_sb) - 1);
int blk_bits;
if (lblock < EXT4_NDIR_BLOCKS)
@@ -1075,7 +1075,7 @@ static int ext4_indirect_calc_metadata_a
}
ei->i_da_metadata_calc_last_lblock = lblock & dind_mask;
ei->i_da_metadata_calc_len = 1;
- blk_bits = roundup_pow_of_two(lblock + 1);
+ blk_bits = order_base_2(lblock);
return (blk_bits / EXT4_ADDR_PER_BLOCK_BITS(inode->i_sb)) + 1;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-30 17:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-30 17:15 [104/165] ext4: Fix estimate of # of blocks needed to write indirect-mapped files Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®