hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/md/md-multipath.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * multipath.c : Multiple Devices driver for Linux
34 *
....@@ -8,15 +9,6 @@
89 * MULTIPATH management functions.
910 *
1011 * derived from raid1.c.
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation; either version 2, or (at your option)
15
- * any later version.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * (for example /usr/src/linux/COPYING); if not, write to the Free
19
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2012 */
2113
2214 #include <linux/blkdev.h>
....@@ -139,7 +131,7 @@
139131 mp_bh->bio.bi_private = mp_bh;
140132 mddev_check_writesame(mddev, &mp_bh->bio);
141133 mddev_check_write_zeroes(mddev, &mp_bh->bio);
142
- generic_make_request(&mp_bh->bio);
134
+ submit_bio_noacct(&mp_bh->bio);
143135 return true;
144136 }
145137
....@@ -157,28 +149,6 @@
157149 }
158150 rcu_read_unlock();
159151 seq_putc(seq, ']');
160
-}
161
-
162
-static int multipath_congested(struct mddev *mddev, int bits)
163
-{
164
- struct mpconf *conf = mddev->private;
165
- int i, ret = 0;
166
-
167
- rcu_read_lock();
168
- for (i = 0; i < mddev->raid_disks ; i++) {
169
- struct md_rdev *rdev = rcu_dereference(conf->multipaths[i].rdev);
170
- if (rdev && !test_bit(Faulty, &rdev->flags)) {
171
- struct request_queue *q = bdev_get_queue(rdev->bdev);
172
-
173
- ret |= bdi_congested(q->backing_dev_info, bits);
174
- /* Just like multipath_map, we just check the
175
- * first available device
176
- */
177
- break;
178
- }
179
- }
180
- rcu_read_unlock();
181
- return ret;
182152 }
183153
184154 /*
....@@ -356,7 +326,7 @@
356326 bio->bi_opf |= REQ_FAILFAST_TRANSPORT;
357327 bio->bi_end_io = multipath_end_request;
358328 bio->bi_private = mp_bh;
359
- generic_make_request(bio);
329
+ submit_bio_noacct(bio);
360330 }
361331 }
362332 spin_unlock_irqrestore(&conf->device_lock, flags);
....@@ -486,7 +456,6 @@
486456 .hot_add_disk = multipath_add_disk,
487457 .hot_remove_disk= multipath_remove_disk,
488458 .size = multipath_size,
489
- .congested = multipath_congested,
490459 };
491460
492461 static int __init multipath_init (void)