projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MD: ignore discard request for hard disks of hybid raid1/raid10 array
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
drivers
/
md
/
raid10.c
diff --git
a/drivers/md/raid10.c
b/drivers/md/raid10.c
index c35d912a7f9bc62dec0a80934f9b637a99d687d8..018741ba93104d9ad432d7524a136cf7e69b2227 100644
(file)
--- a/
drivers/md/raid10.c
+++ b/
drivers/md/raid10.c
@@
-1133,7
+1133,12
@@
static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule)
while (bio) { /* submit pending writes */
struct bio *next = bio->bi_next;
bio->bi_next = NULL;
while (bio) { /* submit pending writes */
struct bio *next = bio->bi_next;
bio->bi_next = NULL;
- generic_make_request(bio);
+ if (unlikely((bio->bi_rw & REQ_DISCARD) &&
+ !blk_queue_discard(bdev_get_queue(bio->bi_bdev))))
+ /* Just ignore it */
+ bio_endio(bio, 0);
+ else
+ generic_make_request(bio);
bio = next;
}
kfree(plug);
bio = next;
}
kfree(plug);