diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-10-13 11:45:01 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-10-13 11:45:01 +0000 |
commit | ac0a0c16e96b64cdfdc17638bb31a18b68feb90e (patch) | |
tree | e883c35dbba6a3411f78ec84d295857da273ead8 /usr/src/grub | |
parent | 40de0c8e2114b07dd8bd8e05ad3c199f84f96b41 (diff) | |
parent | e9316f7696401f3e5e263a5939031cb8d5641a88 (diff) | |
download | illumos-joyent-ac0a0c16e96b64cdfdc17638bb31a18b68feb90e.tar.gz |
[illumos-gate merge]
commit e9316f7696401f3e5e263a5939031cb8d5641a88
6298 zfs_create_008_neg and zpool_create_023_neg need to be updated for large block support
commit 28c4d110d9dd87af1d9dcf1bf503cea2e7c03b91
6128 tar should check prefix field when detecting EOT
6129 tar debug output should be available in all builds
commit d94527b3280cbf89d5360b28aff9e822cd79d0e6
6294 GRUB should try all DVAs
Conflicts:
usr/src/cmd/tar/tar.c
Diffstat (limited to 'usr/src/grub')
-rw-r--r-- | usr/src/grub/capability | 4 | ||||
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/fsys_zfs.c | 21 |
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) { |