+xfsprogs-2.6.5 (20 February 2003)
+ - Fix up mkfs to ensure that the log size is a multiple of
+ the v2 log stripe size even if the log happens to be aligned
+ on a log stripe boundary (always check it).
+
xfsprogs-2.6.4 (17 February 2003)
- Fix a few more libxfs/repair leaks.
- Fix up some libhandle routines, add the open_by_fshandle
__uint64_t agsize,
int sunit,
xfs_drfsbno_t *logblocks,
- int blocklog)
+ int blocklog,
+ int *lalign)
{
__uint64_t tmp_logblocks;
- logstart = ((logstart + (sunit - 1))/sunit) * sunit;
+ if ((logstart % sunit) != 0) {
+ logstart = ((logstart + (sunit - 1))/sunit) * sunit;
+ *lalign = 1;
+ }
+
/*
* Make sure that the log size is a multiple of the
* stripe unit
/*
* Align the logstart at stripe unit boundary.
*/
- if (lsunit && ((logstart % lsunit) != 0)) {
+ if (lsunit) {
logstart = fixup_log_stripe(mp, lsflag, logstart,
- agsize, lsunit, &logblocks, blocklog);
- lalign = 1;
- } else if (dsunit && ((logstart % dsunit) != 0)) {
+ agsize, lsunit, &logblocks, blocklog,
+ &lalign);
+ } else if (dsunit) {
logstart = fixup_log_stripe(mp, lsflag, logstart,
- agsize, dsunit, &logblocks,
- blocklog);
- lalign = 1;
+ agsize, dsunit, &logblocks, blocklog,
+ &lalign);
}
} else
logstart = 0;
if (lalign) {
/*
* Have to insert two records
+ * Insert pad record for stripe align of log
*/
INT_SET(arec->ar_blockcount, ARCH_CONVERT,
(xfs_extlen_t)(XFS_FSB_TO_AGBNO(
- (INT_GET(arec->ar_startblock,
ARCH_CONVERT))));
nrec = arec + 1;
+ /*
+ * Insert record at start of internal log
+ */
INT_SET(nrec->ar_startblock, ARCH_CONVERT,
INT_GET(arec->ar_startblock,
ARCH_CONVERT) +
arec = nrec;
INT_MOD(block->bb_numrecs, ARCH_CONVERT, 1);
}
+ /*
+ * Change record start to after the internal log
+ */
INT_MOD(arec->ar_startblock, ARCH_CONVERT, logblocks);
}
INT_SET(arec->ar_blockcount, ARCH_CONVERT,