Re: [RFC]Ext4: journal credits reservation fixes for DIO, fallocate and delalloc writepages

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

 



On Jul 22, 2008  17:51 -0700, Mingming Cao wrote:
> + * Calulate the total number of credits to reserve to fit
> + * the modification of @num pages into a single transaction
> + */
> +int ext4_writepages_trans_blocks(struct inode *inode, int num)
> +{
> +	int bpp = ext4_journal_blocks_per_page(inode);
> +	int nrblocks = num * bpp;
> +
> +	if (!EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)
> +		return ext4_writepages_trans_blocks_old(inode, nrblocks);

This should be "if (!(EXT4_I(inode)->i_flags & EXT_EXTENTS_FL))", and
we should probably make it "unlikely()" since we expect most new files
in an ext4 filesystem are extent mapped.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
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