2000-12-11 06:22:51

by NeilBrown

[permalink] [raw]
Subject: PATCH - use submit_bh in brw_kiovec


Linus,
the new submit_bh function provides functionality that is better
suited for brw_kiovec to use than generic_make_request.

This patch replaced generic_make_request with submit_bh in
brw_kiovec and removed some field initialisation which is no longer
required.

patch against 2.4.0-test12-pre8

NeilBrown

--- ./fs/buffer.c 2000/12/10 23:51:16 1.1
+++ ./fs/buffer.c 2000/12/10 23:55:35 1.2
@@ -2040,7 +2040,6 @@
int pageind;
int bhind;
int offset;
- int sectors = size>>9;
unsigned long blocknr;
struct kiobuf * iobuf = NULL;
struct page * map;
@@ -2092,9 +2091,8 @@
tmp->b_this_page = tmp;

init_buffer(tmp, end_buffer_io_kiobuf, iobuf);
- tmp->b_rdev = tmp->b_dev = dev;
+ tmp->b_dev = dev;
tmp->b_blocknr = blocknr;
- tmp->b_rsector = blocknr*sectors;
tmp->b_state = (1 << BH_Mapped) | (1 << BH_Lock) | (1 << BH_Req);

if (rw == WRITE) {
@@ -2108,7 +2106,7 @@

atomic_inc(&iobuf->io_count);

- generic_make_request(rw, tmp);
+ submit_bh(rw, tmp);
/*
* Wait for IO if we have got too much
*/