RE: [PATCH 07/13] async_tx: add support for asynchronous RAID6 recovery operations

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

 



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-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux