Re: [PATCH v2 03/11] async_tx: structify submission arguments, add scribble

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

 



2009/5/29 Sosnowski, Maciej <maciej.sosnowski@xxxxxxxxx>:
> Dan Williams wrote:
>> Prepare the api for the arrival of a new parameter, 'scribble'.  This
>> will allow callers to identify scratchpad memory for dma address or page
>> address conversions.  As this adds yet another parameter, take this
>> opportunity to convert the common submission parameters (flags,
>> dependency, callback, and callback argument) into an object that is
>> passed by reference.
>>
>> [ Impact: moves api pass-by-value parameters to a pass-by-reference struct ]
>>
>> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
>> ---
>>  crypto/async_tx/async_memcpy.c |   21 ++++-----
>>  crypto/async_tx/async_memset.c |   23 ++++------
>>  crypto/async_tx/async_tx.c     |   34 +++++++--------
>>  crypto/async_tx/async_xor.c    |   93 +++++++++++++++++-----------------------
>>  drivers/md/raid5.c             |   59 +++++++++++++++----------
>>  include/linux/async_tx.h       |   84 +++++++++++++++++++++++-------------
>>  6 files changed, 161 insertions(+), 153 deletions(-)
>
> (...)
>
>> @@ -811,13 +818,11 @@ ops_run_postxor(struct stripe_head *sh, struct
>> dma_async_tx_descriptor *tx)
>>
>>        atomic_inc(&sh->count);
>>
>> -       if (unlikely(count == 1)) {
>> -               flags &= ~(ASYNC_TX_XOR_DROP_DST | ASYNC_TX_XOR_ZERO_DST);
>> -               tx = async_memcpy(xor_dest, xor_srcs[0], 0, 0, STRIPE_SIZE,
>> -                       flags, tx, ops_complete_postxor, sh);
>> -       } else
>> -               tx = async_xor(xor_dest, xor_srcs, 0, count, STRIPE_SIZE,
>> -                       flags, tx, ops_complete_postxor, sh);
>> +       init_async_submit(&submit, flags, tx, ops_complete_postxor, sh, NULL);
>> +       if (unlikely(count == 1))
>> +               tx = async_memcpy(xor_dest, xor_srcs[0], 0, 0, STRIPE_SIZE, &submit);
>> +       else
>> +               tx = async_xor(xor_dest, xor_srcs, 0, count, STRIPE_SIZE, &submit);
>>  }
>
> What about ASYNC_TX_XOR_DROP_DST and ASYNC_TX_XOR_ZERO_DST flags clearing before async_memcpy?
>

Not necessary.  The routines ignore the flags that are not relevant.
However, the relevant flags for each routine used to be documented in
the kerneldoc description, but those lines got removed when the submit
parameter was added.  I'll go back and add notes to each routine about
which flags are honored and fix up compliance with the kerneldoc
format.

Thanks,
Dan
--
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