Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d0c993f6
Commit
d0c993f6
authored
Aug 17, 2018
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/async_tx' into for-linus
parents
f6206f00
89a7e2f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
crypto/async_tx/async_pq.c
crypto/async_tx/async_pq.c
+6
-4
crypto/async_tx/raid6test.c
crypto/async_tx/raid6test.c
+3
-1
No files found.
crypto/async_tx/async_pq.c
View file @
d0c993f6
...
...
@@ -42,6 +42,8 @@ static struct page *pq_scribble_page;
#define P(b, d) (b[d-2])
#define Q(b, d) (b[d-1])
#define MAX_DISKS 255
/**
* do_async_gen_syndrome - asynchronously calculate P and/or Q
*/
...
...
@@ -184,7 +186,7 @@ async_gen_syndrome(struct page **blocks, unsigned int offset, int disks,
struct
dma_device
*
device
=
chan
?
chan
->
device
:
NULL
;
struct
dmaengine_unmap_data
*
unmap
=
NULL
;
BUG_ON
(
disks
>
255
||
!
(
P
(
blocks
,
disks
)
||
Q
(
blocks
,
disks
)));
BUG_ON
(
disks
>
MAX_DISKS
||
!
(
P
(
blocks
,
disks
)
||
Q
(
blocks
,
disks
)));
if
(
device
)
unmap
=
dmaengine_get_unmap_data
(
device
->
dev
,
disks
,
GFP_NOWAIT
);
...
...
@@ -196,7 +198,7 @@ async_gen_syndrome(struct page **blocks, unsigned int offset, int disks,
is_dma_pq_aligned
(
device
,
offset
,
0
,
len
))
{
struct
dma_async_tx_descriptor
*
tx
;
enum
dma_ctrl_flags
dma_flags
=
0
;
unsigned
char
coefs
[
src_cnt
];
unsigned
char
coefs
[
MAX_DISKS
];
int
i
,
j
;
/* run the p+q asynchronously */
...
...
@@ -299,11 +301,11 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
struct
dma_chan
*
chan
=
pq_val_chan
(
submit
,
blocks
,
disks
,
len
);
struct
dma_device
*
device
=
chan
?
chan
->
device
:
NULL
;
struct
dma_async_tx_descriptor
*
tx
;
unsigned
char
coefs
[
disks
-
2
];
unsigned
char
coefs
[
MAX_DISKS
];
enum
dma_ctrl_flags
dma_flags
=
submit
->
cb_fn
?
DMA_PREP_INTERRUPT
:
0
;
struct
dmaengine_unmap_data
*
unmap
=
NULL
;
BUG_ON
(
disks
<
4
);
BUG_ON
(
disks
<
4
||
disks
>
MAX_DISKS
);
if
(
device
)
unmap
=
dmaengine_get_unmap_data
(
device
->
dev
,
disks
,
GFP_NOWAIT
);
...
...
crypto/async_tx/raid6test.c
View file @
d0c993f6
...
...
@@ -81,11 +81,13 @@ static void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, stru
init_async_submit
(
&
submit
,
0
,
NULL
,
NULL
,
NULL
,
addr_conv
);
tx
=
async_gen_syndrome
(
ptrs
,
0
,
disks
,
bytes
,
&
submit
);
}
else
{
struct
page
*
blocks
[
disks
];
struct
page
*
blocks
[
NDISKS
];
struct
page
*
dest
;
int
count
=
0
;
int
i
;
BUG_ON
(
disks
>
NDISKS
);
/* data+Q failure. Reconstruct data from P,
* then rebuild syndrome
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment