summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-07-05 19:52:27 -0700
committerBrian Behlendorf <[email protected]>2019-07-05 20:38:56 -0700
commit1086f54219ebcdebf05b8f6bd10142c43c1f4f3f (patch)
treedae5def33a28d0035556cab4e9669f35ab4bfff6 /module
parent52a83dc6940ebeaca91f53494bb9be6f9b6bbc52 (diff)
Revert "Fail early on bio corruption confirmed on 5.2-rc1"
This reverts commit aa7aab6c457f106d2b794b9adf3fe5aa451ad8e. The change is not compatible with CentOS 6's 2.6.32 based kernel due to differnces in the bio layer. Signed-off-by: Brian Behlendorf <[email protected]> Issue #8961
Diffstat (limited to 'module')
-rw-r--r--module/zfs/vdev_disk.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
index 8f06c4117..1686ddfce 100644
--- a/module/zfs/vdev_disk.c
+++ b/module/zfs/vdev_disk.c
@@ -621,7 +621,6 @@ retry:
bio_offset = io_offset;
bio_size = io_size;
for (i = 0; i <= dr->dr_bio_count; i++) {
- unsigned int nr_iovecs;
/* Finished constructing bio's for given buffer */
if (bio_size <= 0)
@@ -639,11 +638,10 @@ retry:
}
/* bio_alloc() with __GFP_WAIT never returns NULL */
- nr_iovecs = MIN(abd_nr_pages_off(zio->io_abd, bio_size,
- abd_offset), BIO_MAX_PAGES);
- dr->dr_bio[i] = bio_alloc(GFP_NOIO, nr_iovecs);
- if (unlikely(dr->dr_bio[i] == NULL ||
- (unsigned int)dr->dr_bio[i]->bi_max_vecs != nr_iovecs)) {
+ dr->dr_bio[i] = bio_alloc(GFP_NOIO,
+ MIN(abd_nr_pages_off(zio->io_abd, bio_size, abd_offset),
+ BIO_MAX_PAGES));
+ if (unlikely(dr->dr_bio[i] == NULL)) {
vdev_disk_dio_free(dr);
return (SET_ERROR(ENOMEM));
}