* grub-core/fs/zfs/zfs.c (read_device): Support raidz3.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-03 07:29:35 +01:00
parent 177440046d
commit cf5ba824ea
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2011-11-03 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/zfs/zfs.c (read_device): Support raidz3.
2011-11-02 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/zfs/zfs.c (read_device): Add ability to sustain a single

View file

@ -904,7 +904,7 @@ read_device (grub_uint64_t offset, struct grub_zfs_device_desc *desc,
void *recovery_buf = NULL;
grub_size_t recovery_len = 0;
if (desc->nparity < 1 || desc->nparity > 2)
if (desc->nparity < 1 || desc->nparity > 3)
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"raidz%d is not supported", desc->nparity);
@ -914,9 +914,10 @@ read_device (grub_uint64_t offset, struct grub_zfs_device_desc *desc,
high = grub_divmod64 ((offset >> desc->ashift),
desc->n_children, &m);
if (desc->nparity == 2)
c = 2;
if (desc->nparity == 3)
c = 3;
while (len > 0)
{
grub_size_t csize;