On Fri, Jun 15, 2012 at 06:16:29PM +0800, Robin Dong wrote: > > + /* > > + * 'err==len' means that all of blocks has been preallocated no > > + * matter they are initialized or not. For excluding > > + * uninitialized extents, we need to check m_flags. There are > > + * two conditions that indicate for initialized extents. > > + * 1) If we hit extent cache, EXT4_MAP_MAPPED flag is returned; > > + * 2) If we do a real lookup, non-flags are returned. > > + * So we should check these two conditions. > > + */ > > + if (err == len && (!map.m_flags || > > + map.m_flags & EXT4_MAP_MAPPED)) > > If we do a real lookup in ext4_map_blocks, it also return with > EXT4_MAP_MAPPED flag, the condition should be: > > if (err == len && (map.m_flags & EXT4_MAP_MAPPED)) Yes, you are right. I will fix it in next version. Regards, Zheng -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html