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
761a15e7
Commit
761a15e7
authored
Sep 14, 2007
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pktcdvd: don't rely on bio_init() preserving bio->bi_io_vec
Signed-off-by:
Jens Axboe
<
jens.axboe@oracle.com
>
parent
bb879463
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
drivers/block/pktcdvd.c
drivers/block/pktcdvd.c
+5
-0
No files found.
drivers/block/pktcdvd.c
View file @
761a15e7
...
...
@@ -1133,16 +1133,20 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
* Schedule reads for missing parts of the packet.
*/
for
(
f
=
0
;
f
<
pkt
->
frames
;
f
++
)
{
struct
bio_vec
*
vec
;
int
p
,
offset
;
if
(
written
[
f
])
continue
;
bio
=
pkt
->
r_bios
[
f
];
vec
=
bio
->
bi_io_vec
;
bio_init
(
bio
);
bio
->
bi_max_vecs
=
1
;
bio
->
bi_sector
=
pkt
->
sector
+
f
*
(
CD_FRAMESIZE
>>
9
);
bio
->
bi_bdev
=
pd
->
bdev
;
bio
->
bi_end_io
=
pkt_end_io_read
;
bio
->
bi_private
=
pkt
;
bio
->
bi_io_vec
=
vec
;
p
=
(
f
*
CD_FRAMESIZE
)
/
PAGE_SIZE
;
offset
=
(
f
*
CD_FRAMESIZE
)
%
PAGE_SIZE
;
...
...
@@ -1439,6 +1443,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
pkt
->
w_bio
->
bi_bdev
=
pd
->
bdev
;
pkt
->
w_bio
->
bi_end_io
=
pkt_end_io_packet_write
;
pkt
->
w_bio
->
bi_private
=
pkt
;
pkt
->
w_bio
->
bi_io_vec
=
bvec
;
for
(
f
=
0
;
f
<
pkt
->
frames
;
f
++
)
if
(
!
bio_add_page
(
pkt
->
w_bio
,
bvec
[
f
].
bv_page
,
CD_FRAMESIZE
,
bvec
[
f
].
bv_offset
))
BUG
();
...
...
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