diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-10-08 12:10:13 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:56 -0400 |
commit | 511de73ff09034fb89c8d54bed201a10d057328c (patch) | |
tree | c9a6bc97ee65dd35f7370c04beebb51448ee4832 /drivers/block | |
parent | 33c2dca4957bd0da3e1af7b96d0758d97e708ef6 (diff) |
[PATCH] kill the unused bsize on the send side of /dev/loop
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/loop.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 67d7bc812364..3f09cd8bcc38 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -210,7 +210,7 @@ lo_do_transfer(struct loop_device *lo, int cmd, | |||
210 | * space operations write_begin and write_end. | 210 | * space operations write_begin and write_end. |
211 | */ | 211 | */ |
212 | static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, | 212 | static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, |
213 | int bsize, loff_t pos, struct page *unused) | 213 | loff_t pos, struct page *unused) |
214 | { | 214 | { |
215 | struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */ | 215 | struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */ |
216 | struct address_space *mapping = file->f_mapping; | 216 | struct address_space *mapping = file->f_mapping; |
@@ -302,7 +302,7 @@ static int __do_lo_send_write(struct file *file, | |||
302 | * filesystems. | 302 | * filesystems. |
303 | */ | 303 | */ |
304 | static int do_lo_send_direct_write(struct loop_device *lo, | 304 | static int do_lo_send_direct_write(struct loop_device *lo, |
305 | struct bio_vec *bvec, int bsize, loff_t pos, struct page *page) | 305 | struct bio_vec *bvec, loff_t pos, struct page *page) |
306 | { | 306 | { |
307 | ssize_t bw = __do_lo_send_write(lo->lo_backing_file, | 307 | ssize_t bw = __do_lo_send_write(lo->lo_backing_file, |
308 | kmap(bvec->bv_page) + bvec->bv_offset, | 308 | kmap(bvec->bv_page) + bvec->bv_offset, |
@@ -326,7 +326,7 @@ static int do_lo_send_direct_write(struct loop_device *lo, | |||
326 | * destination pages of the backing file. | 326 | * destination pages of the backing file. |
327 | */ | 327 | */ |
328 | static int do_lo_send_write(struct loop_device *lo, struct bio_vec *bvec, | 328 | static int do_lo_send_write(struct loop_device *lo, struct bio_vec *bvec, |
329 | int bsize, loff_t pos, struct page *page) | 329 | loff_t pos, struct page *page) |
330 | { | 330 | { |
331 | int ret = lo_do_transfer(lo, WRITE, page, 0, bvec->bv_page, | 331 | int ret = lo_do_transfer(lo, WRITE, page, 0, bvec->bv_page, |
332 | bvec->bv_offset, bvec->bv_len, pos >> 9); | 332 | 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, | |||
341 | return ret; | 341 | return ret; |
342 | } | 342 | } |
343 | 343 | ||
344 | static int lo_send(struct loop_device *lo, struct bio *bio, int bsize, | 344 | static int lo_send(struct loop_device *lo, struct bio *bio, loff_t pos) |
345 | loff_t pos) | ||
346 | { | 345 | { |
347 | int (*do_lo_send)(struct loop_device *, struct bio_vec *, int, loff_t, | 346 | int (*do_lo_send)(struct loop_device *, struct bio_vec *, loff_t, |
348 | struct page *page); | 347 | struct page *page); |
349 | struct bio_vec *bvec; | 348 | struct bio_vec *bvec; |
350 | struct page *page = NULL; | 349 | struct page *page = NULL; |
@@ -362,7 +361,7 @@ static int lo_send(struct loop_device *lo, struct bio *bio, int bsize, | |||
362 | } | 361 | } |
363 | } | 362 | } |
364 | bio_for_each_segment(bvec, bio, i) { | 363 | bio_for_each_segment(bvec, bio, i) { |
365 | ret = do_lo_send(lo, bvec, bsize, pos, page); | 364 | ret = do_lo_send(lo, bvec, pos, page); |
366 | if (ret < 0) | 365 | if (ret < 0) |
367 | break; | 366 | break; |
368 | pos += bvec->bv_len; | 367 | pos += bvec->bv_len; |
@@ -478,7 +477,7 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio) | |||
478 | 477 | ||
479 | pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; | 478 | pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; |
480 | if (bio_rw(bio) == WRITE) | 479 | if (bio_rw(bio) == WRITE) |
481 | ret = lo_send(lo, bio, lo->lo_blocksize, pos); | 480 | ret = lo_send(lo, bio, pos); |
482 | else | 481 | else |
483 | ret = lo_receive(lo, bio, lo->lo_blocksize, pos); | 482 | ret = lo_receive(lo, bio, lo->lo_blocksize, pos); |
484 | return ret; | 483 | return ret; |