if (ilist) {
for (ilp = ilist; ilp < &ilist[ilist_size]; ilp++) {
ino = *ilp;
- if (p = inode_name(ino, &hp)) {
+ if ((p = inode_name(ino, &hp))) {
dbprintf("%11llu %s", ino, p);
if (hp->isdir)
dbprintf("/.");
(*toti)++;
if (level == 0) {
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[0] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0])) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
dbprintf("bad btree nrecs (%u, min=%u, max=%u) "
"in inode %lld bmap block %lld\n",
return;
}
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[1] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1])) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
"inode %lld bmap block %lld\n",
set_dbmap(seqno, bno, 1, DBM_BTBNO, seqno, bno);
if (level == 0) {
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[0] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0])) {
dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
"btbno block %u/%u\n",
INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[0],
return;
}
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[1] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1])) {
dbprintf("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
"%u/%u\n",
INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[1],
set_dbmap(seqno, bno, 1, DBM_BTCNT, seqno, bno);
if (level == 0) {
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[0] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0])) {
dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
"btbno block %u/%u\n",
INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[0],
return;
}
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[1] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1])) {
dbprintf("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
"%u/%u\n",
INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[1],
set_dbmap(seqno, bno, 1, DBM_BTINO, seqno, bno);
if (level == 0) {
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_inobt_mxr[0] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[0]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[0])) {
dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
"inobt block %u/%u\n",
INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_inobt_mnr[0],
continue;
}
for (j = 0, nfree = 0; j < XFS_INODES_PER_CHUNK; j++) {
- if (isfree = XFS_INOBT_IS_FREE(&rp[i], j, ARCH_CONVERT))
+ if ((isfree = XFS_INOBT_IS_FREE(&rp[i], j, ARCH_CONVERT)))
nfree++;
process_inode(agf, agino + j,
(xfs_dinode_t *)((char *)iocur_top->data + ((off + j) << mp->m_sb.sb_inodelog)),
return;
}
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_inobt_mxr[1] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[1]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[1])) {
dbprintf("bad btree nrecs (%u, min=%u, max=%u) in inobt block "
"%u/%u\n",
INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_inobt_mnr[1],
} else if (strchr(numchars, *s)) {
l = (int)strspn(s, xnumchars);
t = TT_NUM;
- } else if (a = strchr(punctchars, *s)) {
+ } else if ((a = strchr(punctchars, *s))) {
l = 1;
t = puncttypes[a - punctchars];
} else {
iocur_top->ino = ino;
iocur_top->dirino = dirino;
iocur_top->mode = mode;
- if (iocur_top->use_bbmap = (bbmap != NULL))
+ if ((iocur_top->use_bbmap = (bbmap != NULL)))
iocur_top->bbmap = *bbmap;
/* store location in ring */
rtend = logend = NULL;
fname = mnt->mnt_dir;
datadev = mnt->mnt_fsname;
- if (logdev = hasmntopt(mnt, "logdev=")) {
+ if ((logdev = hasmntopt(mnt, "logdev="))) {
logdev += 7;
logend = strtok(logdev, " ");
}
- if (rtdev = hasmntopt(mnt, "rtdev=")) {
+ if ((rtdev = hasmntopt(mnt, "rtdev="))) {
rtdev += 6;
rtend = strtok(rtdev, " ");
}
# $(CXXFILES), or $(HFILES) and is used to construct the manifest list
# during the "dist" phase (packaging).
-CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -Wno-parentheses \
- $(LCFLAGS) -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' \
- -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
- -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1
+CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall $(LCFLAGS) \
+ -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' -D_GNU_SOURCE \
+ -D_FILE_OFFSET_BITS=64 -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1
LDFLAGS = $(LLDFLAGS)
LDLIBS = $(LLDLIBS) $(MALLOCLIB)
* are printing the entire log. However, if the start block is given,
* we still end at the end of the logical log.
*/
- if (error = xlog_print_find_oldest(log, &block_end)) {
+ if ((error = xlog_print_find_oldest(log, &block_end))) {
fprintf(stderr, "%s: problem finding oldest LR\n", progname);
return;
}
char *rval;
p = *pp;
- while (c = *p) {
+ while ((c = *p)) {
switch (c) {
case ' ':
case '\t':
progname, fname, strerror(errno));
exit(1);
}
- if (*len = (int)size) {
+ if ((*len = (int)size)) {
buf = malloc(size);
if (read(fd, buf, size) < size) {
fprintf(stderr, "%s: read failed on %s: %s\n",
* First, allocate the inodes.
*/
tp = libxfs_trans_alloc(mp, 0);
- if (i = libxfs_trans_reserve(tp, MKFS_BLOCKRES_INODE, 0, 0, 0, 0))
+ if ((i = libxfs_trans_reserve(tp, MKFS_BLOCKRES_INODE, 0, 0, 0, 0)))
res_failed(i);
bzero(&creds, sizeof(creds));
error = libxfs_inode_alloc(&tp, mp->m_rootip, IFREG, 1,
* Next, give the bitmap file some zero-filled blocks.
*/
tp = libxfs_trans_alloc(mp, 0);
- if (i = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
- (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0))
+ if ((i = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
+ (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0)))
res_failed(i);
libxfs_trans_ijoin(tp, rbmip, 0);
bno = 0;
*/
tp = libxfs_trans_alloc(mp, 0);
nsumblocks = mp->m_rsumsize >> mp->m_sb.sb_blocklog;
- if (i = libxfs_trans_reserve(tp,
+ if ((i = libxfs_trans_reserve(tp,
nsumblocks + (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1),
- 0, 0, 0, 0))
+ 0, 0, 0, 0)))
res_failed(i);
libxfs_trans_ijoin(tp, rsumip, 0);
bno = 0;
*/
for (bno = 0; bno < mp->m_sb.sb_rextents; bno = ebno) {
tp = libxfs_trans_alloc(mp, 0);
- if (i = libxfs_trans_reserve(tp, 0, 0, 0, 0, 0))
+ if ((i = libxfs_trans_reserve(tp, 0, 0, 0, 0, 0)))
res_failed(i);
XFS_BMAP_INIT(&flist, &first);
ebno = XFS_RTMIN(mp->m_sb.sb_rextents,
usage();
}
- if (dsunit && !dswidth || !dsunit && dswidth) {
+ if ((dsunit && !dswidth) || (!dsunit && dswidth)) {
fprintf(stderr,
"both sunit and swidth options have to be specified\n");
usage();
* Make sure that the log size is a multiple of the
* stripe unit
*/
- if ((logblocks % dsunit) != 0)
- if (!lsflag)
+ if ((logblocks % dsunit) != 0) {
+ if (!lsflag)
logblocks = ((logblocks + (dsunit - 1))
/dsunit) * dsunit;
- else {
+ else {
fprintf(stderr,
"internal log size %lld is not a multiple of the stripe unit %d\n",
(long long)logblocks, dsunit);
usage();
- }
+ }
+ }
if (logblocks > agsize-XFS_FSB_TO_AGBNO(mp,logstart)) {
fprintf(stderr,
args.alignment = 1;
args.minalignslop = UINT_MAX;
args.pag = &mp->m_perag[agno];
- if (i = libxfs_trans_reserve(tp, worst_freelist, 0, 0, 0, 0))
+ if ((i = libxfs_trans_reserve(tp, worst_freelist, 0, 0, 0, 0)))
res_failed(i);
libxfs_alloc_fix_freelist(&args, 0);
libxfs_trans_commit(tp, 0, NULL);
* /
* ?1
*/
- while (back = forw->avl_forw)
+ while ((back = forw->avl_forw))
forw = back;
/*
* /
* ?1
*/
- while (back = forw->avl_forw)
+ while ((back = forw->avl_forw))
forw = back;
/*
* chunk that they're in
*/
if (verify_dinode(mp, dino, agno, agino) == 0 ||
- agno == 0 &&
+ (agno == 0 &&
(mp->m_sb.sb_rootino == agino ||
mp->m_sb.sb_rsumino == agino ||
- mp->m_sb.sb_rbmino == agino))
+ mp->m_sb.sb_rbmino == agino)))
status++;
irec_offset++;
* release/write buffer
*/
ASSERT(cursor->level[this_level].dirty == 0 ||
- cursor->level[this_level].dirty && !no_modify);
+ (cursor->level[this_level].dirty && !no_modify));
if (cursor->level[this_level].dirty && !no_modify)
libxfs_writebuf(cursor->level[this_level].bp, 0);
* required. don't write out the descendant level
*/
ASSERT(cursor->level[this_level].dirty == 0 ||
- cursor->level[this_level].dirty && !no_modify);
+ (cursor->level[this_level].dirty && !no_modify));
if (cursor->level[this_level].dirty && !no_modify)
libxfs_writebuf(cursor->level[this_level].bp, 0);
* pointing to used bytes. we're being conservative here
* since the block will get compacted anyhow by the kernel.
*/
- if (leaf->hdr.holes == 0 && first_used != INT_GET(leaf->hdr.firstused, ARCH_CONVERT) ||
+ if ((leaf->hdr.holes == 0 && first_used != INT_GET(leaf->hdr.firstused, ARCH_CONVERT)) ||
INT_GET(leaf->hdr.firstused, ARCH_CONVERT) > first_used) {
if (!no_modify) {
if (verbose)
current_hashval = greatest_hashval;
- ASSERT(buf_dirty == 0 || buf_dirty && !no_modify);
+ ASSERT(buf_dirty == 0 || (buf_dirty && !no_modify));
if (buf_dirty && !no_modify) {
*repair = 1;
* XXX - later, we should try and just lose
* the block without losing the entire directory
*/
- ASSERT(*dotdot == 0 || *dotdot == 1 && *parent != NULLFSINO);
+ ASSERT(*dotdot == 0 || (*dotdot == 1 && *parent != NULLFSINO));
libxfs_putbuf(bp);
return(1);
}
}
}
- ASSERT(buf_dirty == 0 || buf_dirty && !no_modify);
+ ASSERT(buf_dirty == 0 || (buf_dirty && !no_modify));
if (buf_dirty && !no_modify)
libxfs_writebuf(bp, 0);
* release/write buffer
*/
ASSERT(cursor->level[this_level].dirty == 0 ||
- cursor->level[this_level].dirty && !no_modify);
+ (cursor->level[this_level].dirty && !no_modify));
if (cursor->level[this_level].dirty && !no_modify)
da_bwrite(mp, cursor->level[this_level].bp);
* required. don't write out the descendant level
*/
ASSERT(cursor->level[this_level].dirty == 0 ||
- cursor->level[this_level].dirty && !no_modify);
+ (cursor->level[this_level].dirty && !no_modify));
if (cursor->level[this_level].dirty && !no_modify)
da_bwrite(mp, cursor->level[this_level].bp);
}
}
current_hashval = greatest_hashval;
- ASSERT(buf_dirty == 0 || buf_dirty && !no_modify);
+ ASSERT(buf_dirty == 0 || (buf_dirty && !no_modify));
if (buf_dirty && !no_modify) {
*repair = 1;
da_bwrite(mp, bp);
need_root_dotdot = 1;
}
- ASSERT(ino != mp->m_sb.sb_rootino && ino != *parent ||
- ino == mp->m_sb.sb_rootino &&
- (ino == *parent || need_root_dotdot == 1));
+ ASSERT((ino != mp->m_sb.sb_rootino && ino != *parent) ||
+ (ino == mp->m_sb.sb_rootino &&
+ (ino == *parent || need_root_dotdot == 1)));
return res;
}
static void
dir_stack_push(dir_stack_t *stack, dir_stack_elem_t *elem)
{
- ASSERT(stack->cnt > 0 || stack->cnt == 0 && stack->head == NULL);
+ ASSERT(stack->cnt > 0 || (stack->cnt == 0 && stack->head == NULL));
elem->next = stack->head;
stack->head = elem;
if (err)
do_warn("error following ag %d unlinked list\n", agno);
- ASSERT(agi_dirty == 0 || agi_dirty && !no_modify);
+ ASSERT(agi_dirty == 0 || (agi_dirty && !no_modify));
if (agi_dirty && !no_modify)
libxfs_writebuf(bp, 0);
if (!use_rbuf) {
ASSERT(ino_dirty == 0 ||
- ino_dirty && !no_modify);
+ (ino_dirty && !no_modify));
if (ino_dirty && !no_modify)
libxfs_writebuf(bp, 0);
res += lf_block_delete_orphanage(mp, ino, leaf, &dirty,
rootino_bp, rbuf_dirty);
- ASSERT(dirty == 0 || dirty && !no_modify);
+ ASSERT(dirty == 0 || (dirty && !no_modify));
if (dirty && !no_modify)
libxfs_writebuf(bp, 0);
dirty = clear_dinode(mp, dino, lino);
- ASSERT(dirty == 0 || dirty && !no_modify);
+ ASSERT(dirty == 0 || (dirty && !no_modify));
/*
* if we read the lost+found inode in to
if (!use_rbuf) {
ASSERT(ino_dirty == 0 ||
- ino_dirty && !no_modify);
+ (ino_dirty && !no_modify));
if (ino_dirty && !no_modify)
libxfs_writebuf(bp, 0);
res += lf2_block_delete_orphanage(mp, ino, data, &dirty,
rootino_bp, rbuf_dirty);
- ASSERT(dirty == 0 || dirty && !no_modify);
+ ASSERT(dirty == 0 || (dirty && !no_modify));
if (dirty && !no_modify)
da_bwrite(mp, bp);
dirty = clear_dinode(mp, dino, lino);
- ASSERT(dirty == 0 || dirty && !no_modify);
+ ASSERT(dirty == 0 || (dirty && !no_modify));
/*
* if we read the lost+found inode in to
else
res = shortform_delete_orphanage(mp, ino, dino, dbp,
&dirty);
- ASSERT(res == 0 && dirty == 0 || res == 1 && dirty == 1);
+ ASSERT((res == 0 && dirty == 0) || (res == 1 && dirty == 1));
break;
default:
break;
*/
tp = libxfs_trans_alloc(mp, 0);
- if (i = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0))
+ if ((i = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0)))
res_failed(i);
error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0, &ip);
* from mkfs)
*/
tp = libxfs_trans_alloc(mp, 0);
- if (error = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
- (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0))
+ if ((error = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
+ (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0)))
res_failed(error);
libxfs_trans_ijoin(tp, ip, 0);
tp = libxfs_trans_alloc(mp, 0);
- if (error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0))
+ if ((error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0)))
res_failed(error);
error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0, &ip);
tp = libxfs_trans_alloc(mp, 0);
- if (error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0))
+ if ((error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0)))
res_failed(error);
error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rsumino, 0, &ip);
*/
tp = libxfs_trans_alloc(mp, 0);
- if (i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
- XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT))
+ if ((i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
+ XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT)))
res_failed(i);
error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rsumino, 0, &ip);
XFS_BMAP_INIT(&flist, &first);
nsumblocks = mp->m_rsumsize >> mp->m_sb.sb_blocklog;
- if (error = libxfs_trans_reserve(tp,
+ if ((error = libxfs_trans_reserve(tp,
mp->m_sb.sb_rbmblocks +
(XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1),
BBTOB(128), 0, XFS_TRANS_PERM_LOG_RES,
- XFS_DEFAULT_PERM_LOG_COUNT))
+ XFS_DEFAULT_PERM_LOG_COUNT)))
res_failed(error);
libxfs_trans_ijoin(tp, ip, 0);
tp = libxfs_trans_alloc(mp, 0);
ip = NULL;
- if (i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
- XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT))
+ if ((i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
+ XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT)))
res_failed(i);
error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rootino, 0, &ip);
XFS_BMAP_INIT(&flist, &first);
nres = XFS_MKDIR_SPACE_RES(mp, strlen(ORPHANAGE));
- if (i = libxfs_trans_reserve(tp, nres, XFS_MKDIR_LOG_RES(mp), 0,
- XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT))
+ if ((i = libxfs_trans_reserve(tp, nres, XFS_MKDIR_LOG_RES(mp), 0,
+ XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT)))
res_failed(i);
/*
* use iget/ijoin instead of trans_iget because the ialloc
* wrapper can commit the transaction and start a new one
*/
- if (i = libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0))
+ if ((i = libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0)))
do_error("%d - couldn't iget root inode to make %s\n",
i, ORPHANAGE);
/*
* create the actual entry
*/
- if (error = dir_createname(mp, tp, pip, ORPHANAGE,
- strlen(ORPHANAGE), ip->i_ino, &first, &flist, nres)) {
+ if ((error = dir_createname(mp, tp, pip, ORPHANAGE,
+ strlen(ORPHANAGE), ip->i_ino, &first, &flist, nres))) {
do_warn("can't make %s, createname error %d, will try later\n",
ORPHANAGE, error);
orphanage_entered = 0;
sprintf(fname, "%llu", (unsigned long long)ino);
- if (err = libxfs_iget(mp, NULL, dir_ino, 0, &dir_ino_p, 0))
+ if ((err = libxfs_iget(mp, NULL, dir_ino, 0, &dir_ino_p, 0)))
do_error("%d - couldn't iget orphanage inode\n", err);
tp = libxfs_trans_alloc(mp, 0);
- if (err = libxfs_iget(mp, NULL, ino, 0, &ino_p, 0))
+ if ((err = libxfs_iget(mp, NULL, ino, 0, &ino_p, 0)))
do_error("%d - couldn't iget disconnected inode\n", err);
if (isa_dir) {
nres = XFS_DIRENTER_SPACE_RES(mp, strlen(fname)) +
XFS_DIRENTER_SPACE_RES(mp, 2);
- if (err = dir_lookup(mp, tp, ino_p, "..", 2,
- &entry_ino_num)) {
+ if ((err = dir_lookup(mp, tp, ino_p, "..", 2,
+ &entry_ino_num))) {
ASSERT(err == ENOENT);
- if (err = libxfs_trans_reserve(tp, nres,
+ if ((err = libxfs_trans_reserve(tp, nres,
XFS_RENAME_LOG_RES(mp), 0,
XFS_TRANS_PERM_LOG_RES,
- XFS_RENAME_LOG_COUNT))
+ XFS_RENAME_LOG_COUNT)))
do_error(
"space reservation failed (%d), filesystem may be out of space\n",
err);
libxfs_trans_ijoin(tp, ino_p, 0);
XFS_BMAP_INIT(&flist, &first);
- if (err = dir_createname(mp, tp, dir_ino_p, fname,
+ if ((err = dir_createname(mp, tp, dir_ino_p, fname,
strlen(fname), ino, &first,
- &flist, nres))
+ &flist, nres)))
do_error(
"name create failed in %s (%d), filesystem may be out of space\n",
ORPHANAGE, err);
dir_ino_p->i_d.di_nlink++;
libxfs_trans_log_inode(tp, dir_ino_p, XFS_ILOG_CORE);
- if (err = dir_createname(mp, tp, ino_p, "..", 2,
- dir_ino, &first, &flist, nres))
+ if ((err = dir_createname(mp, tp, ino_p, "..", 2,
+ dir_ino, &first, &flist, nres)))
do_error(
"creation of .. entry failed (%d), filesystem may be out of space\n",
err);
ino_p->i_d.di_nlink++;
libxfs_trans_log_inode(tp, ino_p, XFS_ILOG_CORE);
- if (err = libxfs_bmap_finish(&tp, &flist, first, &committed))
+ if ((err = libxfs_bmap_finish(&tp, &flist, first, &committed)))
do_error(
"bmap finish failed (err - %d), filesystem may be out of space\n",
err);
libxfs_trans_commit(tp,
XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC, 0);
} else {
- if (err = libxfs_trans_reserve(tp, nres,
+ if ((err = libxfs_trans_reserve(tp, nres,
XFS_RENAME_LOG_RES(mp), 0,
XFS_TRANS_PERM_LOG_RES,
- XFS_RENAME_LOG_COUNT))
+ XFS_RENAME_LOG_COUNT)))
do_error(
"space reservation failed (%d), filesystem may be out of space\n",
err);
XFS_BMAP_INIT(&flist, &first);
- if (err = dir_createname(mp, tp, dir_ino_p, fname,
+ if ((err = dir_createname(mp, tp, dir_ino_p, fname,
strlen(fname), ino, &first,
- &flist, nres))
+ &flist, nres)))
do_error(
"name create failed in %s (%d), filesystem may be out of space\n",
ORPHANAGE, err);
* to us. that'll pop a libxfs/kernel ASSERT.
*/
if (entry_ino_num != dir_ino) {
- if (err = dir_replace(mp, tp, ino_p, "..",
+ if ((err = dir_replace(mp, tp, ino_p, "..",
2, dir_ino, &first,
- &flist, nres))
+ &flist, nres)))
do_error(
"name replace op failed (%d), filesystem may be out of space\n",
err);
}
- if (err = libxfs_bmap_finish(&tp, &flist, first,
- &committed))
+ if ((err = libxfs_bmap_finish(&tp, &flist, first,
+ &committed)))
do_error(
"bmap finish failed (%d), filesystem may be out of space\n",
err);
* also accounted for in the create
*/
nres = XFS_DIRENTER_SPACE_RES(mp, strlen(fname));
- if (err = libxfs_trans_reserve(tp, nres, XFS_REMOVE_LOG_RES(mp), 0,
- XFS_TRANS_PERM_LOG_RES, XFS_REMOVE_LOG_COUNT))
+ if ((err = libxfs_trans_reserve(tp, nres, XFS_REMOVE_LOG_RES(mp), 0,
+ XFS_TRANS_PERM_LOG_RES, XFS_REMOVE_LOG_COUNT)))
do_error(
"space reservation failed (%d), filesystem may be out of space\n",
err);
libxfs_trans_ijoin(tp, ino_p, 0);
XFS_BMAP_INIT(&flist, &first);
- if (err = dir_createname(mp, tp, dir_ino_p, fname,
- strlen(fname), ino, &first, &flist, nres))
+ if ((err = dir_createname(mp, tp, dir_ino_p, fname,
+ strlen(fname), ino, &first, &flist, nres)))
do_error(
"name create failed in %s (%d), filesystem may be out of space\n",
ORPHANAGE, err);
ino_p->i_d.di_nlink = 1;
libxfs_trans_log_inode(tp, ino_p, XFS_ILOG_CORE);
- if (err = libxfs_bmap_finish(&tp, &flist, first, &committed))
+ if ((err = libxfs_bmap_finish(&tp, &flist, first, &committed)))
do_error(
"bmap finish failed (%d), filesystem may be out of space\n",
err);
num_illegal, need_dot, stack,
irec, ino_offset);
- ASSERT(dirty == 0 || dirty && !no_modify);
+ ASSERT(dirty == 0 || (dirty && !no_modify));
if (dirty && !no_modify)
libxfs_writebuf(bp, 0);
* with bogus inode numbers if we're in no modify mode.
*/
- if (lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0
- || no_modify && verify_inum(mp, lino)) {
+ if ((lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0)
+ || (no_modify && verify_inum(mp, lino))) {
next_sfe = (xfs_dir_sf_entry_t *)
((__psint_t) sf_entry +
XFS_DIR_SF_ENTSIZE_BYENTRY(sf_entry));
* with bogus inode numbers if we're in no modify mode.
*/
- if (lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0
- || no_modify && verify_inum(mp, lino)) {
+ if ((lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0)
+ || (no_modify && verify_inum(mp, lino))) {
next_sfep = (xfs_dir2_sf_entry_t *)
((__psint_t) sfep +
XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp, sfep));
ASSERT(!is_inode_refchecked(ino, irec, ino_offset));
- if (error = libxfs_iget(mp, NULL, ino, 0, &ip, 0)) {
+ if ((error = libxfs_iget(mp, NULL, ino, 0, &ip, 0))) {
if (!no_modify)
do_error("couldn't map inode %llu, err = %d\n",
ino, error);
stack, irec,
ino_offset);
- ASSERT(dirty == 0 || dirty && !no_modify);
+ ASSERT(dirty == 0 || (dirty && !no_modify));
if (dirty) {
libxfs_trans_log_inode(tp, ip,
XFS_ILOG_CORE | XFS_ILOG_DDATA);
libxfs_trans_ijoin(tp, ip, 0);
libxfs_trans_ihold(tp, ip);
XFS_BMAP_INIT(&flist, &first);
- if (error = dir_createname(mp, tp, ip, ORPHANAGE,
+ if ((error = dir_createname(mp, tp, ip, ORPHANAGE,
strlen(ORPHANAGE),
orphanage_ino, &first, &flist,
- nres))
+ nres)))
do_error("can't make %s entry in root inode "
"%llu, createname error %d\n",
ORPHANAGE, ino, error);
XFS_BMAP_INIT(&flist, &first);
- if (error = dir_createname(mp, tp, ip, "..", 2,
- ip->i_ino, &first, &flist, nres))
+ if ((error = dir_createname(mp, tp, ip, "..", 2,
+ ip->i_ino, &first, &flist, nres)))
do_error(
"can't make \"..\" entry in root inode %llu, createname error %d\n",
ino, error);
XFS_BMAP_INIT(&flist, &first);
- if (error = dir_createname(mp, tp, ip, ".",
+ if ((error = dir_createname(mp, tp, ip, ".",
1, ip->i_ino, &first, &flist,
- nres))
+ nres)))
do_error(
"can't make \".\" entry in dir ino %llu, createname error %d\n",
ino, error);
* return errors if shared vn or alignment fields
* are set without their feature bits being set
*/
- if (!pre_65_beta && sb->sb_versionnum & XR_PART_SECSB_VNMASK ||
- pre_65_beta && sb->sb_versionnum & XR_ALPHA_SECSB_VNMASK) {
+ if ((!pre_65_beta && (sb->sb_versionnum & XR_PART_SECSB_VNMASK)) ||
+ (pre_65_beta && (sb->sb_versionnum & XR_ALPHA_SECSB_VNMASK))) {
/*
* shared version # and inode alignment fields
* should be valid
/*
* inode alignment field lives before the data alignment field
*/
- if (!pre_65_beta && sbp->sb_versionnum & XR_PART_SECSB_VNMASK ||
- pre_65_beta && sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK)
+ if ((!pre_65_beta && (sbp->sb_versionnum & XR_PART_SECSB_VNMASK)) ||
+ (pre_65_beta && (sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK)))
geo->sb_inoalignmt = sbp->sb_inoalignmt;
- if (!pre_65_beta && sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK ||
- pre_65_beta && XFS_SB_VERSION_HASDALIGN(sbp)) {
+ if ((!pre_65_beta && (sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK)) ||
+ (pre_65_beta && XFS_SB_VERSION_HASDALIGN(sbp))) {
geo->sb_unit = sbp->sb_unit;
geo->sb_width = sbp->sb_width;
}
* from the features enabled in this superblock whether
* or not the sector was bzero'd at mkfs time.
*/
- if (!pre_65_beta && sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK ||
- pre_65_beta && sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK) {
+ if ((!pre_65_beta && (sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK)) ||
+ (pre_65_beta && (sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK))) {
geo->sb_fully_zeroed = 1;
}
}
type, whichfork, root, ino, tot, nex, blkmapp,
bm_cursor, isroot, check_dups, &dirty);
- ASSERT(dirty == 0 || dirty && !no_modify);
+ ASSERT(dirty == 0 || (dirty && !no_modify));
if (dirty && !no_modify)
libxfs_writebuf(bp, 0);
(*tot)++;
if (level == 0) {
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[0] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0])) {
do_warn("inode 0x%llx bad # of bmap records (%u, min - %u, max - %u)\n",
ino, INT_GET(block->bb_numrecs, ARCH_CONVERT),
mp->m_bmap_dmnr[0], mp->m_bmap_dmxr[0]);
type, ino, tot, whichfork));
}
if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[1] ||
- isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1]) {
+ (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1])) {
do_warn("inode 0x%llx bad # of bmap records (%u, min - %u, max - %u)\n",
ino, INT_GET(block->bb_numrecs, ARCH_CONVERT),
mp->m_bmap_dmnr[1], mp->m_bmap_dmxr[1]);
do_warn("bad agbno %u for inobt root, agno %d\n",
INT_GET(agi->agi_root, ARCH_CONVERT), agno);
- ASSERT(agi_dirty == 0 || agi_dirty && !no_modify);
+ ASSERT(agi_dirty == 0 || (agi_dirty && !no_modify));
if (agi_dirty && !no_modify)
libxfs_writebuf(agibuf, 0);
else
libxfs_putbuf(agibuf);
- ASSERT(agf_dirty == 0 || agf_dirty && !no_modify);
+ ASSERT(agf_dirty == 0 || (agf_dirty && !no_modify));
if (agf_dirty && !no_modify)
libxfs_writebuf(agfbuf, 0);
else
libxfs_putbuf(agfbuf);
- ASSERT(sb_dirty == 0 || sb_dirty && !no_modify);
+ ASSERT(sb_dirty == 0 || (sb_dirty && !no_modify));
if (sb_dirty && !no_modify) {
libxfs_xlate_sb(XFS_BUF_PTR(sbbuf), sb, -1, ARCH_CONVERT,