summaryrefslogtreecommitdiff
path: root/usr/src/grub
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/grub')
-rw-r--r--usr/src/grub/capability4
-rw-r--r--usr/src/grub/grub-0.97/stage2/fsys_zfs.c21
2 files changed, 13 insertions, 12 deletions
diff --git a/usr/src/grub/capability b/usr/src/grub/capability
index 12d0ea054a..72f4bf9b83 100644
--- a/usr/src/grub/capability
+++ b/usr/src/grub/capability
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2013 by Delphix. All rights reserved.
+# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
# Copyright 2013 Saso Kiselkov. All rights reserved.
#
# This file defines the current capabilities of GRUB over and above that
@@ -30,7 +30,7 @@
# GRUB necessitating that the boot blocks be reinstalled for that fix or
# enhancement to take effect.
#
-VERSION=25
+VERSION=26
dboot
xVM
zfs
diff --git a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c
index 019fbc76c6..8c0d137e42 100644
--- a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c
+++ b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c
@@ -23,7 +23,7 @@
*/
/*
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
*/
@@ -368,17 +368,23 @@ zio_read_data(blkptr_t *bp, void *buf, char *stack)
continue;
if (DVA_GET_GANG(&bp->blk_dva[i])) {
- if (zio_read_gang(bp, &bp->blk_dva[i], buf, stack) == 0)
- return (0);
+ if (zio_read_gang(bp, &bp->blk_dva[i], buf, stack) != 0)
+ continue;
} else {
/* read in a data block */
offset = DVA_GET_OFFSET(&bp->blk_dva[i]);
sector = DVA_OFFSET_TO_PHYS_SECTOR(offset);
- if (devread(sector, 0, psize, buf) != 0)
- return (0);
+ if (devread(sector, 0, psize, buf) == 0)
+ continue;
+ }
+
+ /* verify that the checksum matches */
+ if (zio_checksum_verify(bp, buf, psize) == 0) {
+ return (0);
}
}
+ grub_printf("could not read block due to EIO or ECKSUM\n");
return (1);
}
@@ -499,11 +505,6 @@ zio_read(blkptr_t *bp, void *buf, char *stack)
return (ERR_FSYS_CORRUPT);
}
- if (zio_checksum_verify(bp, buf, psize) != 0) {
- grub_printf("checksum verification failed\n");
- return (ERR_FSYS_CORRUPT);
- }
-
if (comp != ZIO_COMPRESS_OFF) {
if (decomp_table[comp].decomp_func(buf, retbuf, psize,
lsize) != 0) {