diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2008-08-15 04:20:02 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:03 -0400 |
commit | 5df97b91b5d7ed426034fcc84cb6e7cf682b8838 (patch) | |
tree | 727b9fb778f72d2b1ff44c007fb5209bacf67f4a /fs/bio.c | |
parent | b8b3e16cfe6435d961f6aaebcfd52a1ff2a988c5 (diff) |
drop vmerge accounting
Remove hw_segments field from struct bio and struct request. Without virtual
merge accounting they have no purpose.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -208,14 +208,6 @@ inline int bio_phys_segments(struct request_queue *q, struct bio *bio) | |||
208 | return bio->bi_phys_segments; | 208 | return bio->bi_phys_segments; |
209 | } | 209 | } |
210 | 210 | ||
211 | inline int bio_hw_segments(struct request_queue *q, struct bio *bio) | ||
212 | { | ||
213 | if (unlikely(!bio_flagged(bio, BIO_SEG_VALID))) | ||
214 | blk_recount_segments(q, bio); | ||
215 | |||
216 | return bio->bi_hw_segments; | ||
217 | } | ||
218 | |||
219 | /** | 211 | /** |
220 | * __bio_clone - clone a bio | 212 | * __bio_clone - clone a bio |
221 | * @bio: destination bio | 213 | * @bio: destination bio |
@@ -350,7 +342,7 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page | |||
350 | */ | 342 | */ |
351 | 343 | ||
352 | while (bio->bi_phys_segments >= q->max_phys_segments | 344 | while (bio->bi_phys_segments >= q->max_phys_segments |
353 | || bio->bi_hw_segments >= q->max_hw_segments) { | 345 | || bio->bi_phys_segments >= q->max_hw_segments) { |
354 | 346 | ||
355 | if (retried_segments) | 347 | if (retried_segments) |
356 | return 0; | 348 | return 0; |
@@ -399,7 +391,6 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page | |||
399 | 391 | ||
400 | bio->bi_vcnt++; | 392 | bio->bi_vcnt++; |
401 | bio->bi_phys_segments++; | 393 | bio->bi_phys_segments++; |
402 | bio->bi_hw_segments++; | ||
403 | done: | 394 | done: |
404 | bio->bi_size += len; | 395 | bio->bi_size += len; |
405 | return len; | 396 | return len; |
@@ -1381,7 +1372,6 @@ EXPORT_SYMBOL(bio_init); | |||
1381 | EXPORT_SYMBOL(__bio_clone); | 1372 | EXPORT_SYMBOL(__bio_clone); |
1382 | EXPORT_SYMBOL(bio_clone); | 1373 | EXPORT_SYMBOL(bio_clone); |
1383 | EXPORT_SYMBOL(bio_phys_segments); | 1374 | EXPORT_SYMBOL(bio_phys_segments); |
1384 | EXPORT_SYMBOL(bio_hw_segments); | ||
1385 | EXPORT_SYMBOL(bio_add_page); | 1375 | EXPORT_SYMBOL(bio_add_page); |
1386 | EXPORT_SYMBOL(bio_add_pc_page); | 1376 | EXPORT_SYMBOL(bio_add_pc_page); |
1387 | EXPORT_SYMBOL(bio_get_nr_vecs); | 1377 | EXPORT_SYMBOL(bio_get_nr_vecs); |