History

block: rename generic_make_request to submit_bio_noacct

generic_make_request has always been very confusingly misnamed, so rename it to submit_bio_noacct to make it clear that it is submit_bio minus accounting and a few checks.

Christoph Hellwig committed 6 years ago

Commit ed00aab1 parent c62b37d44 files · +115 −118Browse files

Unified · Split

44 files
  1. Documentation/block/biodoc.rst +1 −1
  2. Documentation/fault-injection/fault-injection.rst +1 −1
  3. Documentation/trace/ftrace.rst +2 −2
  4. block/bio.c +7 −7
  5. block/blk-core.c +15 −17
  6. block/blk-crypto-fallback.c +1 −1
  7. block/blk-crypto.c +1 −1
  8. block/blk-merge.c +1 −1
  9. block/blk-throttle.c +2 −2
  10. block/bounce.c +1 −1
  11. drivers/block/drbd/drbd_int.h +3 −3
  12. drivers/block/drbd/drbd_main.c +1 −1
  13. drivers/block/drbd/drbd_receiver.c +1 −1
  14. drivers/block/drbd/drbd_req.c +1 −1
  15. drivers/block/drbd/drbd_worker.c +1 −1
  16. drivers/block/pktcdvd.c +1 −1
  17. drivers/lightnvm/pblk-read.c +1 −1
  18. drivers/md/bcache/bcache.h +1 −1
  19. drivers/md/bcache/btree.c +1 −1
  20. drivers/md/bcache/request.c +3 −4
  21. drivers/md/dm-cache-target.c +3 −3
  22. drivers/md/dm-clone-target.c +5 −5
  23. drivers/md/dm-crypt.c +3 −3
  24. drivers/md/dm-delay.c +1 −1
  25. drivers/md/dm-era-target.c +1 −1
  26. drivers/md/dm-integrity.c +2 −2
  27. drivers/md/dm-mpath.c +1 −1
  28. drivers/md/dm-raid1.c +1 −1
  29. drivers/md/dm-snap-persistent.c +1 −1
  30. drivers/md/dm-snap.c +3 −3
  31. drivers/md/dm-thin.c +2 −2
  32. drivers/md/dm-verity-target.c +1 −1
  33. drivers/md/dm-writecache.c +1 −1
  34. drivers/md/dm-zoned-target.c +1 −1
  35. drivers/md/dm.c +5 −5
  36. drivers/md/md-faulty.c +2 −2
  37. drivers/md/md-linear.c +2 −2
  38. drivers/md/md-multipath.c +2 −2
  39. drivers/md/raid0.c +4 −4
  40. drivers/md/raid1.c +7 −7
  41. drivers/md/raid10.c +14 −14
  42. drivers/md/raid5.c +5 −5
  43. drivers/nvme/host/multipath.c +1 −1
  44. include/linux/blkdev.h +1 −1
Documentation/block/biodoc.rst+1−1
@@ -1036,7 +1036,7 @@ Now the generic block layer performs partition-remapping early and thus · 1035 unmodified lines
1036provides drivers with a sector number relative to whole device, rather than1036provides drivers with a sector number relative to whole device, rather than
1037having to take partition number into account in order to arrive at the true1037having to take partition number into account in order to arrive at the true
1038sector number. The routine blk_partition_remap() is invoked by1038sector number. The routine blk_partition_remap() is invoked by
1039generic_make_request even before invoking the queue specific ->submit_bio,1039submit_bio_noacct even before invoking the queue specific ->submit_bio,
1040so the i/o scheduler also gets to operate on whole disk sector numbers. This1040so the i/o scheduler also gets to operate on whole disk sector numbers. This
1041should typically not require changes to block drivers, it just never gets1041should typically not require changes to block drivers, it just never gets
1042to invoke its own partition sector offset calculations since all bios1042to invoke its own partition sector offset calculations since all bios
Documentation/fault-injection/fault-injection.rst+1−1
@@ -24,7 +24,7 @@ Available fault injection capabilities · 23 unmodified lines
24 24
25 injects disk IO errors on devices permitted by setting25 injects disk IO errors on devices permitted by setting
26 /sys/block/<device>/make-it-fail or26 /sys/block/<device>/make-it-fail or
27 /sys/block/<device>/<partition>/make-it-fail. (generic_make_request())27 /sys/block/<device>/<partition>/make-it-fail. (submit_bio_noacct())
28 28
29- fail_mmc_request29- fail_mmc_request
30 30
Documentation/trace/ftrace.rst+2−2
@@ -1453,7 +1453,7 @@ function-trace, we get a much larger output:: · 1452 unmodified lines
1453 => __blk_run_queue_uncond1453 => __blk_run_queue_uncond
1454 => __blk_run_queue1454 => __blk_run_queue
1455 => blk_queue_bio1455 => blk_queue_bio
1456 => generic_make_request1456 => submit_bio_noacct
1457 => submit_bio1457 => submit_bio
1458 => submit_bh1458 => submit_bh
1459 => __ext3_get_inode_loc1459 => __ext3_get_inode_loc
@@ -1738,7 +1738,7 @@ tracers. · 278 unmodified lines
1738 => __blk_run_queue_uncond1738 => __blk_run_queue_uncond
1739 => __blk_run_queue1739 => __blk_run_queue
1740 => blk_queue_bio1740 => blk_queue_bio
1741 => generic_make_request1741 => submit_bio_noacct
1742 => submit_bio1742 => submit_bio
1743 => submit_bh1743 => submit_bh
1744 => ext3_bread1744 => ext3_bread
block/bio.c+7−7
@@ -358,7 +358,7 @@ static void bio_alloc_rescue(struct work_struct *work) · 357 unmodified lines
358 if (!bio)358 if (!bio)
359 break;359 break;
360 360
361 generic_make_request(bio);361 submit_bio_noacct(bio);
362 }362 }
363}363}
364 364
@@ -416,19 +416,19 @@ static void punt_bios_to_rescuer(struct bio_set *bs) · 51 unmodified lines
416 * submit the previously allocated bio for IO before attempting to allocate416 * submit the previously allocated bio for IO before attempting to allocate
417 * a new one. Failure to do so can cause deadlocks under memory pressure.417 * a new one. Failure to do so can cause deadlocks under memory pressure.
418 *418 *
419 * Note that when running under generic_make_request() (i.e. any block419 * Note that when running under submit_bio_noacct() (i.e. any block
420 * driver), bios are not submitted until after you return - see the code in420 * driver), bios are not submitted until after you return - see the code in
421 * generic_make_request() that converts recursion into iteration, to prevent421 * submit_bio_noacct() that converts recursion into iteration, to prevent
422 * stack overflows.422 * stack overflows.
423 *423 *
424 * This would normally mean allocating multiple bios under424 * This would normally mean allocating multiple bios under
425 * generic_make_request() would be susceptible to deadlocks, but we have425 * submit_bio_noacct() would be susceptible to deadlocks, but we have
426 * deadlock avoidance code that resubmits any blocked bios from a rescuer426 * deadlock avoidance code that resubmits any blocked bios from a rescuer
427 * thread.427 * thread.
428 *428 *
429 * However, we do not guarantee forward progress for allocations from other429 * However, we do not guarantee forward progress for allocations from other
430 * mempools. Doing multiple allocations from the same mempool under430 * mempools. Doing multiple allocations from the same mempool under
431 * generic_make_request() should be avoided - instead, use bio_set's front_pad431 * submit_bio_noacct() should be avoided - instead, use bio_set's front_pad
432 * for per bio allocations.432 * for per bio allocations.
433 *433 *
434 * RETURNS:434 * RETURNS:
@@ -457,14 +457,14 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, unsigned int nr_iovecs, · 22 unmodified lines
457 nr_iovecs > 0))457 nr_iovecs > 0))
458 return NULL;458 return NULL;
459 /*459 /*
460 * generic_make_request() converts recursion to iteration; this460 * submit_bio_noacct() converts recursion to iteration; this
461 * means if we're running beneath it, any bios we allocate and461 * means if we're running beneath it, any bios we allocate and
462 * submit will not be submitted (and thus freed) until after we462 * submit will not be submitted (and thus freed) until after we
463 * return.463 * return.
464 *464 *
465 * This exposes us to a potential deadlock if we allocate465 * This exposes us to a potential deadlock if we allocate
466 * multiple bios from the same bio_set() while running466 * multiple bios from the same bio_set() while running
467 * underneath generic_make_request(). If we were to allocate467 * underneath submit_bio_noacct(). If we were to allocate
468 * multiple bios (say a stacking block driver that was splitting468 * multiple bios (say a stacking block driver that was splitting
469 * bios), we would deadlock if we exhausted the mempool's469 * bios), we would deadlock if we exhausted the mempool's
470 * reserve.470 * reserve.
block/blk-core.c+15−17
@@ -956,8 +956,7 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q, · 955 unmodified lines
956 return BLK_STS_OK;956 return BLK_STS_OK;
957}957}
958 958
959static noinline_for_stack bool959static noinline_for_stack bool submit_bio_checks(struct bio *bio)
960generic_make_request_checks(struct bio *bio)
961{960{
962 struct request_queue *q = bio->bi_disk->queue;961 struct request_queue *q = bio->bi_disk->queue;
963 blk_status_t status = BLK_STS_IOERR;962 blk_status_t status = BLK_STS_IOERR;
@@ -985,9 +984,8 @@ generic_make_request_checks(struct bio *bio) · 21 unmodified lines
985 }984 }
986 985
987 /*986 /*
988 * Filter flush bio's early so that make_request based987 * Filter flush bio's early so that bio based drivers without flush
989 * drivers without flush support don't have to worry988 * support don't have to worry about them.
990 * about them.
991 */989 */
992 if (op_is_flush(bio->bi_opf) &&990 if (op_is_flush(bio->bi_opf) &&
993 !test_bit(QUEUE_FLAG_WC, &q->queue_flags)) {991 !test_bit(QUEUE_FLAG_WC, &q->queue_flags)) {
@@ -1072,7 +1070,7 @@ end_io: · 78 unmodified lines
1072 return false;1070 return false;
1073}1071}
1074 1072
1075static blk_qc_t do_make_request(struct bio *bio)1073static blk_qc_t __submit_bio(struct bio *bio)
1076{1074{
1077 struct gendisk *disk = bio->bi_disk;1075 struct gendisk *disk = bio->bi_disk;
1078 blk_qc_t ret = BLK_QC_T_NONE;1076 blk_qc_t ret = BLK_QC_T_NONE;
@@ -1087,7 +1085,7 @@ static blk_qc_t do_make_request(struct bio *bio) · 8 unmodified lines
1087}1085}
1088 1086
1089/**1087/**
1090 * generic_make_request - re-submit a bio to the block device layer for I/O1088 * submit_bio_noacct - re-submit a bio to the block device layer for I/O
1091 * @bio: The bio describing the location in memory and on the device.1089 * @bio: The bio describing the location in memory and on the device.
1092 *1090 *
1093 * This is a version of submit_bio() that shall only be used for I/O that is1091 * This is a version of submit_bio() that shall only be used for I/O that is
@@ -1095,7 +1093,7 @@ static blk_qc_t do_make_request(struct bio *bio) · 1 unmodified line
1095 * systems and other upper level users of the block layer should use1093 * systems and other upper level users of the block layer should use
1096 * submit_bio() instead.1094 * submit_bio() instead.
1097 */1095 */
1098blk_qc_t generic_make_request(struct bio *bio)1096blk_qc_t submit_bio_noacct(struct bio *bio)
1099{1097{
1100 /*1098 /*
1101 * bio_list_on_stack[0] contains bios submitted by the current1099 * bio_list_on_stack[0] contains bios submitted by the current
@@ -1106,7 +1104,7 @@ blk_qc_t generic_make_request(struct bio *bio) · 4 unmodified lines
1106 struct bio_list bio_list_on_stack[2];1104 struct bio_list bio_list_on_stack[2];
1107 blk_qc_t ret = BLK_QC_T_NONE;1105 blk_qc_t ret = BLK_QC_T_NONE;
1108 1106
1109 if (!generic_make_request_checks(bio))1107 if (!submit_bio_checks(bio))
1110 goto out;1108 goto out;
1111 1109
1112 /*1110 /*
@@ -1114,7 +1112,7 @@ blk_qc_t generic_make_request(struct bio *bio) · 1 unmodified line
1114 * stack usage with stacked devices could be a problem. So use1112 * stack usage with stacked devices could be a problem. So use
1115 * current->bio_list to keep a list of requests submited by a1113 * current->bio_list to keep a list of requests submited by a
1116 * ->submit_bio method. current->bio_list is also used as a1114 * ->submit_bio method. current->bio_list is also used as a
1117 * flag to say if generic_make_request is currently active in this1115 * flag to say if submit_bio_noacct is currently active in this
1118 * task or not. If it is NULL, then no make_request is active. If1116 * task or not. If it is NULL, then no make_request is active. If
1119 * it is non-NULL, then a make_request is active, and new requests1117 * it is non-NULL, then a make_request is active, and new requests
1120 * should be added at the tail1118 * should be added at the tail
@@ -1132,7 +1130,7 @@ blk_qc_t generic_make_request(struct bio *bio) · 11 unmodified lines
1132 * we assign bio_list to a pointer to the bio_list_on_stack,1130 * we assign bio_list to a pointer to the bio_list_on_stack,
1133 * thus initialising the bio_list of new bios to be1131 * thus initialising the bio_list of new bios to be
1134 * added. ->submit_bio() may indeed add some more bios1132 * added. ->submit_bio() may indeed add some more bios
1135 * through a recursive call to generic_make_request. If it1133 * through a recursive call to submit_bio_noacct. If it
1136 * did, we find a non-NULL value in bio_list and re-enter the loop1134 * did, we find a non-NULL value in bio_list and re-enter the loop
1137 * from the top. In this case we really did just take the bio1135 * from the top. In this case we really did just take the bio
1138 * of the top of the list (no pretending) and so remove it from1136 * of the top of the list (no pretending) and so remove it from
@@ -1150,7 +1148,7 @@ blk_qc_t generic_make_request(struct bio *bio) · 11 unmodified lines
1150 /* Create a fresh bio_list for all subordinate requests */1148 /* Create a fresh bio_list for all subordinate requests */
1151 bio_list_on_stack[1] = bio_list_on_stack[0];1149 bio_list_on_stack[1] = bio_list_on_stack[0];
1152 bio_list_init(&bio_list_on_stack[0]);1150 bio_list_init(&bio_list_on_stack[0]);
1153 ret = do_make_request(bio);1151 ret = __submit_bio(bio);
1154 1152
1155 /* sort new bios into those for a lower level1153 /* sort new bios into those for a lower level
1156 * and those for the same level1154 * and those for the same level
@@ -1174,13 +1172,13 @@ blk_qc_t generic_make_request(struct bio *bio) · 17 unmodified lines
1174out:1172out:
1175 return ret;1173 return ret;
1176}1174}
1177EXPORT_SYMBOL(generic_make_request);1175EXPORT_SYMBOL(submit_bio_noacct);
1178 1176
1179/**1177/**
1180 * direct_make_request - hand a buffer directly to its device driver for I/O1178 * direct_make_request - hand a buffer directly to its device driver for I/O
1181 * @bio: The bio describing the location in memory and on the device.1179 * @bio: The bio describing the location in memory and on the device.
1182 *1180 *
1183 * This function behaves like generic_make_request(), but does not protect1181 * This function behaves like submit_bio_noacct(), but does not protect
1184 * against recursion. Must only be used if the called driver is known1182 * against recursion. Must only be used if the called driver is known
1185 * to be blk-mq based.1183 * to be blk-mq based.
1186 */1184 */
@@ -1192,7 +1190,7 @@ blk_qc_t direct_make_request(struct bio *bio) · 5 unmodified lines
1192 bio_io_error(bio);1190 bio_io_error(bio);
1193 return BLK_QC_T_NONE;1191 return BLK_QC_T_NONE;
1194 }1192 }
1195 if (!generic_make_request_checks(bio))1193 if (!submit_bio_checks(bio))
1196 return BLK_QC_T_NONE;1194 return BLK_QC_T_NONE;
1197 if (unlikely(bio_queue_enter(bio)))1195 if (unlikely(bio_queue_enter(bio)))
1198 return BLK_QC_T_NONE;1196 return BLK_QC_T_NONE;
@@ -1263,13 +1261,13 @@ blk_qc_t submit_bio(struct bio *bio) · 64 unmodified lines
1263 blk_qc_t ret;1261 blk_qc_t ret;
1264 1262
1265 psi_memstall_enter(&pflags);1263 psi_memstall_enter(&pflags);
1266 ret = generic_make_request(bio);1264 ret = submit_bio_noacct(bio);
1267 psi_memstall_leave(&pflags);1265 psi_memstall_leave(&pflags);
1268 1266
1269 return ret;1267 return ret;
1270 }1268 }
1271 1269
1272 return generic_make_request(bio);1270 return submit_bio_noacct(bio);
1273}1271}
1274EXPORT_SYMBOL(submit_bio);1272EXPORT_SYMBOL(submit_bio);
1275 1273
block/blk-crypto-fallback.c+1−1
@@ -228,7 +228,7 @@ static bool blk_crypto_split_bio_if_needed(struct bio **bio_ptr) · 227 unmodified lines
228 return false;228 return false;
229 }229 }
230 bio_chain(split_bio, bio);230 bio_chain(split_bio, bio);
231 generic_make_request(bio);231 submit_bio_noacct(bio);
232 *bio_ptr = split_bio;232 *bio_ptr = split_bio;
233 }233 }
234 234
block/blk-crypto.c+1−1
@@ -239,7 +239,7 @@ void __blk_crypto_free_request(struct request *rq) · 238 unmodified lines
239 * kernel crypto API. When the crypto API fallback is used for encryption,239 * kernel crypto API. When the crypto API fallback is used for encryption,
240 * blk-crypto may choose to split the bio into 2 - the first one that will240 * blk-crypto may choose to split the bio into 2 - the first one that will
241 * continue to be processed and the second one that will be resubmitted via241 * continue to be processed and the second one that will be resubmitted via
242 * generic_make_request. A bounce bio will be allocated to encrypt the contents242 * submit_bio_noacct. A bounce bio will be allocated to encrypt the contents
243 * of the aforementioned "first one", and *bio_ptr will be updated to this243 * of the aforementioned "first one", and *bio_ptr will be updated to this
244 * bounce bio.244 * bounce bio.
245 *245 *
block/blk-merge.c+1−1
@@ -338,7 +338,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs) · 337 unmodified lines
338 338
339 bio_chain(split, *bio);339 bio_chain(split, *bio);
340 trace_block_split(q, split, (*bio)->bi_iter.bi_sector);340 trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
341 generic_make_request(*bio);341 submit_bio_noacct(*bio);
342 *bio = split;342 *bio = split;
343 }343 }
344}344}
block/blk-throttle.c+2−2
@@ -1339,8 +1339,8 @@ static void blk_throtl_dispatch_work_fn(struct work_struct *work) · 1338 unmodified lines
1339 1339
1340 if (!bio_list_empty(&bio_list_on_stack)) {1340 if (!bio_list_empty(&bio_list_on_stack)) {
1341 blk_start_plug(&plug);1341 blk_start_plug(&plug);
1342 while((bio = bio_list_pop(&bio_list_on_stack)))1342 while ((bio = bio_list_pop(&bio_list_on_stack)))
1343 generic_make_request(bio);1343 submit_bio_noacct(bio);
1344 blk_finish_plug(&plug);1344 blk_finish_plug(&plug);
1345 }1345 }
1346}1346}
block/bounce.c+1−1
@@ -309,7 +309,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, · 308 unmodified lines
309 if (!passthrough && sectors < bio_sectors(*bio_orig)) {309 if (!passthrough && sectors < bio_sectors(*bio_orig)) {
310 bio = bio_split(*bio_orig, sectors, GFP_NOIO, &bounce_bio_split);310 bio = bio_split(*bio_orig, sectors, GFP_NOIO, &bounce_bio_split);
311 bio_chain(bio, *bio_orig);311 bio_chain(bio, *bio_orig);
312 generic_make_request(*bio_orig);312 submit_bio_noacct(*bio_orig);
313 *bio_orig = bio;313 *bio_orig = bio;
314 }314 }
315 bio = bounce_clone_bio(*bio_orig, GFP_NOIO, passthrough ? NULL :315 bio = bounce_clone_bio(*bio_orig, GFP_NOIO, passthrough ? NULL :
drivers/block/drbd/drbd_int.h+3−3
@@ -1576,12 +1576,12 @@ void drbd_set_my_capacity(struct drbd_device *device, sector_t size); · 1575 unmodified lines
1576/*1576/*
1577 * used to submit our private bio1577 * used to submit our private bio
1578 */1578 */
1579static inline void drbd_generic_make_request(struct drbd_device *device,1579static inline void drbd_submit_bio_noacct(struct drbd_device *device,
1580 int fault_type, struct bio *bio)1580 int fault_type, struct bio *bio)
1581{1581{
1582 __release(local);1582 __release(local);
1583 if (!bio->bi_disk) {1583 if (!bio->bi_disk) {
1584 drbd_err(device, "drbd_generic_make_request: bio->bi_disk == NULL\n");1584 drbd_err(device, "drbd_submit_bio_noacct: bio->bi_disk == NULL\n");
1585 bio->bi_status = BLK_STS_IOERR;1585 bio->bi_status = BLK_STS_IOERR;
1586 bio_endio(bio);1586 bio_endio(bio);
1587 return;1587 return;
@@ -1590,7 +1590,7 @@ static inline void drbd_generic_make_request(struct drbd_device *device, · 2 unmodified lines
1590 if (drbd_insert_fault(device, fault_type))1590 if (drbd_insert_fault(device, fault_type))
1591 bio_io_error(bio);1591 bio_io_error(bio);
1592 else1592 else
1593 generic_make_request(bio);1593 submit_bio_noacct(bio);
1594}1594}
1595 1595
1596void drbd_bump_write_ordering(struct drbd_resource *resource, struct drbd_backing_dev *bdev,1596void drbd_bump_write_ordering(struct drbd_resource *resource, struct drbd_backing_dev *bdev,
drivers/block/drbd/drbd_main.c+1−1
@@ -2325,7 +2325,7 @@ static void do_retry(struct work_struct *ws) · 2324 unmodified lines
2325 * workqueues instead.2325 * workqueues instead.
2326 */2326 */
2327 2327
2328 /* We are not just doing generic_make_request(),2328 /* We are not just doing submit_bio_noacct(),
2329 * as we want to keep the start_time information. */2329 * as we want to keep the start_time information. */
2330 inc_ap_bio(device);2330 inc_ap_bio(device);
2331 __drbd_make_request(device, bio, start_jif);2331 __drbd_make_request(device, bio, start_jif);
drivers/block/drbd/drbd_receiver.c+1−1
@@ -1723,7 +1723,7 @@ next_bio: · 1722 unmodified lines
1723 bios = bios->bi_next;1723 bios = bios->bi_next;
1724 bio->bi_next = NULL;1724 bio->bi_next = NULL;
1725 1725
1726 drbd_generic_make_request(device, fault_type, bio);1726 drbd_submit_bio_noacct(device, fault_type, bio);
1727 } while (bios);1727 } while (bios);
1728 return 0;1728 return 0;
1729 1729
drivers/block/drbd/drbd_req.c+1−1
@@ -1164,7 +1164,7 @@ drbd_submit_req_private_bio(struct drbd_request *req) · 1163 unmodified lines
1164 else if (bio_op(bio) == REQ_OP_DISCARD)1164 else if (bio_op(bio) == REQ_OP_DISCARD)
1165 drbd_process_discard_or_zeroes_req(req, EE_TRIM);1165 drbd_process_discard_or_zeroes_req(req, EE_TRIM);
1166 else1166 else
1167 generic_make_request(bio);1167 submit_bio_noacct(bio);
1168 put_ldev(device);1168 put_ldev(device);
1169 } else1169 } else
1170 bio_io_error(bio);1170 bio_io_error(bio);
drivers/block/drbd/drbd_worker.c+1−1
@@ -1525,7 +1525,7 @@ int w_restart_disk_io(struct drbd_work *w, int cancel) · 1524 unmodified lines
1525 1525
1526 drbd_req_make_private_bio(req, req->master_bio);1526 drbd_req_make_private_bio(req, req->master_bio);
1527 bio_set_dev(req->private_bio, device->ldev->backing_bdev);1527 bio_set_dev(req->private_bio, device->ldev->backing_bdev);
1528 generic_make_request(req->private_bio);1528 submit_bio_noacct(req->private_bio);
1529 1529
1530 return 0;1530 return 0;
1531}1531}
drivers/block/pktcdvd.c+1−1
@@ -913,7 +913,7 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd) · 912 unmodified lines
913 }913 }
914 914
915 atomic_inc(&pd->cdrw.pending_bios);915 atomic_inc(&pd->cdrw.pending_bios);
916 generic_make_request(bio);916 submit_bio_noacct(bio);
917 }917 }
918}918}
919 919
drivers/lightnvm/pblk-read.c+1−1
@@ -320,7 +320,7 @@ split_retry: · 319 unmodified lines
320 split_bio = bio_split(bio, nr_secs * NR_PHY_IN_LOG, GFP_KERNEL,320 split_bio = bio_split(bio, nr_secs * NR_PHY_IN_LOG, GFP_KERNEL,
321 &pblk_bio_set);321 &pblk_bio_set);
322 bio_chain(split_bio, bio);322 bio_chain(split_bio, bio);
323 generic_make_request(bio);323 submit_bio_noacct(bio);
324 324
325 /* New bio contains first N sectors of the previous one, so325 /* New bio contains first N sectors of the previous one, so
326 * we can continue to use existing rqd, but we need to shrink326 * we can continue to use existing rqd, but we need to shrink
drivers/md/bcache/bcache.h+1−1
@@ -929,7 +929,7 @@ static inline void closure_bio_submit(struct cache_set *c, · 928 unmodified lines
929 bio_endio(bio);929 bio_endio(bio);
930 return;930 return;
931 }931 }
932 generic_make_request(bio);932 submit_bio_noacct(bio);
933}933}
934 934
935/*935/*
drivers/md/bcache/btree.c+1−1
@@ -959,7 +959,7 @@ err: · 958 unmodified lines
959 * bch_btree_node_get - find a btree node in the cache and lock it, reading it959 * bch_btree_node_get - find a btree node in the cache and lock it, reading it
960 * in from disk if necessary.960 * in from disk if necessary.
961 *961 *
962 * If IO is necessary and running under generic_make_request, returns -EAGAIN.962 * If IO is necessary and running under submit_bio_noacct, returns -EAGAIN.
963 *963 *
964 * The btree node will have either a read or a write lock held, depending on964 * The btree node will have either a read or a write lock held, depending on
965 * level and op->lock.965 * level and op->lock.
drivers/md/bcache/request.c+3−4
@@ -1115,7 +1115,7 @@ static void detached_dev_do_request(struct bcache_device *d, struct bio *bio) · 1114 unmodified lines
1115 !blk_queue_discard(bdev_get_queue(dc->bdev)))1115 !blk_queue_discard(bdev_get_queue(dc->bdev)))
1116 bio->bi_end_io(bio);1116 bio->bi_end_io(bio);
1117 else1117 else
1118 generic_make_request(bio);1118 submit_bio_noacct(bio);
1119}1119}
1120 1120
1121static void quit_max_writeback_rate(struct cache_set *c,1121static void quit_max_writeback_rate(struct cache_set *c,
@@ -1197,7 +1197,7 @@ blk_qc_t cached_dev_submit_bio(struct bio *bio) · 75 unmodified lines
1197 if (!bio->bi_iter.bi_size) {1197 if (!bio->bi_iter.bi_size) {
1198 /*1198 /*
1199 * can't call bch_journal_meta from under1199 * can't call bch_journal_meta from under
1200 * generic_make_request1200 * submit_bio_noacct
1201 */1201 */
1202 continue_at_nobarrier(&s->cl,1202 continue_at_nobarrier(&s->cl,
1203 cached_dev_nodata,1203 cached_dev_nodata,
@@ -1311,8 +1311,7 @@ blk_qc_t flash_dev_submit_bio(struct bio *bio) · 107 unmodified lines
1311 1311
1312 if (!bio->bi_iter.bi_size) {1312 if (!bio->bi_iter.bi_size) {
1313 /*1313 /*
1314 * can't call bch_journal_meta from under1314 * can't call bch_journal_meta from under submit_bio_noacct
1315 * generic_make_request
1316 */1315 */
1317 continue_at_nobarrier(&s->cl,1316 continue_at_nobarrier(&s->cl,
1318 flash_dev_nodata,1317 flash_dev_nodata,
drivers/md/dm-cache-target.c+3−3
@@ -886,7 +886,7 @@ static void accounted_complete(struct cache *cache, struct bio *bio) · 885 unmodified lines
886static void accounted_request(struct cache *cache, struct bio *bio)886static void accounted_request(struct cache *cache, struct bio *bio)
887{887{
888 accounted_begin(cache, bio);888 accounted_begin(cache, bio);
889 generic_make_request(bio);889 submit_bio_noacct(bio);
890}890}
891 891
892static void issue_op(struct bio *bio, void *context)892static void issue_op(struct bio *bio, void *context)
@@ -1792,7 +1792,7 @@ static bool process_bio(struct cache *cache, struct bio *bio) · 899 unmodified lines
1792 bool commit_needed;1792 bool commit_needed;
1793 1793
1794 if (map_bio(cache, bio, get_bio_block(cache, bio), &commit_needed) == DM_MAPIO_REMAPPED)1794 if (map_bio(cache, bio, get_bio_block(cache, bio), &commit_needed) == DM_MAPIO_REMAPPED)
1795 generic_make_request(bio);1795 submit_bio_noacct(bio);
1796 1796
1797 return commit_needed;1797 return commit_needed;
1798}1798}
@@ -1858,7 +1858,7 @@ static bool process_discard_bio(struct cache *cache, struct bio *bio) · 59 unmodified lines
1858 1858
1859 if (cache->features.discard_passdown) {1859 if (cache->features.discard_passdown) {
1860 remap_to_origin(cache, bio);1860 remap_to_origin(cache, bio);
1861 generic_make_request(bio);1861 submit_bio_noacct(bio);
1862 } else1862 } else
1863 bio_endio(bio);1863 bio_endio(bio);
1864 1864
drivers/md/dm-clone-target.c+5−5
@@ -330,7 +330,7 @@ static void submit_bios(struct bio_list *bios) · 329 unmodified lines
330 blk_start_plug(&plug);330 blk_start_plug(&plug);
331 331
332 while ((bio = bio_list_pop(bios)))332 while ((bio = bio_list_pop(bios)))
333 generic_make_request(bio);333 submit_bio_noacct(bio);
334 334
335 blk_finish_plug(&plug);335 blk_finish_plug(&plug);
336}336}
@@ -346,7 +346,7 @@ static void submit_bios(struct bio_list *bios) · 9 unmodified lines
346static void issue_bio(struct clone *clone, struct bio *bio)346static void issue_bio(struct clone *clone, struct bio *bio)
347{347{
348 if (!bio_triggers_commit(clone, bio)) {348 if (!bio_triggers_commit(clone, bio)) {
349 generic_make_request(bio);349 submit_bio_noacct(bio);
350 return;350 return;
351 }351 }
352 352
@@ -473,7 +473,7 @@ static void complete_discard_bio(struct clone *clone, struct bio *bio, bool succ · 120 unmodified lines
473 bio_region_range(clone, bio, &rs, &nr_regions);473 bio_region_range(clone, bio, &rs, &nr_regions);
474 trim_bio(bio, region_to_sector(clone, rs),474 trim_bio(bio, region_to_sector(clone, rs),
475 nr_regions << clone->region_shift);475 nr_regions << clone->region_shift);
476 generic_make_request(bio);476 submit_bio_noacct(bio);
477 } else477 } else
478 bio_endio(bio);478 bio_endio(bio);
479}479}
@@ -865,7 +865,7 @@ static void hydration_overwrite(struct dm_clone_region_hydration *hd, struct bio · 385 unmodified lines
865 bio->bi_private = hd;865 bio->bi_private = hd;
866 866
867 atomic_inc(&hd->clone->hydrations_in_flight);867 atomic_inc(&hd->clone->hydrations_in_flight);
868 generic_make_request(bio);868 submit_bio_noacct(bio);
869}869}
870 870
871/*871/*
@@ -1281,7 +1281,7 @@ static void process_deferred_flush_bios(struct clone *clone) · 409 unmodified lines
1281 */1281 */
1282 bio_endio(bio);1282 bio_endio(bio);
1283 } else {1283 } else {
1284 generic_make_request(bio);1284 submit_bio_noacct(bio);
1285 }1285 }
1286 }1286 }
1287}1287}
drivers/md/dm-crypt.c+3−3
@@ -1789,7 +1789,7 @@ static int kcryptd_io_read(struct dm_crypt_io *io, gfp_t gfp) · 1788 unmodified lines
1789 return 1;1789 return 1;
1790 }1790 }
1791 1791
1792 generic_make_request(clone);1792 submit_bio_noacct(clone);
1793 return 0;1793 return 0;
1794}1794}
1795 1795
@@ -1815,7 +1815,7 @@ static void kcryptd_io_write(struct dm_crypt_io *io) · 19 unmodified lines
1815{1815{
1816 struct bio *clone = io->ctx.bio_out;1816 struct bio *clone = io->ctx.bio_out;
1817 1817
1818 generic_make_request(clone);1818 submit_bio_noacct(clone);
1819}1819}
1820 1820
1821#define crypt_io_from_node(node) rb_entry((node), struct dm_crypt_io, rb_node)1821#define crypt_io_from_node(node) rb_entry((node), struct dm_crypt_io, rb_node)
@@ -1893,7 +1893,7 @@ static void kcryptd_crypt_write_io_submit(struct dm_crypt_io *io, int async) · 71 unmodified lines
1893 clone->bi_iter.bi_sector = cc->start + io->sector;1893 clone->bi_iter.bi_sector = cc->start + io->sector;
1894 1894
1895 if (likely(!async) && test_bit(DM_CRYPT_NO_OFFLOAD, &cc->flags)) {1895 if (likely(!async) && test_bit(DM_CRYPT_NO_OFFLOAD, &cc->flags)) {
1896 generic_make_request(clone);1896 submit_bio_noacct(clone);
1897 return;1897 return;
1898 }1898 }
1899 1899
drivers/md/dm-delay.c+1−1
@@ -72,7 +72,7 @@ static void flush_bios(struct bio *bio) · 71 unmodified lines
72 while (bio) {72 while (bio) {
73 n = bio->bi_next;73 n = bio->bi_next;
74 bio->bi_next = NULL;74 bio->bi_next = NULL;
75 generic_make_request(bio);75 submit_bio_noacct(bio);
76 bio = n;76 bio = n;
77 }77 }
78}78}
drivers/md/dm-era-target.c+1−1
@@ -1265,7 +1265,7 @@ static void process_deferred_bios(struct era *era) · 1264 unmodified lines
1265 bio_io_error(bio);1265 bio_io_error(bio);
1266 else1266 else
1267 while ((bio = bio_list_pop(&marked_bios)))1267 while ((bio = bio_list_pop(&marked_bios)))
1268 generic_make_request(bio);1268 submit_bio_noacct(bio);
1269}1269}
1270 1270
1271static void process_rpc_calls(struct era *era)1271static void process_rpc_calls(struct era *era)
drivers/md/dm-integrity.c+2−2
@@ -2115,12 +2115,12 @@ offload_to_thread: · 2114 unmodified lines
2115 dio->in_flight = (atomic_t)ATOMIC_INIT(1);2115 dio->in_flight = (atomic_t)ATOMIC_INIT(1);
2116 dio->completion = NULL;2116 dio->completion = NULL;
2117 2117
2118 generic_make_request(bio);2118 submit_bio_noacct(bio);
2119 2119
2120 return;2120 return;
2121 }2121 }
2122 2122
2123 generic_make_request(bio);2123 submit_bio_noacct(bio);
2124 2124
2125 if (need_sync_io) {2125 if (need_sync_io) {
2126 wait_for_completion_io(&read_comp);2126 wait_for_completion_io(&read_comp);
drivers/md/dm-mpath.c+1−1
@@ -677,7 +677,7 @@ static void process_queued_bios(struct work_struct *work) · 676 unmodified lines
677 bio_endio(bio);677 bio_endio(bio);
678 break;678 break;
679 case DM_MAPIO_REMAPPED:679 case DM_MAPIO_REMAPPED:
680 generic_make_request(bio);680 submit_bio_noacct(bio);
681 break;681 break;
682 case DM_MAPIO_SUBMITTED:682 case DM_MAPIO_SUBMITTED:
683 break;683 break;
drivers/md/dm-raid1.c+1−1
@@ -779,7 +779,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) · 778 unmodified lines
779 wakeup_mirrord(ms);779 wakeup_mirrord(ms);
780 } else {780 } else {
781 map_bio(get_default_mirror(ms), bio);781 map_bio(get_default_mirror(ms), bio);
782 generic_make_request(bio);782 submit_bio_noacct(bio);
783 }783 }
784 }784 }
785}785}
drivers/md/dm-snap-persistent.c+1−1
@@ -252,7 +252,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int op, · 251 unmodified lines
252 252
253 /*253 /*
254 * Issue the synchronous I/O from a different thread254 * Issue the synchronous I/O from a different thread
255 * to avoid generic_make_request recursion.255 * to avoid submit_bio_noacct recursion.
256 */256 */
257 INIT_WORK_ONSTACK(&req.work, do_metadata);257 INIT_WORK_ONSTACK(&req.work, do_metadata);
258 queue_work(ps->metadata_wq, &req.work);258 queue_work(ps->metadata_wq, &req.work);
drivers/md/dm-snap.c+3−3
@@ -1568,7 +1568,7 @@ static void flush_bios(struct bio *bio) · 1567 unmodified lines
1568 while (bio) {1568 while (bio) {
1569 n = bio->bi_next;1569 n = bio->bi_next;
1570 bio->bi_next = NULL;1570 bio->bi_next = NULL;
1571 generic_make_request(bio);1571 submit_bio_noacct(bio);
1572 bio = n;1572 bio = n;
1573 }1573 }
1574}1574}
@@ -1588,7 +1588,7 @@ static void retry_origin_bios(struct dm_snapshot *s, struct bio *bio) · 13 unmodified lines
1588 bio->bi_next = NULL;1588 bio->bi_next = NULL;
1589 r = do_origin(s->origin, bio, false);1589 r = do_origin(s->origin, bio, false);
1590 if (r == DM_MAPIO_REMAPPED)1590 if (r == DM_MAPIO_REMAPPED)
1591 generic_make_request(bio);1591 submit_bio_noacct(bio);
1592 bio = n;1592 bio = n;
1593 }1593 }
1594}1594}
@@ -1829,7 +1829,7 @@ static void start_full_bio(struct dm_snap_pending_exception *pe, · 234 unmodified lines
1829 bio->bi_end_io = full_bio_end_io;1829 bio->bi_end_io = full_bio_end_io;
1830 bio->bi_private = callback_data;1830 bio->bi_private = callback_data;
1831 1831
1832 generic_make_request(bio);1832 submit_bio_noacct(bio);
1833}1833}
1834 1834
1835static struct dm_snap_pending_exception *1835static struct dm_snap_pending_exception *
drivers/md/dm-thin.c+2−2
@@ -758,7 +758,7 @@ static void issue(struct thin_c *tc, struct bio *bio) · 757 unmodified lines
758 struct pool *pool = tc->pool;758 struct pool *pool = tc->pool;
759 759
760 if (!bio_triggers_commit(tc, bio)) {760 if (!bio_triggers_commit(tc, bio)) {
761 generic_make_request(bio);761 submit_bio_noacct(bio);
762 return;762 return;
763 }763 }
764 764
@@ -2394,7 +2394,7 @@ static void process_deferred_bios(struct pool *pool) · 1629 unmodified lines
2394 if (bio->bi_opf & REQ_PREFLUSH)2394 if (bio->bi_opf & REQ_PREFLUSH)
2395 bio_endio(bio);2395 bio_endio(bio);
2396 else2396 else
2397 generic_make_request(bio);2397 submit_bio_noacct(bio);
2398 }2398 }
2399}2399}
2400 2400
drivers/md/dm-verity-target.c+1−1
@@ -681,7 +681,7 @@ static int verity_map(struct dm_target *ti, struct bio *bio) · 680 unmodified lines
681 681
682 verity_submit_prefetch(v, io);682 verity_submit_prefetch(v, io);
683 683
684 generic_make_request(bio);684 submit_bio_noacct(bio);
685 685
686 return DM_MAPIO_SUBMITTED;686 return DM_MAPIO_SUBMITTED;
687}687}
drivers/md/dm-writecache.c+1−1
@@ -1238,7 +1238,7 @@ static int writecache_flush_thread(void *data) · 1237 unmodified lines
1238 bio_end_sector(bio));1238 bio_end_sector(bio));
1239 wc_unlock(wc);1239 wc_unlock(wc);
1240 bio_set_dev(bio, wc->dev->bdev);1240 bio_set_dev(bio, wc->dev->bdev);
1241 generic_make_request(bio);1241 submit_bio_noacct(bio);
1242 } else {1242 } else {
1243 writecache_flush(wc);1243 writecache_flush(wc);
1244 wc_unlock(wc);1244 wc_unlock(wc);
drivers/md/dm-zoned-target.c+1−1
@@ -140,7 +140,7 @@ static int dmz_submit_bio(struct dmz_target *dmz, struct dm_zone *zone, · 139 unmodified lines
140 bio_advance(bio, clone->bi_iter.bi_size);140 bio_advance(bio, clone->bi_iter.bi_size);
141 141
142 refcount_inc(&bioctx->ref);142 refcount_inc(&bioctx->ref);
143 generic_make_request(clone);143 submit_bio_noacct(clone);
144 144
145 if (bio_op(bio) == REQ_OP_WRITE && dmz_is_seq(zone))145 if (bio_op(bio) == REQ_OP_WRITE && dmz_is_seq(zone))
146 zone->wp_block += nr_blocks;146 zone->wp_block += nr_blocks;
drivers/md/dm.c+5−5
@@ -1305,7 +1305,7 @@ static blk_qc_t __map_bio(struct dm_target_io *tio) · 1304 unmodified lines
1305 if (md->type == DM_TYPE_NVME_BIO_BASED)1305 if (md->type == DM_TYPE_NVME_BIO_BASED)
1306 ret = direct_make_request(clone);1306 ret = direct_make_request(clone);
1307 else1307 else
1308 ret = generic_make_request(clone);1308 ret = submit_bio_noacct(clone);
1309 break;1309 break;
1310 case DM_MAPIO_KILL:1310 case DM_MAPIO_KILL:
1311 free_tio(tio);1311 free_tio(tio);
@@ -1652,7 +1652,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, · 340 unmodified lines
1652 error = __split_and_process_non_flush(&ci);1652 error = __split_and_process_non_flush(&ci);
1653 if (current->bio_list && ci.sector_count && !error) {1653 if (current->bio_list && ci.sector_count && !error) {
1654 /*1654 /*
1655 * Remainder must be passed to generic_make_request()1655 * Remainder must be passed to submit_bio_noacct()
1656 * so that it gets handled *after* bios already submitted1656 * so that it gets handled *after* bios already submitted
1657 * have been completely processed.1657 * have been completely processed.
1658 * We take a clone of the original to store in1658 * We take a clone of the original to store in
@@ -1677,7 +1677,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, · 18 unmodified lines
1677 1677
1678 bio_chain(b, bio);1678 bio_chain(b, bio);
1679 trace_block_split(md->queue, b, bio->bi_iter.bi_sector);1679 trace_block_split(md->queue, b, bio->bi_iter.bi_sector);
1680 ret = generic_make_request(bio);1680 ret = submit_bio_noacct(bio);
1681 break;1681 break;
1682 }1682 }
1683 }1683 }
@@ -1745,7 +1745,7 @@ static void dm_queue_split(struct mapped_device *md, struct dm_target *ti, struc · 61 unmodified lines
1745 1745
1746 bio_chain(split, *bio);1746 bio_chain(split, *bio);
1747 trace_block_split(md->queue, split, (*bio)->bi_iter.bi_sector);1747 trace_block_split(md->queue, split, (*bio)->bi_iter.bi_sector);
1748 generic_make_request(*bio);1748 submit_bio_noacct(*bio);
1749 *bio = split;1749 *bio = split;
1750 }1750 }
1751}1751}
@@ -2500,7 +2500,7 @@ static void dm_wq_work(struct work_struct *work) · 748 unmodified lines
2500 break;2500 break;
2501 2501
2502 if (dm_request_based(md))2502 if (dm_request_based(md))
2503 (void) generic_make_request(c);2503 (void) submit_bio_noacct(c);
2504 else2504 else
2505 (void) dm_process_bio(md, map, c);2505 (void) dm_process_bio(md, map, c);
2506 }2506 }
drivers/md/md-faulty.c+2−2
@@ -169,7 +169,7 @@ static bool faulty_make_request(struct mddev *mddev, struct bio *bio) · 168 unmodified lines
169 if (bio_data_dir(bio) == WRITE) {169 if (bio_data_dir(bio) == WRITE) {
170 /* write request */170 /* write request */
171 if (atomic_read(&conf->counters[WriteAll])) {171 if (atomic_read(&conf->counters[WriteAll])) {
172 /* special case - don't decrement, don't generic_make_request,172 /* special case - don't decrement, don't submit_bio_noacct,
173 * just fail immediately173 * just fail immediately
174 */174 */
175 bio_io_error(bio);175 bio_io_error(bio);
@@ -214,7 +214,7 @@ static bool faulty_make_request(struct mddev *mddev, struct bio *bio) · 38 unmodified lines
214 } else214 } else
215 bio_set_dev(bio, conf->rdev->bdev);215 bio_set_dev(bio, conf->rdev->bdev);
216 216
217 generic_make_request(bio);217 submit_bio_noacct(bio);
218 return true;218 return true;
219}219}
220 220
drivers/md/md-linear.c+2−2
@@ -267,7 +267,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio) · 266 unmodified lines
267 struct bio *split = bio_split(bio, end_sector - bio_sector,267 struct bio *split = bio_split(bio, end_sector - bio_sector,
268 GFP_NOIO, &mddev->bio_set);268 GFP_NOIO, &mddev->bio_set);
269 bio_chain(split, bio);269 bio_chain(split, bio);
270 generic_make_request(bio);270 submit_bio_noacct(bio);
271 bio = split;271 bio = split;
272 }272 }
273 273
@@ -286,7 +286,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio) · 12 unmodified lines
286 bio_sector);286 bio_sector);
287 mddev_check_writesame(mddev, bio);287 mddev_check_writesame(mddev, bio);
288 mddev_check_write_zeroes(mddev, bio);288 mddev_check_write_zeroes(mddev, bio);
289 generic_make_request(bio);289 submit_bio_noacct(bio);
290 }290 }
291 return true;291 return true;
292 292
drivers/md/md-multipath.c+2−2
@@ -131,7 +131,7 @@ static bool multipath_make_request(struct mddev *mddev, struct bio * bio) · 130 unmodified lines
131 mp_bh->bio.bi_private = mp_bh;131 mp_bh->bio.bi_private = mp_bh;
132 mddev_check_writesame(mddev, &mp_bh->bio);132 mddev_check_writesame(mddev, &mp_bh->bio);
133 mddev_check_write_zeroes(mddev, &mp_bh->bio);133 mddev_check_write_zeroes(mddev, &mp_bh->bio);
134 generic_make_request(&mp_bh->bio);134 submit_bio_noacct(&mp_bh->bio);
135 return true;135 return true;
136}136}
137 137
@@ -348,7 +348,7 @@ static void multipathd(struct md_thread *thread) · 210 unmodified lines
348 bio->bi_opf |= REQ_FAILFAST_TRANSPORT;348 bio->bi_opf |= REQ_FAILFAST_TRANSPORT;
349 bio->bi_end_io = multipath_end_request;349 bio->bi_end_io = multipath_end_request;
350 bio->bi_private = mp_bh;350 bio->bi_private = mp_bh;
351 generic_make_request(bio);351 submit_bio_noacct(bio);
352 }352 }
353 }353 }
354 spin_unlock_irqrestore(&conf->device_lock, flags);354 spin_unlock_irqrestore(&conf->device_lock, flags);
drivers/md/raid0.c+4−4
@@ -495,7 +495,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio) · 494 unmodified lines
495 zone->zone_end - bio->bi_iter.bi_sector, GFP_NOIO,495 zone->zone_end - bio->bi_iter.bi_sector, GFP_NOIO,
496 &mddev->bio_set);496 &mddev->bio_set);
497 bio_chain(split, bio);497 bio_chain(split, bio);
498 generic_make_request(bio);498 submit_bio_noacct(bio);
499 bio = split;499 bio = split;
500 end = zone->zone_end;500 end = zone->zone_end;
501 } else501 } else
@@ -559,7 +559,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio) · 57 unmodified lines
559 trace_block_bio_remap(bdev_get_queue(rdev->bdev),559 trace_block_bio_remap(bdev_get_queue(rdev->bdev),
560 discard_bio, disk_devt(mddev->gendisk),560 discard_bio, disk_devt(mddev->gendisk),
561 bio->bi_iter.bi_sector);561 bio->bi_iter.bi_sector);
562 generic_make_request(discard_bio);562 submit_bio_noacct(discard_bio);
563 }563 }
564 bio_endio(bio);564 bio_endio(bio);
565}565}
@@ -600,7 +600,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio) · 34 unmodified lines
600 struct bio *split = bio_split(bio, sectors, GFP_NOIO,600 struct bio *split = bio_split(bio, sectors, GFP_NOIO,
601 &mddev->bio_set);601 &mddev->bio_set);
602 bio_chain(split, bio);602 bio_chain(split, bio);
603 generic_make_request(bio);603 submit_bio_noacct(bio);
604 bio = split;604 bio = split;
605 }605 }
606 606
@@ -633,7 +633,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio) · 26 unmodified lines
633 disk_devt(mddev->gendisk), bio_sector);633 disk_devt(mddev->gendisk), bio_sector);
634 mddev_check_writesame(mddev, bio);634 mddev_check_writesame(mddev, bio);
635 mddev_check_write_zeroes(mddev, bio);635 mddev_check_write_zeroes(mddev, bio);
636 generic_make_request(bio);636 submit_bio_noacct(bio);
637 return true;637 return true;
638}638}
639 639
drivers/md/raid1.c+7−7
@@ -834,7 +834,7 @@ static void flush_bio_list(struct r1conf *conf, struct bio *bio) · 833 unmodified lines
834 /* Just ignore it */834 /* Just ignore it */
835 bio_endio(bio);835 bio_endio(bio);
836 else836 else
837 generic_make_request(bio);837 submit_bio_noacct(bio);
838 bio = next;838 bio = next;
839 cond_resched();839 cond_resched();
840 }840 }
@@ -1312,7 +1312,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio, · 471 unmodified lines
1312 struct bio *split = bio_split(bio, max_sectors,1312 struct bio *split = bio_split(bio, max_sectors,
1313 gfp, &conf->bio_split);1313 gfp, &conf->bio_split);
1314 bio_chain(split, bio);1314 bio_chain(split, bio);
1315 generic_make_request(bio);1315 submit_bio_noacct(bio);
1316 bio = split;1316 bio = split;
1317 r1_bio->master_bio = bio;1317 r1_bio->master_bio = bio;
1318 r1_bio->sectors = max_sectors;1318 r1_bio->sectors = max_sectors;
@@ -1338,7 +1338,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio, · 19 unmodified lines
1338 trace_block_bio_remap(read_bio->bi_disk->queue, read_bio,1338 trace_block_bio_remap(read_bio->bi_disk->queue, read_bio,
1339 disk_devt(mddev->gendisk), r1_bio->sector);1339 disk_devt(mddev->gendisk), r1_bio->sector);
1340 1340
1341 generic_make_request(read_bio);1341 submit_bio_noacct(read_bio);
1342}1342}
1343 1343
1344static void raid1_write_request(struct mddev *mddev, struct bio *bio,1344static void raid1_write_request(struct mddev *mddev, struct bio *bio,
@@ -1483,7 +1483,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio, · 138 unmodified lines
1483 struct bio *split = bio_split(bio, max_sectors,1483 struct bio *split = bio_split(bio, max_sectors,
1484 GFP_NOIO, &conf->bio_split);1484 GFP_NOIO, &conf->bio_split);
1485 bio_chain(split, bio);1485 bio_chain(split, bio);
1486 generic_make_request(bio);1486 submit_bio_noacct(bio);
1487 bio = split;1487 bio = split;
1488 r1_bio->master_bio = bio;1488 r1_bio->master_bio = bio;
1489 r1_bio->sectors = max_sectors;1489 r1_bio->sectors = max_sectors;
@@ -2240,7 +2240,7 @@ static void sync_request_write(struct mddev *mddev, struct r1bio *r1_bio) · 750 unmodified lines
2240 atomic_inc(&r1_bio->remaining);2240 atomic_inc(&r1_bio->remaining);
2241 md_sync_acct(conf->mirrors[i].rdev->bdev, bio_sectors(wbio));2241 md_sync_acct(conf->mirrors[i].rdev->bdev, bio_sectors(wbio));
2242 2242
2243 generic_make_request(wbio);2243 submit_bio_noacct(wbio);
2244 }2244 }
2245 2245
2246 put_sync_write_buf(r1_bio, 1);2246 put_sync_write_buf(r1_bio, 1);
@@ -2926,7 +2926,7 @@ static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr, · 679 unmodified lines
2926 md_sync_acct_bio(bio, nr_sectors);2926 md_sync_acct_bio(bio, nr_sectors);
2927 if (read_targets == 1)2927 if (read_targets == 1)
2928 bio->bi_opf &= ~MD_FAILFAST;2928 bio->bi_opf &= ~MD_FAILFAST;
2929 generic_make_request(bio);2929 submit_bio_noacct(bio);
2930 }2930 }
2931 }2931 }
2932 } else {2932 } else {
@@ -2935,7 +2935,7 @@ static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr, · 2 unmodified lines
2935 md_sync_acct_bio(bio, nr_sectors);2935 md_sync_acct_bio(bio, nr_sectors);
2936 if (read_targets == 1)2936 if (read_targets == 1)
2937 bio->bi_opf &= ~MD_FAILFAST;2937 bio->bi_opf &= ~MD_FAILFAST;
2938 generic_make_request(bio);2938 submit_bio_noacct(bio);
2939 }2939 }
2940 return nr_sectors;2940 return nr_sectors;
2941}2941}
drivers/md/raid10.c+14−14
@@ -917,7 +917,7 @@ static void flush_pending_writes(struct r10conf *conf) · 916 unmodified lines
917 /* Just ignore it */917 /* Just ignore it */
918 bio_endio(bio);918 bio_endio(bio);
919 else919 else
920 generic_make_request(bio);920 submit_bio_noacct(bio);
921 bio = next;921 bio = next;
922 }922 }
923 blk_finish_plug(&plug);923 blk_finish_plug(&plug);
@@ -1102,7 +1102,7 @@ static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule) · 178 unmodified lines
1102 /* Just ignore it */1102 /* Just ignore it */
1103 bio_endio(bio);1103 bio_endio(bio);
1104 else1104 else
1105 generic_make_request(bio);1105 submit_bio_noacct(bio);
1106 bio = next;1106 bio = next;
1107 }1107 }
1108 kfree(plug);1108 kfree(plug);
@@ -1194,7 +1194,7 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio, · 85 unmodified lines
1194 gfp, &conf->bio_split);1194 gfp, &conf->bio_split);
1195 bio_chain(split, bio);1195 bio_chain(split, bio);
1196 allow_barrier(conf);1196 allow_barrier(conf);
1197 generic_make_request(bio);1197 submit_bio_noacct(bio);
1198 wait_barrier(conf);1198 wait_barrier(conf);
1199 bio = split;1199 bio = split;
1200 r10_bio->master_bio = bio;1200 r10_bio->master_bio = bio;
@@ -1221,7 +1221,7 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio, · 20 unmodified lines
1221 trace_block_bio_remap(read_bio->bi_disk->queue,1221 trace_block_bio_remap(read_bio->bi_disk->queue,
1222 read_bio, disk_devt(mddev->gendisk),1222 read_bio, disk_devt(mddev->gendisk),
1223 r10_bio->sector);1223 r10_bio->sector);
1224 generic_make_request(read_bio);1224 submit_bio_noacct(read_bio);
1225 return;1225 return;
1226}1226}
1227 1227
@@ -1479,7 +1479,7 @@ retry_write: · 251 unmodified lines
1479 GFP_NOIO, &conf->bio_split);1479 GFP_NOIO, &conf->bio_split);
1480 bio_chain(split, bio);1480 bio_chain(split, bio);
1481 allow_barrier(conf);1481 allow_barrier(conf);
1482 generic_make_request(bio);1482 submit_bio_noacct(bio);
1483 wait_barrier(conf);1483 wait_barrier(conf);
1484 bio = split;1484 bio = split;
1485 r10_bio->master_bio = bio;1485 r10_bio->master_bio = bio;
@@ -2099,7 +2099,7 @@ static void sync_request_write(struct mddev *mddev, struct r10bio *r10_bio) · 613 unmodified lines
2099 tbio->bi_opf |= MD_FAILFAST;2099 tbio->bi_opf |= MD_FAILFAST;
2100 tbio->bi_iter.bi_sector += conf->mirrors[d].rdev->data_offset;2100 tbio->bi_iter.bi_sector += conf->mirrors[d].rdev->data_offset;
2101 bio_set_dev(tbio, conf->mirrors[d].rdev->bdev);2101 bio_set_dev(tbio, conf->mirrors[d].rdev->bdev);
2102 generic_make_request(tbio);2102 submit_bio_noacct(tbio);
2103 }2103 }
2104 2104
2105 /* Now write out to any replacement devices2105 /* Now write out to any replacement devices
@@ -2118,7 +2118,7 @@ static void sync_request_write(struct mddev *mddev, struct r10bio *r10_bio) · 12 unmodified lines
2118 atomic_inc(&r10_bio->remaining);2118 atomic_inc(&r10_bio->remaining);
2119 md_sync_acct(conf->mirrors[d].replacement->bdev,2119 md_sync_acct(conf->mirrors[d].replacement->bdev,
2120 bio_sectors(tbio));2120 bio_sectors(tbio));
2121 generic_make_request(tbio);2121 submit_bio_noacct(tbio);
2122 }2122 }
2123 2123
2124done:2124done:
@@ -2241,7 +2241,7 @@ static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio) · 116 unmodified lines
2241 wbio = r10_bio->devs[1].bio;2241 wbio = r10_bio->devs[1].bio;
2242 wbio2 = r10_bio->devs[1].repl_bio;2242 wbio2 = r10_bio->devs[1].repl_bio;
2243 /* Need to test wbio2->bi_end_io before we call2243 /* Need to test wbio2->bi_end_io before we call
2244 * generic_make_request as if the former is NULL,2244 * submit_bio_noacct as if the former is NULL,
2245 * the latter is free to free wbio2.2245 * the latter is free to free wbio2.
2246 */2246 */
2247 if (wbio2 && !wbio2->bi_end_io)2247 if (wbio2 && !wbio2->bi_end_io)
@@ -2249,13 +2249,13 @@ static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio) · 1 unmodified line
2249 if (wbio->bi_end_io) {2249 if (wbio->bi_end_io) {
2250 atomic_inc(&conf->mirrors[d].rdev->nr_pending);2250 atomic_inc(&conf->mirrors[d].rdev->nr_pending);
2251 md_sync_acct(conf->mirrors[d].rdev->bdev, bio_sectors(wbio));2251 md_sync_acct(conf->mirrors[d].rdev->bdev, bio_sectors(wbio));
2252 generic_make_request(wbio);2252 submit_bio_noacct(wbio);
2253 }2253 }
2254 if (wbio2) {2254 if (wbio2) {
2255 atomic_inc(&conf->mirrors[d].replacement->nr_pending);2255 atomic_inc(&conf->mirrors[d].replacement->nr_pending);
2256 md_sync_acct(conf->mirrors[d].replacement->bdev,2256 md_sync_acct(conf->mirrors[d].replacement->bdev,
2257 bio_sectors(wbio2));2257 bio_sectors(wbio2));
2258 generic_make_request(wbio2);2258 submit_bio_noacct(wbio2);
2259 }2259 }
2260}2260}
2261 2261
@@ -2889,7 +2889,7 @@ static void raid10_set_cluster_sync_high(struct r10conf *conf) · 627 unmodified lines
2889 * a number of r10_bio structures, one for each out-of-sync device.2889 * a number of r10_bio structures, one for each out-of-sync device.
2890 * As we setup these structures, we collect all bio's together into a list2890 * As we setup these structures, we collect all bio's together into a list
2891 * which we then process collectively to add pages, and then process again2891 * which we then process collectively to add pages, and then process again
2892 * to pass to generic_make_request.2892 * to pass to submit_bio_noacct.
2893 *2893 *
2894 * The r10_bio structures are linked using a borrowed master_bio pointer.2894 * The r10_bio structures are linked using a borrowed master_bio pointer.
2895 * This link is counted in ->remaining. When the r10_bio that points to NULL2895 * This link is counted in ->remaining. When the r10_bio that points to NULL
@@ -3496,7 +3496,7 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr, · 600 unmodified lines
3496 if (bio->bi_end_io == end_sync_read) {3496 if (bio->bi_end_io == end_sync_read) {
3497 md_sync_acct_bio(bio, nr_sectors);3497 md_sync_acct_bio(bio, nr_sectors);
3498 bio->bi_status = 0;3498 bio->bi_status = 0;
3499 generic_make_request(bio);3499 submit_bio_noacct(bio);
3500 }3500 }
3501 }3501 }
3502 3502
@@ -4654,7 +4654,7 @@ read_more: · 1151 unmodified lines
4654 md_sync_acct_bio(read_bio, r10_bio->sectors);4654 md_sync_acct_bio(read_bio, r10_bio->sectors);
4655 atomic_inc(&r10_bio->remaining);4655 atomic_inc(&r10_bio->remaining);
4656 read_bio->bi_next = NULL;4656 read_bio->bi_next = NULL;
4657 generic_make_request(read_bio);4657 submit_bio_noacct(read_bio);
4658 sectors_done += nr_sectors;4658 sectors_done += nr_sectors;
4659 if (sector_nr <= last)4659 if (sector_nr <= last)
4660 goto read_more;4660 goto read_more;
@@ -4717,7 +4717,7 @@ static void reshape_request_write(struct mddev *mddev, struct r10bio *r10_bio) · 56 unmodified lines
4717 md_sync_acct_bio(b, r10_bio->sectors);4717 md_sync_acct_bio(b, r10_bio->sectors);
4718 atomic_inc(&r10_bio->remaining);4718 atomic_inc(&r10_bio->remaining);
4719 b->bi_next = NULL;4719 b->bi_next = NULL;
4720 generic_make_request(b);4720 submit_bio_noacct(b);
4721 }4721 }
4722 end_reshape_request(r10_bio);4722 end_reshape_request(r10_bio);
4723}4723}
drivers/md/raid5.c+5−5
@@ -873,7 +873,7 @@ static void dispatch_bio_list(struct bio_list *tmp) · 872 unmodified lines
873 struct bio *bio;873 struct bio *bio;
874 874
875 while ((bio = bio_list_pop(tmp)))875 while ((bio = bio_list_pop(tmp)))
876 generic_make_request(bio);876 submit_bio_noacct(bio);
877}877}
878 878
879static int cmp_stripe(void *priv, struct list_head *a, struct list_head *b)879static int cmp_stripe(void *priv, struct list_head *a, struct list_head *b)
@@ -1151,7 +1151,7 @@ again: · 271 unmodified lines
1151 if (should_defer && op_is_write(op))1151 if (should_defer && op_is_write(op))
1152 bio_list_add(&pending_bios, bi);1152 bio_list_add(&pending_bios, bi);
1153 else1153 else
1154 generic_make_request(bi);1154 submit_bio_noacct(bi);
1155 }1155 }
1156 if (rrdev) {1156 if (rrdev) {
1157 if (s->syncing || s->expanding || s->expanded1157 if (s->syncing || s->expanding || s->expanded
@@ -1201,7 +1201,7 @@ again: · 43 unmodified lines
1201 if (should_defer && op_is_write(op))1201 if (should_defer && op_is_write(op))
1202 bio_list_add(&pending_bios, rbi);1202 bio_list_add(&pending_bios, rbi);
1203 else1203 else
1204 generic_make_request(rbi);1204 submit_bio_noacct(rbi);
1205 }1205 }
1206 if (!rdev && !rrdev) {1206 if (!rdev && !rrdev) {
1207 if (op_is_write(op))1207 if (op_is_write(op))
@@ -5289,7 +5289,7 @@ static int raid5_read_one_chunk(struct mddev *mddev, struct bio *raid_bio) · 4081 unmodified lines
5289 trace_block_bio_remap(align_bi->bi_disk->queue,5289 trace_block_bio_remap(align_bi->bi_disk->queue,
5290 align_bi, disk_devt(mddev->gendisk),5290 align_bi, disk_devt(mddev->gendisk),
5291 raid_bio->bi_iter.bi_sector);5291 raid_bio->bi_iter.bi_sector);
5292 generic_make_request(align_bi);5292 submit_bio_noacct(align_bi);
5293 return 1;5293 return 1;
5294 } else {5294 } else {
5295 rcu_read_unlock();5295 rcu_read_unlock();
@@ -5309,7 +5309,7 @@ static struct bio *chunk_aligned_read(struct mddev *mddev, struct bio *raid_bio) · 13 unmodified lines
5309 struct r5conf *conf = mddev->private;5309 struct r5conf *conf = mddev->private;
5310 split = bio_split(raid_bio, sectors, GFP_NOIO, &conf->bio_split);5310 split = bio_split(raid_bio, sectors, GFP_NOIO, &conf->bio_split);
5311 bio_chain(split, raid_bio);5311 bio_chain(split, raid_bio);
5312 generic_make_request(raid_bio);5312 submit_bio_noacct(raid_bio);
5313 raid_bio = split;5313 raid_bio = split;
5314 }5314 }
5315 5315
drivers/nvme/host/multipath.c+1−1
@@ -351,7 +351,7 @@ static void nvme_requeue_work(struct work_struct *work) · 350 unmodified lines
351 * path.351 * path.
352 */352 */
353 bio->bi_disk = head->disk;353 bio->bi_disk = head->disk;
354 generic_make_request(bio);354 submit_bio_noacct(bio);
355 }355 }
356}356}
357 357
include/linux/blkdev.h+1−1
@@ -852,7 +852,7 @@ static inline void rq_flush_dcache_pages(struct request *rq) · 851 unmodified lines
852 852
853extern int blk_register_queue(struct gendisk *disk);853extern int blk_register_queue(struct gendisk *disk);
854extern void blk_unregister_queue(struct gendisk *disk);854extern void blk_unregister_queue(struct gendisk *disk);
855extern blk_qc_t generic_make_request(struct bio *bio);855blk_qc_t submit_bio_noacct(struct bio *bio);
856extern blk_qc_t direct_make_request(struct bio *bio);856extern blk_qc_t direct_make_request(struct bio *bio);
857extern void blk_rq_init(struct request_queue *q, struct request *rq);857extern void blk_rq_init(struct request_queue *q, struct request *rq);
858extern void blk_put_request(struct request *);858extern void blk_put_request(struct request *);