xfs_swap_extent_forks() was wrongly using di_nextents (on-disk extents) for determining whether the /incore/ inode could keep extents inline. The code should be testing if_bytes, not di_nextents, to make this determination. The mistake led to an oops in some situations when running xfs_fsr. Throughout the code we have this sort of open-coded handling like: nextents = ip->i_df.if_bytes / (uint)sizeof(xfs_bmbt_rec_t); so patch 2 creates a helper for that and uses it throughout the codebase. I should maybe also create a helper for the things that expand it back out, i.e. nextents * (uint)sizeof(xfs_bmbt_rec_t) but that seems error prone... -Eric -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html