aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2008-08-15 04:20:02 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:03 -0400
commit5df97b91b5d7ed426034fcc84cb6e7cf682b8838 (patch)
tree727b9fb778f72d2b1ff44c007fb5209bacf67f4a /fs
parentb8b3e16cfe6435d961f6aaebcfd52a1ff2a988c5 (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')
-rw-r--r--fs/bio.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 4ac7c59d1c6d..bee4deca774a 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -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
211inline 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);
1381EXPORT_SYMBOL(__bio_clone); 1372EXPORT_SYMBOL(__bio_clone);
1382EXPORT_SYMBOL(bio_clone); 1373EXPORT_SYMBOL(bio_clone);
1383EXPORT_SYMBOL(bio_phys_segments); 1374EXPORT_SYMBOL(bio_phys_segments);
1384EXPORT_SYMBOL(bio_hw_segments);
1385EXPORT_SYMBOL(bio_add_page); 1375EXPORT_SYMBOL(bio_add_page);
1386EXPORT_SYMBOL(bio_add_pc_page); 1376EXPORT_SYMBOL(bio_add_pc_page);
1387EXPORT_SYMBOL(bio_get_nr_vecs); 1377EXPORT_SYMBOL(bio_get_nr_vecs);