From: Dan Williams Date: Wed, 9 Sep 2009 00:42:29 +0000 (-0700) Subject: Merge branch 'md-raid6-accel' into ioat3.2 X-Git-Tag: v2.6.32-rc1~60^2^2~33 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=f9dd2134374c8de6b911e2b8652c6c9622eaa658 Merge branch 'md-raid6-accel' into ioat3.2 Conflicts: include/linux/dmaengine.h --- f9dd2134374c8de6b911e2b8652c6c9622eaa658 diff --cc drivers/md/raid5.c index bb37fb1b2d82,364ea37706fa..0a5cf2171214 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@@ -3187,9 -3383,21 +3383,21 @@@ static bool handle_stripe6(struct strip } } - if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state)) { + /* Finish reconstruct operations initiated by the expansion process */ + if (sh->reconstruct_state == reconstruct_state_result) { + sh->reconstruct_state = reconstruct_state_idle; + clear_bit(STRIPE_EXPANDING, &sh->state); + for (i = conf->raid_disks; i--; ) { + set_bit(R5_Wantwrite, &sh->dev[i].flags); + set_bit(R5_LOCKED, &sh->dev[i].flags); + s.locked++; + } + } + + if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && + !sh->reconstruct_state) { struct stripe_head *sh2 - = get_active_stripe(conf, sh->sector, 1, 1); + = get_active_stripe(conf, sh->sector, 1, 1, 1); if (sh2 && test_bit(STRIPE_EXPAND_SOURCE, &sh2->state)) { /* sh cannot be written until sh2 has been read. * so arrange for sh to be delayed a little diff --cc include/linux/dmaengine.h index ffefba81c818,ce010cd991d2..1012f1abcb54 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@@ -70,28 -70,49 +70,55 @@@ enum dma_transaction_type /** * enum dma_ctrl_flags - DMA flags to augment operation preparation, - * control completion, and communicate status. + * control completion, and communicate status. * @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completion of - * this transaction + * this transaction * @DMA_CTRL_ACK - the descriptor cannot be reused until the client - * acknowledges receipt, i.e. has has a chance to establish any - * dependency chains + * acknowledges receipt, i.e. has has a chance to establish any dependency + * chains * @DMA_COMPL_SKIP_SRC_UNMAP - set to disable dma-unmapping the source buffer(s) * @DMA_COMPL_SKIP_DEST_UNMAP - set to disable dma-unmapping the destination(s) + * @DMA_COMPL_SRC_UNMAP_SINGLE - set to do the source dma-unmapping as single + * (if not set, do the source dma-unmapping as page) + * @DMA_COMPL_DEST_UNMAP_SINGLE - set to do the destination dma-unmapping as single + * (if not set, do the destination dma-unmapping as page) + * @DMA_PREP_PQ_DISABLE_P - prevent generation of P while generating Q + * @DMA_PREP_PQ_DISABLE_Q - prevent generation of Q while generating P + * @DMA_PREP_CONTINUE - indicate to a driver that it is reusing buffers as + * sources that were the result of a previous operation, in the case of a PQ + * operation it continues the calculation with new sources */ enum dma_ctrl_flags { DMA_PREP_INTERRUPT = (1 << 0), DMA_CTRL_ACK = (1 << 1), DMA_COMPL_SKIP_SRC_UNMAP = (1 << 2), DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3), - DMA_PREP_PQ_DISABLE_P = (1 << 4), - DMA_PREP_PQ_DISABLE_Q = (1 << 5), - DMA_PREP_CONTINUE = (1 << 6), + DMA_COMPL_SRC_UNMAP_SINGLE = (1 << 4), + DMA_COMPL_DEST_UNMAP_SINGLE = (1 << 5), ++ DMA_PREP_PQ_DISABLE_P = (1 << 6), ++ DMA_PREP_PQ_DISABLE_Q = (1 << 7), ++ DMA_PREP_CONTINUE = (1 << 8), }; + /** + * enum sum_check_bits - bit position of pq_check_flags + */ + enum sum_check_bits { + SUM_CHECK_P = 0, + SUM_CHECK_Q = 1, + }; + + /** + * enum pq_check_flags - result of async_{xor,pq}_zero_sum operations + * @SUM_CHECK_P_RESULT - 1 if xor zero sum error, 0 otherwise + * @SUM_CHECK_Q_RESULT - 1 if reed-solomon zero sum error, 0 otherwise + */ + enum sum_check_flags { + SUM_CHECK_P_RESULT = (1 << SUM_CHECK_P), + SUM_CHECK_Q_RESULT = (1 << SUM_CHECK_Q), + }; + + /** * dma_cap_mask_t - capabilities bitmap modeled after cpumask_t. * See linux/cpumask.h