Re: [PATCH 3/5] ext4_zero_range: fix incorect journal credits reservation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux