History

[PATCH] kill the unused bsize on the send side of /dev/loop

Al Viro committed 19 years ago

Commit 511de731 parent 33c2dca1 file · +7 −8Browse files

Unified · Split

drivers/block/loop.c+7−8
@@ -210,7 +210,7 @@ lo_do_transfer(struct loop_device *lo, int cmd, · 209 unmodified lines
210210 * space operations write_begin and write_end.
211211 */
212212 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)
214214 {
215215 struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
216216 struct address_space *mapping = file->f_mapping;
@@ -302,7 +302,7 @@ static int __do_lo_send_write(struct file *file, · 85 unmodified lines
302302 * filesystems.
303303 */
304304 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)
306306 {
307307 ssize_t bw = __do_lo_send_write(lo->lo_backing_file,
308308 kmap(bvec->bv_page) + bvec->bv_offset,
@@ -326,7 +326,7 @@ static int do_lo_send_direct_write(struct loop_device *lo, · 17 unmodified lines
326326 * destination pages of the backing file.
327327 */
328328 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)
330330 {
331331 int ret = lo_do_transfer(lo, WRITE, page, 0, bvec->bv_page,
332332 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, · 8 unmodified lines
341341 return ret;
342342 }
343343
344−static int lo_send(struct loop_device *lo, struct bio *bio, int bsize,
345− loff_t pos)
344+static int lo_send(struct loop_device *lo, struct bio *bio, loff_t pos)
346345 {
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,
348347 struct page *page);
349348 struct bio_vec *bvec;
350349 struct page *page = NULL;
@@ -362,7 +361,7 @@ static int lo_send(struct loop_device *lo, struct bio *bio, int bsize, · 11 unmodified lines
362361 }
363362 }
364363 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);
366365 if (ret < 0)
367366 break;
368367 pos += bvec->bv_len;
@@ -478,7 +477,7 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio) · 109 unmodified lines
478477
479478 pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset;
480479 if (bio_rw(bio) == WRITE)
481− ret = lo_send(lo, bio, lo->lo_blocksize, pos);
480+ ret = lo_send(lo, bio, pos);
482481 else
483482 ret = lo_receive(lo, bio, lo->lo_blocksize, pos);
484483 return ret;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t