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
d07a241d
Commit
d07a241d
authored
Dec 11, 2017
by
Mike Snitzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dm mpath: optimize retrieval of bio_details from per-bio-data
Signed-off-by:
Mike Snitzer
<
snitzer@redhat.com
>
parent
d0442f80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
drivers/md/dm-mpath.c
drivers/md/dm-mpath.c
+3
-5
No files found.
drivers/md/dm-mpath.c
View file @
d07a241d
...
...
@@ -264,19 +264,17 @@ static struct dm_mpath_io *get_mpio_from_bio(struct bio *bio)
return
dm_per_bio_data
(
bio
,
multipath_per_bio_data_size
());
}
static
struct
dm_bio_details
*
get_bio_details_from_
bio
(
struct
bio
*
b
io
)
static
struct
dm_bio_details
*
get_bio_details_from_
mpio
(
struct
dm_mpath_io
*
mp
io
)
{
/* dm_bio_details is immediately after the dm_mpath_io in bio's per-bio-data */
struct
dm_mpath_io
*
mpio
=
get_mpio_from_bio
(
bio
);
void
*
bio_details
=
mpio
+
1
;
return
bio_details
;
}
static
void
multipath_init_per_bio_data
(
struct
bio
*
bio
,
struct
dm_mpath_io
**
mpio_p
)
{
struct
dm_mpath_io
*
mpio
=
get_mpio_from_bio
(
bio
);
struct
dm_bio_details
*
bio_details
=
get_bio_details_from_
bio
(
b
io
);
struct
dm_bio_details
*
bio_details
=
get_bio_details_from_
mpio
(
mp
io
);
mpio
->
nr_bytes
=
bio
->
bi_iter
.
bi_size
;
mpio
->
pgpath
=
NULL
;
...
...
@@ -1554,7 +1552,7 @@ static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone,
}
/* Queue for the daemon to resubmit */
dm_bio_restore
(
get_bio_details_from_
bio
(
clone
),
clone
);
dm_bio_restore
(
get_bio_details_from_
mpio
(
mpio
),
clone
);
spin_lock_irqsave
(
&
m
->
lock
,
flags
);
bio_list_add
(
&
m
->
queued_bios
,
clone
);
...
...
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