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]
Date:	Mon, 11 Dec 2006 17:28:15 -0800
From:	Mingming Cao <cmm@...ibm.com>
To:	"Amit K. Arora" <aarora@...ux.vnet.ibm.com>
Cc:	linux-ext4@...r.kernel.org, suparna@...ibm.com, suzuki@...ibm.com
Subject: Re: [RFC][Patch 1/1] Persistent preallocation in ext4

On Wed, 2006-12-06 at 11:28 +0530, Amit K. Arora wrote:

> @@ -1142,13 +1155,22 @@
>  	/* try to insert block into found extent and return */
>  	if (ex && ext4_can_extents_be_merged(inode, ex, newext)) {
>  		ext_debug("append %d block to %d:%d (from %llu)\n",
> -				le16_to_cpu(newext->ee_len),
> +				ext4_ext_get_actual_len(newext),
>  				le32_to_cpu(ex->ee_block),
> -				le16_to_cpu(ex->ee_len), ext_pblock(ex));
> +				ext4_ext_get_actual_len(ex), ext_pblock(ex));
>  		if ((err = ext4_ext_get_access(handle, inode, path + depth)))
>  			return err;
> -		ex->ee_len = cpu_to_le16(le16_to_cpu(ex->ee_len)
> -					 + le16_to_cpu(newext->ee_len));
> +
> +		/* ext4_can_extents_be_merged should have checked that either
> +		 * both extents are uninitialized, or both aren't. Thus we
> +		 * need to check any of them here.
> +		 */
> +		if (ext4_ext_is_uninitialized(ex))
> +			uninitialized = 1;
> +		ex->ee_len = cpu_to_le16(ext4_ext_get_actual_len(ex)
> +					 + ext4_ext_get_actual_len(newext));
> +		if(uninitialized)
> +			ext4_mark_uninitialized_ext(ex);
>  		eh = path[depth].p_hdr;
>  		nearex = ex;
>  		goto merge;

Hmm, I missed the point to re-mark an uninitialized extent here. If ex
is an uninitialized extent, the mark(the first bit the ee_len) shall
still there after the update, isn't?  We already make sure that two
large uninitialized extent can't get merged if the resulting length will
take the first bit, which used as the mark of uninitialized extent.


-
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