Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/dma-mapping.h>
#include <linux/raid/pq.h>
#include <linux/async_tx.h>
#include <linux/gfp.h>
Go to the source code of this file.
Macros | |
#define | P(b, d) (b[d-2]) |
#define | Q(b, d) (b[d-1]) |
Functions | |
struct dma_async_tx_descriptor * | async_gen_syndrome (struct page **blocks, unsigned int offset, int disks, size_t len, struct async_submit_ctl *submit) |
EXPORT_SYMBOL_GPL (async_gen_syndrome) | |
struct dma_async_tx_descriptor * | async_syndrome_val (struct page **blocks, unsigned int offset, int disks, size_t len, enum sum_check_flags *pqres, struct page *spare, struct async_submit_ctl *submit) |
EXPORT_SYMBOL_GPL (async_syndrome_val) | |
module_init (async_pq_init) | |
module_exit (async_pq_exit) | |
MODULE_DESCRIPTION ("asynchronous raid6 syndrome generation/validation") | |
MODULE_LICENSE ("GPL") | |
|
read |
async_gen_syndrome - asynchronously calculate a raid6 syndrome : source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1 : common offset into each block (src and dest) to start transaction : number of blocks (including missing P or Q, see below) : length of operation in bytes : submission/completion modifiers
General note: This routine assumes a field of GF(2^8) with a primitive polynomial of 0x11d and a generator of {02}.
'disks' note: callers can optionally omit either P or Q (but not both) from the calculation by setting blocks[disks-2] or blocks[disks-1] to NULL. When P or Q is omitted 'len' must be <= PAGE_SIZE as a temporary buffer of this size is used in the synchronous path. 'disks' always accounts for both destination buffers. If any source buffers (blocks[i] where i < disks - 2) are set to NULL those buffers will be replaced with the raid6_zero_page in the synchronous path and omitted in the hardware-asynchronous path.
'blocks' note: if submit->scribble is NULL then the contents of 'blocks' may be overwritten to perform address conversions (dma_map_page() or page_address()).
Definition at line 197 of file async_pq.c.
|
read |
async_syndrome_val - asynchronously validate a raid6 syndrome : source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1 : common offset into each block (src and dest) to start transaction : number of blocks (including missing P or Q, see below) : length of operation in bytes : on val failure SUM_CHECK_P_RESULT and/or SUM_CHECK_Q_RESULT are set : temporary result buffer for the synchronous case : submission / completion modifiers
The same notes from async_gen_syndrome apply to the 'blocks', and 'disks' parameters of this routine. The synchronous path requires a temporary result buffer and submit->scribble to be specified.
Definition at line 271 of file async_pq.c.
EXPORT_SYMBOL_GPL | ( | async_gen_syndrome | ) |
EXPORT_SYMBOL_GPL | ( | async_syndrome_val | ) |
MODULE_DESCRIPTION | ( | "asynchronous raid6 syndrome generation/validation" | ) |
module_exit | ( | async_pq_exit | ) |
module_init | ( | async_pq_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |