On Fri, Aug 22, 2014 at 03:32:25PM +0400, Dmitry Monakhov wrote: > - handle = ext4_journal_start(inode, EXT4_HT_MISC, 4); > + /* In worst case we have to writeout two nonadjacent unwritten blocks */ > + credits = ext4_chunk_trans_blocks(inode, 1) * 2 - > + EXT4_META_TRANS_BLOCKS(inode->i_sb); This looks like it would be a massive over-estimate, since it includes the block group allocation bitmaps, which we wouldn't need to update, no? Wouldn't credts = ext4_index_trans_blocks(inode, 1, 1) * 2; be sufficient? - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html