diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index f1db689667ea..59806e67a175 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -925,6 +925,16 @@ static int dm_merge_bvec(struct request_queue *q, | |||
925 | */ | 925 | */ |
926 | if (max_size && ti->type->merge) | 926 | if (max_size && ti->type->merge) |
927 | max_size = ti->type->merge(ti, bvm, biovec, max_size); | 927 | max_size = ti->type->merge(ti, bvm, biovec, max_size); |
928 | /* | ||
929 | * If the target doesn't support merge method and some of the devices | ||
930 | * provided their merge_bvec method (we know this by looking at | ||
931 | * queue_max_hw_sectors), then we can't allow bios with multiple vector | ||
932 | * entries. So always set max_size to 0, and the code below allows | ||
933 | * just one page. | ||
934 | */ | ||
935 | else if (queue_max_hw_sectors(q) <= PAGE_SIZE >> 9) | ||
936 | |||
937 | max_size = 0; | ||
928 | 938 | ||
929 | out_table: | 939 | out_table: |
930 | dm_table_put(map); | 940 | dm_table_put(map); |