>>>>> Andreas Dilger (AD) writes:

 AD> On Jan 12, 2007  03:18 +0300, Alex Tomas wrote:
 >> +   /* after split, a leaf can get zero entries
 >> +    * thus there is nothing to check */
 >> +   if (le16_to_cpu(path->p_hdr->eh_entries) == 0)
 >> +           return 0;
 >> +
 >> +   if (depth == 0)
 >> +           first = le32_to_cpu(EXT_FIRST_EXTENT(path->p_hdr)->ee_block);
 >> +   else
 >> +           first = le32_to_cpu(EXT_FIRST_INDEX(path->p_hdr)->ei_block);
 >> +   path--;
 >> +   key = le32_to_cpu(path->p_idx->ei_block);
 >> +   
 >> +   if (likely(first == key))
 >> +           return 0;

 AD> What happens if, say, a leaf is split and then the first part of the split
 AD> is removed?  This could only happen with punch() on a running filesystem,
 AD> but in e2fsck a corrupt extent will be removed from the leaf without
 AD> updating the parent index's range.

hmm. e2fsck must update. there are other places in extents where
first extent in a block is supposed to match key in index.
ldiskfs_ext_next_allocated_block(), for example.

thanks, Alex
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to