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
nexedi
linux
Commits
8b908f8e
Commit
8b908f8e
authored
May 13, 2015
by
Mike Snitzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dm thin: cleanup overwrite's endio restore to be centralized
Signed-off-by:
Mike Snitzer
<
snitzer@redhat.com
>
parent
0f20972f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
drivers/md/dm-thin.c
drivers/md/dm-thin.c
+3
-8
No files found.
drivers/md/dm-thin.c
View file @
8b908f8e
...
...
@@ -705,6 +705,8 @@ static void overwrite_endio(struct bio *bio, int err)
struct
dm_thin_endio_hook
*
h
=
dm_per_bio_data
(
bio
,
sizeof
(
struct
dm_thin_endio_hook
));
struct
dm_thin_new_mapping
*
m
=
h
->
overwrite_mapping
;
bio
->
bi_end_io
=
m
->
saved_bi_end_io
;
m
->
err
=
err
;
complete_mapping_preparation
(
m
);
}
...
...
@@ -793,9 +795,6 @@ static void inc_remap_and_issue_cell(struct thin_c *tc,
static
void
process_prepared_mapping_fail
(
struct
dm_thin_new_mapping
*
m
)
{
if
(
m
->
bio
)
m
->
bio
->
bi_end_io
=
m
->
saved_bi_end_io
;
cell_error
(
m
->
tc
->
pool
,
m
->
cell
);
list_del
(
&
m
->
list
);
mempool_free
(
m
,
m
->
tc
->
pool
->
mapping_pool
);
...
...
@@ -805,13 +804,9 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m)
{
struct
thin_c
*
tc
=
m
->
tc
;
struct
pool
*
pool
=
tc
->
pool
;
struct
bio
*
bio
;
struct
bio
*
bio
=
m
->
bio
;
int
r
;
bio
=
m
->
bio
;
if
(
bio
)
bio
->
bi_end_io
=
m
->
saved_bi_end_io
;
if
(
m
->
err
)
{
cell_error
(
pool
,
m
->
cell
);
goto
out
;
...
...
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