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
511de73f
Commit
511de73f
authored
Oct 08, 2007
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kill the unused bsize on the send side of /dev/loop
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
33c2dca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
drivers/block/loop.c
drivers/block/loop.c
+7
-8
No files found.
drivers/block/loop.c
View file @
511de73f
...
...
@@ -210,7 +210,7 @@ lo_do_transfer(struct loop_device *lo, int cmd,
* space operations write_begin and write_end.
*/
static
int
do_lo_send_aops
(
struct
loop_device
*
lo
,
struct
bio_vec
*
bvec
,
int
bsize
,
loff_t
pos
,
struct
page
*
unused
)
loff_t
pos
,
struct
page
*
unused
)
{
struct
file
*
file
=
lo
->
lo_backing_file
;
/* kudos to NFsckingS */
struct
address_space
*
mapping
=
file
->
f_mapping
;
...
...
@@ -302,7 +302,7 @@ static int __do_lo_send_write(struct file *file,
* filesystems.
*/
static
int
do_lo_send_direct_write
(
struct
loop_device
*
lo
,
struct
bio_vec
*
bvec
,
int
bsize
,
loff_t
pos
,
struct
page
*
page
)
struct
bio_vec
*
bvec
,
loff_t
pos
,
struct
page
*
page
)
{
ssize_t
bw
=
__do_lo_send_write
(
lo
->
lo_backing_file
,
kmap
(
bvec
->
bv_page
)
+
bvec
->
bv_offset
,
...
...
@@ -326,7 +326,7 @@ static int do_lo_send_direct_write(struct loop_device *lo,
* destination pages of the backing file.
*/
static
int
do_lo_send_write
(
struct
loop_device
*
lo
,
struct
bio_vec
*
bvec
,
int
bsize
,
loff_t
pos
,
struct
page
*
page
)
loff_t
pos
,
struct
page
*
page
)
{
int
ret
=
lo_do_transfer
(
lo
,
WRITE
,
page
,
0
,
bvec
->
bv_page
,
bvec
->
bv_offset
,
bvec
->
bv_len
,
pos
>>
9
);
...
...
@@ -341,10 +341,9 @@ static int do_lo_send_write(struct loop_device *lo, struct bio_vec *bvec,
return
ret
;
}
static
int
lo_send
(
struct
loop_device
*
lo
,
struct
bio
*
bio
,
int
bsize
,
loff_t
pos
)
static
int
lo_send
(
struct
loop_device
*
lo
,
struct
bio
*
bio
,
loff_t
pos
)
{
int
(
*
do_lo_send
)(
struct
loop_device
*
,
struct
bio_vec
*
,
int
,
loff_t
,
int
(
*
do_lo_send
)(
struct
loop_device
*
,
struct
bio_vec
*
,
loff_t
,
struct
page
*
page
);
struct
bio_vec
*
bvec
;
struct
page
*
page
=
NULL
;
...
...
@@ -362,7 +361,7 @@ static int lo_send(struct loop_device *lo, struct bio *bio, int bsize,
}
}
bio_for_each_segment
(
bvec
,
bio
,
i
)
{
ret
=
do_lo_send
(
lo
,
bvec
,
bsize
,
pos
,
page
);
ret
=
do_lo_send
(
lo
,
bvec
,
pos
,
page
);
if
(
ret
<
0
)
break
;
pos
+=
bvec
->
bv_len
;
...
...
@@ -478,7 +477,7 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio)
pos
=
((
loff_t
)
bio
->
bi_sector
<<
9
)
+
lo
->
lo_offset
;
if
(
bio_rw
(
bio
)
==
WRITE
)
ret
=
lo_send
(
lo
,
bio
,
lo
->
lo_blocksize
,
pos
);
ret
=
lo_send
(
lo
,
bio
,
pos
);
else
ret
=
lo_receive
(
lo
,
bio
,
lo
->
lo_blocksize
,
pos
);
return
ret
;
...
...
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