diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-12 12:07:34 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-12 12:07:34 +0100 |
commit | 485edc675200ff3097cec521c357441a1c2d9b0d (patch) | |
tree | 7edee2fc5e1fb60caa90f3bb26b1becde9691b99 /lib/ext2fs/res_gdt.c | |
parent | 1ab0ea88057e922a89c6b8feebeb62c57e40f8de (diff) | |
parent | 5f4b406b03dc9fa27c78184df5b1d501e373ca01 (diff) | |
download | e2fsprogs-baserock/morph.tar.gz |
Merge 'baserock/richardmaw/yakshave/util-linux-blkid' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius
Reviewed-by: Sam Thursfield
Diffstat (limited to 'lib/ext2fs/res_gdt.c')
-rw-r--r-- | lib/ext2fs/res_gdt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/ext2fs/res_gdt.c b/lib/ext2fs/res_gdt.c index 6449228c..e61c3303 100644 --- a/lib/ext2fs/res_gdt.c +++ b/lib/ext2fs/res_gdt.c @@ -31,6 +31,19 @@ static unsigned int list_backups(ext2_filsys fs, unsigned int *three, int mult = 3; unsigned int ret; + if (fs->super->s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2) { + if (*min == 1) { + *min += 1; + if (fs->super->s_backup_bgs[0]) + return fs->super->s_backup_bgs[0]; + } + if (*min == 2) { + *min += 1; + if (fs->super->s_backup_bgs[1]) + return fs->super->s_backup_bgs[1]; + } + return fs->group_desc_count; + } if (!(fs->super->s_feature_ro_compat & EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) { ret = *min; |