It can be remvoed when SGI has a fix to bug 791117
*** xfs_dfrag.c.orig Fri Aug 4 12:19:14 2000
--- xfs_dfrag.c Fri Aug 4 12:19:26 2000
***************
*** 256,261 ****
--- 256,276 ----
goto error0;
}
+ /*
+ * IRIX xfs Bug 791117 - Lunux has it to.
+ * Verify that there is enough room for the temp file extents data
fork.
+ * With out this check the swapext function could corrupt the
+ * target files inode if it has file attribute's.
+ * We just act like it is a busy file so fsr_xfs will do something
+ * reasonable.
+ * Remove when installing sgi patch to this problem.
+ */
+ if (XFS_IFORK_FORMAT(tip, XFS_DATA_FORK) == XFS_DINODE_FMT_EXTENTS &&
+ (tip->i_d.di_nextents * sizeof(xfs_bmbt_rec_t)) >
XFS_IFORK_DSIZE(ip)) {
+ error = XFS_ERROR(EBUSY);
+ goto error0;
+ }
+
/* We need to fail if the file is memory mapped, we also need to
* prevent it from getting mapped before we have tossed the existing
* pages. By setting VREMAPPING here we force a pas_vfault to go to
|