Merge branch 'md-raid6-accel' into ioat3.2
authorDan Williams <dan.j.williams@intel.com>
Wed, 9 Sep 2009 00:42:29 +0000 (17:42 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 9 Sep 2009 00:42:29 +0000 (17:42 -0700)
Conflicts:
include/linux/dmaengine.h

1  2 
arch/arm/mach-iop13xx/setup.c
arch/arm/plat-iop/adma.c
drivers/dma/dmaengine.c
drivers/dma/dmatest.c
drivers/md/raid5.c
include/linux/dmaengine.h

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -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
@@@ -70,26 -70,28 +70,34 @@@ 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),
  };
  
  /**