Commit 1e44b248 authored by Nathan Scott's avatar Nathan Scott Committed by Stephen Lord

[XFS] Change any references to legal/illegal into valid/invalid - apparently this was bad, mkaay?

SGI Modid: 2.5.x-xfs:slinx:154430a
parent 60feb95d
......@@ -2170,7 +2170,7 @@ xfs_bmap_alloc(
xfs_extlen_t ralen=0; /* realtime allocation length */
#endif
#define ISLEGAL(x,y) \
#define ISVALID(x,y) \
(rt ? \
(x) < mp->m_sb.sb_rblocks : \
XFS_FSB_TO_AGNO(mp, x) == XFS_FSB_TO_AGNO(mp, y) && \
......@@ -2249,7 +2249,7 @@ xfs_bmap_alloc(
/*
* If we're now overlapping the next or previous extent that
* means we can't fit an extsz piece in this hole. Just move
* the start forward to the first legal spot and set
* the start forward to the first valid spot and set
* the length so we hit the end.
*/
if ((ap->off != orig_off && ap->off < prevo) ||
......@@ -2310,7 +2310,7 @@ xfs_bmap_alloc(
ralen = ap->alen / mp->m_sb.sb_rextsize;
/*
* If the old value was close enough to MAXEXTLEN that
* we rounded up to it, cut it back so it's legal again.
* we rounded up to it, cut it back so it's valid again.
* Note that if it's a really large request (bigger than
* MAXEXTLEN), we don't hear about that number, and can't
* adjust the starting point to match it.
......@@ -2343,7 +2343,7 @@ xfs_bmap_alloc(
*/
if (ap->eof && ap->prevp->br_startoff != NULLFILEOFF &&
!ISNULLSTARTBLOCK(ap->prevp->br_startblock) &&
ISLEGAL(ap->prevp->br_startblock + ap->prevp->br_blockcount,
ISVALID(ap->prevp->br_startblock + ap->prevp->br_blockcount,
ap->prevp->br_startblock)) {
ap->rval = ap->prevp->br_startblock + ap->prevp->br_blockcount;
/*
......@@ -2352,7 +2352,7 @@ xfs_bmap_alloc(
adjust = ap->off -
(ap->prevp->br_startoff + ap->prevp->br_blockcount);
if (adjust &&
ISLEGAL(ap->rval + adjust, ap->prevp->br_startblock))
ISVALID(ap->rval + adjust, ap->prevp->br_startblock))
ap->rval += adjust;
}
/*
......@@ -2374,7 +2374,7 @@ xfs_bmap_alloc(
!ISNULLSTARTBLOCK(ap->prevp->br_startblock) &&
(prevbno = ap->prevp->br_startblock +
ap->prevp->br_blockcount) &&
ISLEGAL(prevbno, ap->prevp->br_startblock)) {
ISVALID(prevbno, ap->prevp->br_startblock)) {
/*
* Calculate gap to end of previous block.
*/
......@@ -2386,11 +2386,11 @@ xfs_bmap_alloc(
* end and the gap size.
* Heuristic!
* If the gap is large relative to the piece we're
* allocating, or using it gives us an illegal block
* allocating, or using it gives us an invalid block
* number, then just use the end of the previous block.
*/
if (prevdiff <= XFS_ALLOC_GAP_UNITS * ap->alen &&
ISLEGAL(prevbno + prevdiff,
ISVALID(prevbno + prevdiff,
ap->prevp->br_startblock))
prevbno += adjust;
else
......@@ -2425,14 +2425,14 @@ xfs_bmap_alloc(
/*
* Heuristic!
* If the gap is large relative to the piece we're
* allocating, or using it gives us an illegal block
* allocating, or using it gives us an invalid block
* number, then just use the start of the next block
* offset by our length.
*/
if (gotdiff <= XFS_ALLOC_GAP_UNITS * ap->alen &&
ISLEGAL(gotbno - gotdiff, gotbno))
ISVALID(gotbno - gotdiff, gotbno))
gotbno -= adjust;
else if (ISLEGAL(gotbno - ap->alen, gotbno)) {
else if (ISVALID(gotbno - ap->alen, gotbno)) {
gotbno -= ap->alen;
gotdiff += adjust - ap->alen;
} else
......@@ -2734,7 +2734,7 @@ xfs_bmap_alloc(
}
}
return 0;
#undef ISLEGAL
#undef ISVALID
}
/*
......@@ -3353,7 +3353,7 @@ xfs_bmap_local_to_extents(
/*
* We don't want to deal with the case of keeping inode data inline yet.
* So sending the data fork of a regular inode is illegal.
* So sending the data fork of a regular inode is invalid.
*/
ASSERT(!((ip->i_d.di_mode & IFMT) == IFREG &&
whichfork == XFS_DATA_FORK));
......
......@@ -1040,7 +1040,7 @@ xfs_iread_extents(
size = XFS_IFORK_NEXTENTS(ip, whichfork) * (uint)sizeof(xfs_bmbt_rec_t);
ifp = XFS_IFORK_PTR(ip, whichfork);
/*
* We know that the size is legal (it's checked in iformat_btree)
* We know that the size is valid (it's checked in iformat_btree)
*/
ifp->if_u1.if_extents = kmem_alloc(size, KM_SLEEP);
ASSERT(ifp->if_u1.if_extents != NULL);
......
......@@ -777,7 +777,7 @@ xfs_log_move_tail(xfs_mount_t *mp,
s = GRANT_LOCK(log);
/* Also an illegal lsn. 1 implies that we aren't passing in a legal
/* Also an invalid lsn. 1 implies that we aren't passing in a valid
* tail_lsn.
*/
if (tail_lsn != 1)
......@@ -1160,7 +1160,7 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
log->l_iclog_bufs = 8;
break;
default:
xlog_panic("XFS: Illegal blocksize");
xlog_panic("XFS: Invalid blocksize");
break;
}
}
......@@ -3394,7 +3394,7 @@ xlog_verify_iclog(xlog_t *log,
icptr = log->l_iclog;
for (i=0; i < log->l_iclog_bufs; i++) {
if (icptr == 0)
xlog_panic("xlog_verify_iclog: illegal ptr");
xlog_panic("xlog_verify_iclog: invalid ptr");
icptr = icptr->ic_next;
}
if (icptr != log->l_iclog)
......@@ -3404,7 +3404,7 @@ xlog_verify_iclog(xlog_t *log,
/* check log magic numbers */
ptr = (xfs_caddr_t) &(iclog->ic_header);
if (INT_GET(*(uint *)ptr, ARCH_CONVERT) != XLOG_HEADER_MAGIC_NUM)
xlog_panic("xlog_verify_iclog: illegal magic num");
xlog_panic("xlog_verify_iclog: invalid magic num");
for (ptr += BBSIZE; ptr < ((xfs_caddr_t)&(iclog->ic_header))+count;
ptr += BBSIZE) {
......@@ -3437,7 +3437,7 @@ xlog_verify_iclog(xlog_t *log,
}
}
if (clientid != XFS_TRANSACTION && clientid != XFS_LOG)
cmn_err(CE_WARN, "xlog_verify_iclog: illegal clientid %d op 0x%p offset 0x%x", clientid, ophead, field_offset);
cmn_err(CE_WARN, "xlog_verify_iclog: invalid clientid %d op 0x%p offset 0x%x", clientid, ophead, field_offset);
/* check length */
field_offset = (__psint_t)
......
......@@ -54,7 +54,7 @@ struct xfs_mount;
#define XLOG_MED_ICLOGS 4
#define XLOG_MAX_ICLOGS 8
#define XLOG_CALLBACK_SIZE 10
#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe /* Illegal cycle number */
#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe /* Invalid cycle number */
#define XLOG_VERSION_1 1
#define XLOG_VERSION_2 2 /* Large IClogs, Log sunit */
#define XLOG_VERSION_OKBITS (XLOG_VERSION_1 | XLOG_VERSION_2)
......
......@@ -449,7 +449,7 @@ xlog_find_verify_log_record(
for (i = (*last_blk) - 1; i >= 0; i--) {
if (i < start_blk) {
/* legal log record not found */
/* valid log record not found */
xlog_warn(
"XFS: Log inconsistent (didn't find previous header)");
ASSERT(0);
......@@ -582,7 +582,7 @@ xlog_find_head(
* then the entire log is stamped with the same cycle number. In this
* case, head_blk can't be set to zero (which makes sense). The below
* math doesn't work out properly with head_blk equal to zero. Instead,
* we set it to log_bbnum which is an illegal block number, but this
* we set it to log_bbnum which is an invalid block number, but this
* value makes the math correct. If head_blk doesn't changed through
* all the tests below, *head_blk is set to zero at the very end rather
* than log_bbnum. In a sense, log_bbnum and zero are the same block
......@@ -2462,7 +2462,7 @@ xlog_recover_do_inode_trans(
break;
default:
xlog_warn("XFS: xlog_recover_do_inode_trans: Illegal flag");
xlog_warn("XFS: xlog_recover_do_inode_trans: Invalid flag");
ASSERT(0);
xfs_buf_relse(bp);
return XFS_ERROR(EIO);
......
/*
* Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
......@@ -672,7 +672,7 @@ xfs_trans_unreserve_and_mod_sb(
* be inconsistent. In such cases, this returns an error, and the
* caller may assume that all locked objects joined to the transaction
* have already been unlocked as if the commit had succeeded.
* It's illegal to reference the transaction structure after this call.
* Do not reference the transaction structure after this call.
*/
/*ARGSUSED*/
int
......
/*
* Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
......@@ -4091,7 +4091,7 @@ xfsidbg_xiclog(xlog_in_core_t *iclog)
if (iclog->ic_state & XLOG_STATE_ALL)
printflags(iclog->ic_state, ic_flags, "state:");
else
kdb_printf("state: ILLEGAL 0x%x", iclog->ic_state);
kdb_printf("state: INVALID 0x%x", iclog->ic_state);
kdb_printf("\n");
} /* xfsidbg_xiclog */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment