> Hi Steve,
>
> On Thu, Aug 09, 2001 at 08:37:52AM -0500, Steve Lord wrote:
> > There is unfortunately no workaround for this, XFS on a floppy would
> > have been a nice test bed for people, however, there are some minimum
> > sizes in XFS which prevent this. For deadlock reasons, the log must be
> > twice the size of the largest potential transaction we can have, this
> > makes the minimum log size 1200 4K blocks which is already over 4Mbytes.
>
> Just curious: which transaction could need 600 4K blocks?
>
> -Andi
Well, not one on a filesystem this small - but the logic which makes the
minimum log size calculation is too simple to factor in the size of the
filesystem.
I do not know which one it might be, the size is calculated out of a
set of horrendous macros, here is one for allocating extents for file
data:
/*
* In a write transaction we can allocate a maximum of 2
* extents. This gives:
* the inode getting the new extents: inode size
* the inode\'s bmap btree: max depth * block size
* the agfs of the ags from which the extents are allocated: 2 * sector
* the superblock free block counter: sector size
* the allocation btrees: 2 exts * 2 trees * (2 * max depth - 1) * block size
* And the bmap_finish transaction can free bmap blocks in a join:
* the agfs of the ags containing the blocks: 2 * sector size
* the agfls of the ags containing the blocks: 2 * sector size
* the super block free block counter: sector size
* the allocation btrees: 2 exts * 2 trees * (2 * max depth - 1) * block size
*/
#define XFS_CALC_WRITE_LOG_RES(mp) \
(MAX( \
((mp)->m_sb.sb_inodesize + \
XFS_FSB_TO_B((mp), XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK)) + \
(2 * (mp)->m_sb.sb_sectsize) + \
(mp)->m_sb.sb_sectsize + \
XFS_ALLOCFREE_LOG_RES(mp, 2) + \
(128 * (4 + XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) + XFS_ALLOCFREE_LOG_CO
UNT(mp, 2)))),\
((2 * (mp)->m_sb.sb_sectsize) + \
(2 * (mp)->m_sb.sb_sectsize) + \
(mp)->m_sb.sb_sectsize + \
XFS_ALLOCFREE_LOG_RES(mp, 2) + \
(128 * (5 + XFS_ALLOCFREE_LOG_COUNT(mp, 2))))))
And some of the macros this uses are complex too, fortunately these get
worked out at mount time, not at transaction time.
Steve
|