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