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, 30 Mar 2009 15:30:22 +0100
From:	"Sosnowski, Maciej" <maciej.sosnowski@...el.com>
To:	"Williams, Dan J" <dan.j.williams@...el.com>
CC:	"neilb@...e.de" <neilb@...e.de>, Ilya Yanok <yanok@...raft.com>,
	Yuri Tikhonov <yur@...raft.com>,
	"linux-raid@...r.kernel.org" <linux-raid@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 07/13] async_tx: add support for asynchronous RAID6
 recovery	operations

Williams, Dan J wrote:
> +ddr_sync:
> +	{
> +		void **sptrs = (void **)lptrs;
> +		/*
> +		 * Failed to compute asynchronously, do it in
> +		 * synchronous manner
> +		 */
> +
> +		/* wait for any prerequisite operations */
> +		async_tx_quiesce(&depend_tx);
> +		if (flags & ASYNC_TX_DEP_ACK)
> +			async_tx_ack(depend_tx);
> +
> +		i = disks;
> +		while (i--)
> +			sptrs[i] = page_address(ptrs[i]);
> +		raid6_2data_recov(disks, bytes, faila, failb, sptrs);
> +
> +		async_tx_sync_epilog(cb, cb_param);
> +	}
(...)
> +dpr_sync:
> +	{
> +		void **sptrs = (void **) lptrs;
> +		/*
> +		 * Failed to compute asynchronously, do it in
> +		 * synchronous manner
> +		 */
> +
> +		/* wait for any prerequisite operations */
> +		async_tx_quiesce(&depend_tx);
> +		if (flags & ASYNC_TX_DEP_ACK)
> +			async_tx_ack(depend_tx);
> +
> +		i = disks;
> +		while (i--)
> +			sptrs[i] = page_address(ptrs[i]);
> +		raid6_datap_recov(disks, bytes, faila, (void *)sptrs);
> +
> +		async_tx_sync_epilog(cb, cb_param);
> +	}

These synchronous sections in async_r6_dd_recov() and async_r6_dp_recov()
look almost the same. What about placing the code in a common function?

Regards,
Maciej--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ