lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140823190835.GB6236@thunk.org>
Date:	Sat, 23 Aug 2014 15:08:35 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Dmitry Monakhov <dmonakhov@...nvz.org>
Cc:	linux-ext4@...r.kernel.org, lczerner@...hat.com
Subject: Re: [PATCH 3/5] ext4_zero_range: fix incorect journal credits
 reservation

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ