From: Raúl Porcel <armin76@xxxxxxxxxx> Date: Sun, 29 Jul 2012 13:35:54 +0200 > With the rewrite of the e2fs part of SILO, its unable to read > /etc/silo.conf from an EXT4 FS. It can read from EXT2 and EXT3, > though. There are some minor errors in the extent leaf traversal, can you try this patch below? If this fails I'll give you a patch which adds some tracing so we can diagnose this further. Thanks! diff --git a/second/fs/ext2.c b/second/fs/ext2.c index 7eb665f..018aced 100644 --- a/second/fs/ext2.c +++ b/second/fs/ext2.c @@ -147,7 +147,7 @@ static struct ext4_extent_header *search_leaf(struct silo_ext2_state *s, return ehp; for (i = 0; i < ext2_to_cpu_16(ehp->eh_entries); i++, idxp++) - if (ext2_to_cpu_32(idxp->ei_block) > file_block) + if (file_block < ext2_to_cpu_32(idxp->ei_block)) break; if (i == 0) @@ -226,14 +226,15 @@ static unsigned long long resolve_extent(struct silo_ext2_state *s, ep = (struct ext4_extent *) (ehp + 1); for (i = 0; i < ext2_to_cpu_16(ehp->eh_entries); i++, ep++) - if (ext2_to_cpu_32(ep->ee_block) > file_block) + if (file_block < ext2_to_cpu_32(ep->ee_block)) break; if (i == 0) return BLOCK_MAP_ERROR; + ep -= 1; file_block -= ext2_to_cpu_32(ep->ee_block); - if (ext2_to_cpu_16(ep->ee_len) < file_block) + if (file_block >= ext2_to_cpu_16(ep->ee_len)) return BLOCK_MAP_ERROR; hi = ((unsigned long long)ext2_to_cpu_16(ep->ee_start_hi)) << 32; -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html