Clean up the code a little by removing blank characters on line ends.
Most of these (if not all) sits there for long time and it is probable
that without this explicit removal, they will stay in the code for much
longer.
Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
* range bigger than required
*/
- sizeb = XFS_AGB_TO_DADDR(mp, agno,
- be32_to_cpu(rec_ptr->ar_startblock)) -
+ sizeb = XFS_AGB_TO_DADDR(mp, agno,
+ be32_to_cpu(rec_ptr->ar_startblock)) -
begin;
size = roundup(sizeb <<BBSHIFT, wbuf_miniosize);
if (size > 0) {
int error;
int err_type;
} target_control;
-
fsize = XFS_DFORK_SIZE(dip, mp, whichfork);
pp = XFS_BMDR_PTR_ADDR(rblock, 1, xfs_bmdr_maxrecs(fsize, 0));
kp = XFS_BMDR_KEY_ADDR(rblock, 1);
- bno = select_child(curoffset, kp, pp,
+ bno = select_child(curoffset, kp, pp,
be16_to_cpu(rblock->bb_numrecs));
for (;;) {
set_cur(&typtab[typ], XFS_FSB_TO_DADDR(mp, bno),
}
if (be16_to_cpu(dib->bb_level) == 0) {
xfs_bmbt_rec_t *rp = XFS_BMDR_REC_ADDR(dib, 1);
- process_bmbt_reclist(rp, be16_to_cpu(dib->bb_numrecs), type,
+ process_bmbt_reclist(rp, be16_to_cpu(dib->bb_numrecs), type,
id, totd, blkmapp);
*nex += be16_to_cpu(dib->bb_numrecs);
return;
pp = XFS_BMDR_PTR_ADDR(dib, 1, xfs_bmdr_maxrecs(
XFS_DFORK_SIZE(dip, mp, whichfork), 0));
for (i = 0; i < be16_to_cpu(dib->bb_numrecs); i++)
- scan_lbtree(be64_to_cpu(pp[i]),
- be16_to_cpu(dib->bb_level),
- scanfunc_bmap, type, id, totd, toti,
- nex, blkmapp, 1,
+ scan_lbtree(be64_to_cpu(pp[i]),
+ be16_to_cpu(dib->bb_level),
+ scanfunc_bmap, type, id, totd, toti,
+ nex, blkmapp, 1,
whichfork == XFS_DATA_FORK ?
TYP_BMAPBTD : TYP_BMAPBTA);
}
bf_err += (freeseen & (1 << i)) != 0;
freeseen |= 1 << i;
} else
- bf_err += be16_to_cpu(dup->length) >
+ bf_err += be16_to_cpu(dup->length) >
be16_to_cpu(bf[2].length);
ptr += be16_to_cpu(dup->length);
lastfree = 1;
if ((char *)&lep[i] >= endptr) {
if (!sflag || v)
dbprintf(_("dir %lld block %d bad count "
- "%u\n"), id->ino, dabno,
+ "%u\n"), id->ino, dabno,
be32_to_cpu(btp->count));
error++;
break;
}
if (be32_to_cpu(lep[i].address) == XFS_DIR2_NULL_DATAPTR)
stale++;
- else if (dir_hash_see(be32_to_cpu(lep[i].hashval),
+ else if (dir_hash_see(be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address))) {
if (!sflag || v)
dbprintf(_("dir %lld block %d extra leaf "
- "entry %x %x\n"),
- id->ino, dabno,
+ "entry %x %x\n"),
+ id->ino, dabno,
be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address));
error++;
count != be32_to_cpu(btp->count) - be32_to_cpu(btp->stale)) {
if (!sflag || v)
dbprintf(_("dir %lld block %d bad block tail count %d "
- "(stale %d)\n"),
- id->ino, dabno, be32_to_cpu(btp->count),
+ "(stale %d)\n"),
+ id->ino, dabno, be32_to_cpu(btp->count),
be32_to_cpu(btp->stale));
error++;
}
rp = (xfs_bmbt_rec_t *)XFS_DFORK_PTR(dip, whichfork);
*nex = XFS_DFORK_NEXTENTS(dip, whichfork);
- if (*nex < 0 || *nex > XFS_DFORK_SIZE(dip, mp, whichfork) /
+ if (*nex < 0 || *nex > XFS_DFORK_SIZE(dip, mp, whichfork) /
sizeof(xfs_bmbt_rec_t)) {
if (!sflag || id->ilist)
dbprintf(_("bad number of extents %d for inode %lld\n"),
free = iocur_top->data;
maxent = M_DIROPS(mp)->free_max_bests(mp->m_dir_geo);
- if (be32_to_cpu(free->hdr.firstdb) != xfs_dir2_da_to_db(mp->m_dir_geo,
+ if (be32_to_cpu(free->hdr.firstdb) != xfs_dir2_da_to_db(mp->m_dir_geo,
dabno - mp->m_dir_geo->freeblk) * maxent) {
if (!sflag || v)
dbprintf(_("bad free block firstdb %d for dir ino %lld "
error++;
return;
}
- if (be32_to_cpu(free->hdr.nvalid) > maxent ||
- be32_to_cpu(free->hdr.nused) > maxent ||
- be32_to_cpu(free->hdr.nused) >
+ if (be32_to_cpu(free->hdr.nvalid) > maxent ||
+ be32_to_cpu(free->hdr.nused) > maxent ||
+ be32_to_cpu(free->hdr.nused) >
be32_to_cpu(free->hdr.nvalid)) {
if (!sflag || v)
dbprintf(_("bad free block nvalid/nused %d/%d for dir "
"ino %lld block %d\n"),
- be32_to_cpu(free->hdr.nvalid),
+ be32_to_cpu(free->hdr.nvalid),
be32_to_cpu(free->hdr.nused), id->ino, dabno);
error++;
return;
if (!sflag || v)
dbprintf(_("bad free block ent %d is %d should "
"be %d for dir ino %lld block %d\n"),
- i, be16_to_cpu(free->bests[i]), ent,
+ i, be16_to_cpu(free->bests[i]), ent,
id->ino, dabno);
error++;
}
if (be16_to_cpu(free->bests[i]) != NULLDATAOFF)
used++;
if (ent != NULLDATAOFF)
- freetab->ents[be32_to_cpu(free->hdr.firstdb) + i] =
+ freetab->ents[be32_to_cpu(free->hdr.firstdb) + i] =
NULLDATAOFF;
}
if (used != be32_to_cpu(free->hdr.nused)) {
if (!sflag || v)
dbprintf(_("bad free block nused %d should be %d for dir "
"ino %lld block %d\n"),
- be32_to_cpu(free->hdr.nused), used, id->ino,
+ be32_to_cpu(free->hdr.nused), used, id->ino,
dabno);
error++;
}
return;
}
maxent = M_DIROPS(mp)->free_max_bests(mp->m_dir_geo);
- if (be32_to_cpu(free->hdr.firstdb) != xfs_dir2_da_to_db(mp->m_dir_geo,
+ if (be32_to_cpu(free->hdr.firstdb) != xfs_dir2_da_to_db(mp->m_dir_geo,
dabno - mp->m_dir_geo->freeblk) * maxent) {
if (!sflag || v)
dbprintf(_("bad free block firstdb %d for dir ino %lld "
error++;
return;
}
- if (be32_to_cpu(free->hdr.nvalid) > maxent ||
+ if (be32_to_cpu(free->hdr.nvalid) > maxent ||
be32_to_cpu(free->hdr.nvalid) < 0 ||
- be32_to_cpu(free->hdr.nused) > maxent ||
+ be32_to_cpu(free->hdr.nused) > maxent ||
be32_to_cpu(free->hdr.nused) < 0 ||
- be32_to_cpu(free->hdr.nused) >
+ be32_to_cpu(free->hdr.nused) >
be32_to_cpu(free->hdr.nvalid)) {
if (!sflag || v)
dbprintf(_("bad free block nvalid/nused %d/%d for dir "
"ino %lld block %d\n"),
- be32_to_cpu(free->hdr.nvalid),
+ be32_to_cpu(free->hdr.nvalid),
be32_to_cpu(free->hdr.nused), id->ino, dabno);
error++;
return;
if (!sflag || v)
dbprintf(_("bad free block ent %d is %d should "
"be %d for dir ino %lld block %d\n"),
- i, be16_to_cpu(free->bests[i]), ent,
+ i, be16_to_cpu(free->bests[i]), ent,
id->ino, dabno);
error++;
}
if (be16_to_cpu(free->bests[i]) != NULLDATAOFF)
used++;
if (ent != NULLDATAOFF)
- freetab->ents[be32_to_cpu(free->hdr.firstdb) + i] =
+ freetab->ents[be32_to_cpu(free->hdr.firstdb) + i] =
NULLDATAOFF;
}
if (used != be32_to_cpu(free->hdr.nused)) {
if (!sflag || v)
dbprintf(_("bad free block nused %d should be %d for dir "
"ino %lld block %d\n"),
- be32_to_cpu(free->hdr.nused), used, id->ino,
+ be32_to_cpu(free->hdr.nused), used, id->ino,
dabno);
error++;
}
switch (be16_to_cpu(leaf->hdr.info.magic)) {
case XFS_DIR2_LEAF1_MAGIC:
case XFS_DIR3_LEAF1_MAGIC:
- if (be32_to_cpu(leaf->hdr.info.forw) ||
+ if (be32_to_cpu(leaf->hdr.info.forw) ||
be32_to_cpu(leaf->hdr.info.back)) {
if (!sflag || v)
dbprintf(_("bad leaf block forw/back pointers "
"%d/%d for dir ino %lld block %d\n"),
be32_to_cpu(leaf->hdr.info.forw),
- be32_to_cpu(leaf->hdr.info.back),
+ be32_to_cpu(leaf->hdr.info.back),
id->ino, dabno);
error++;
}
ltp = xfs_dir2_leaf_tail_p(mp->m_dir_geo, leaf);
lbp = xfs_dir2_leaf_bests_p(ltp);
for (i = 0; i < be32_to_cpu(ltp->bestcount); i++) {
- if (freetab->nents <= i || freetab->ents[i] !=
+ if (freetab->nents <= i || freetab->ents[i] !=
be16_to_cpu(lbp[i])) {
if (!sflag || v)
dbprintf(_("bestfree %d for dir ino %lld "
if (!sflag || v)
dbprintf(_("bad node block level %d for dir ino "
"%lld block %d\n"),
- nodehdr.level, id->ino,
+ nodehdr.level, id->ino,
dabno);
error++;
}
if (!sflag || v)
dbprintf(_("bad directory data magic # %#x for dir ino "
"%lld block %d\n"),
- be16_to_cpu(leaf->hdr.info.magic), id->ino,
+ be16_to_cpu(leaf->hdr.info.magic), id->ino,
dabno);
error++;
return;
for (i = stale = 0; i < xfs_dir3_leaf_ents_count(leaf); i++) {
if (be32_to_cpu(lep[i].address) == XFS_DIR2_NULL_DATAPTR)
stale++;
- else if (dir_hash_see(be32_to_cpu(lep[i].hashval),
+ else if (dir_hash_see(be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address))) {
if (!sflag || v)
dbprintf(_("dir %lld block %d extra leaf entry "
- "%x %x\n"), id->ino, dabno,
+ "%x %x\n"), id->ino, dabno,
be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address));
error++;
M_DIROPS(mp)->sf_entsize(sf, sfe->namelen);
sfe = M_DIROPS(mp)->sf_nextentry(sf, sfe);
}
- if (i < 0 && (intptr_t)sfe - (intptr_t)sf !=
+ if (i < 0 && (intptr_t)sfe - (intptr_t)sf !=
be64_to_cpu(dip->di_size)) {
if (!sflag)
dbprintf(_("dir %llu size is %lld, should be %u\n"),
}
pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[0]);
for (i = 0; i < be16_to_cpu(block->bb_numrecs); i++)
- scan_lbtree(be64_to_cpu(pp[i]), level, scanfunc_bmap, type, id,
+ scan_lbtree(be64_to_cpu(pp[i]), level, scanfunc_bmap, type, id,
totd, toti, nex, blkmapp, 0, btype);
}
FLD_OFFSET, TYP_NONE },
{ NULL }
};
-
pp = XFS_BMDR_PTR_ADDR(dib, 1,
xfs_bmdr_maxrecs(XFS_DFORK_SIZE(dip, mp, whichfork), 0));
for (i = 0; i < be16_to_cpu(dib->bb_numrecs); i++)
- scan_lbtree(be64_to_cpu(pp[i]), be16_to_cpu(dib->bb_level),
+ scan_lbtree(be64_to_cpu(pp[i]), be16_to_cpu(dib->bb_level),
scanfunc_bmap, extmapp,
whichfork == XFS_DATA_FORK ? TYP_BMAPBTD : TYP_BMAPBTA);
}
pop_cur();
return;
}
- scan_sbtree(agf, be32_to_cpu(agi->agi_root),
+ scan_sbtree(agf, be32_to_cpu(agi->agi_root),
be32_to_cpu(agi->agi_level), scanfunc_ino, TYP_INOBT);
pop_cur();
pop_cur();
}
pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[0]);
for (i = 0; i < nrecs; i++)
- scan_lbtree(be64_to_cpu(pp[i]), level, scanfunc_bmap, extmapp,
+ scan_lbtree(be64_to_cpu(pp[i]), level, scanfunc_bmap, extmapp,
btype);
}
if (XFS_INOBT_IS_FREE_DISK(&rp[i], j))
continue;
process_inode(agf, agino + j, (xfs_dinode_t *)
- ((char *)iocur_top->data +
+ ((char *)iocur_top->data +
((off + j) << mp->m_sb.sb_inodelog)));
}
pop_cur();
}
pp = XFS_INOBT_PTR_ADDR(mp, block, 1, mp->m_inobt_mxr[1]);
for (i = 0; i < be16_to_cpu(block->bb_numrecs); i++)
- scan_sbtree(agf, be32_to_cpu(pp[i]), level, scanfunc_ino,
+ scan_sbtree(agf, be32_to_cpu(pp[i]), level, scanfunc_ino,
TYP_INOBT);
}
asf = (xfs_attr_shortform_t *)XFS_DFORK_APTR(dip);
return bitize(be16_to_cpu(asf->hdr.totsize));
case XFS_DINODE_FMT_EXTENTS:
- return (int)be16_to_cpu(dip->di_anextents) *
+ return (int)be16_to_cpu(dip->di_anextents) *
bitsz(xfs_bmbt_rec_t);
case XFS_DINODE_FMT_BTREE:
return bitize((int)XFS_DFORK_ASIZE(dip, mp));
case XFS_DINODE_FMT_LOCAL:
return bitize((int)be64_to_cpu(dip->di_size));
case XFS_DINODE_FMT_EXTENTS:
- return (int)be32_to_cpu(dip->di_nextents) *
+ return (int)be32_to_cpu(dip->di_nextents) *
bitsz(xfs_bmbt_rec_t);
case XFS_DINODE_FMT_BTREE:
return bitize((int)XFS_DFORK_DSIZE(dip, mp));
static char *el_get_prompt(EditLine *e) { return get_prompt(); }
char *
fetchline(void)
-{
+{
static EditLine *el;
static History *hist;
HistEvent hevent;
- char *line;
+ char *line;
int count;
if (!el) {
/* Not set; nothing to do. Success! */
if (!xfs_sb_version_hasmetauuid(&tsb))
return 0;
-
+
memcpy(&uu, mp->m_sb.sb_meta_uuid, sizeof(uuid_t));
} else {
if (platform_uuid_parse(argv[1], &uu)) {
symlink_count, FLD_COUNT, TYP_NONE },
{ NULL }
};
-
#define atomic64_set(x, v) (*(x) = v)
#endif /* __ATOMIC_H__ */
-
HAVE_FSETXATTR = @have_fsetxattr@
HAVE_MREMAP = @have_mremap@
-GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
+GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
# -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
ifeq ($(PKG_PLATFORM),linux)
fi
fi
_st=0
- fi
+ fi
fi
fi
_manifest ()
-{
+{
echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
}
DIRMODE=`expr $OPTARG`
FILEMODE=$DIRMODE
;;
- D)
+ D)
Dflag=true
;;
- S)
+ S)
symlink=$OPTARG
Sflag=true
;;
- d)
+ d)
dir=$DIST_ROOT/$OPTARG
dflag=true
;;
#
# first usage
#
- $MKDIR -p $dir
+ $MKDIR -p $dir
status=$?
if [ $status -eq 0 ]
then
fi
$LN -s -f $symlink $target
status=$?
- $MANIFEST l $symlink ${target#$DIST_ROOT}
+ $MANIFEST l $symlink ${target#$DIST_ROOT}
elif $Tflag
then
#
$CP $f $dir
status=$?
if [ $status -eq 0 ]
- then
+ then
if [ -f $dir/$f ]
then
$CHMOD $FILEMODE $dir/$f
extern void *kmem_alloc(size_t, int);
extern void *kmem_zalloc(size_t, int);
-static inline void
+static inline void
kmem_free(void *ptr) {
free(ptr);
}
extern int xlog_find_zeroed(struct xlog *log, xfs_daddr_t *blk_no);
extern int xlog_find_cycle_start(struct xlog *log, xfs_buf_t *bp,
- xfs_daddr_t first_blk, xfs_daddr_t *last_blk,
+ xfs_daddr_t first_blk, xfs_daddr_t *last_blk,
uint cycle);
extern int xlog_find_tail(struct xlog *log, xfs_daddr_t *head_blk,
xfs_daddr_t *tail_blk);
xfs_daddr_t tail_blk, int pass);
extern int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *trans,
int pass);
-extern int xlog_header_check_recover(xfs_mount_t *mp,
+extern int xlog_header_check_recover(xfs_mount_t *mp,
xlog_rec_header_t *head);
extern int xlog_header_check_mount(xfs_mount_t *mp,
xlog_rec_header_t *head);
extern void libxfs_rtmount_destroy (xfs_mount_t *);
#endif /* __XFS_MOUNT_H__ */
-
&foff_w, &boff_w,
&tot_w, &flg_w);
}
-
+
print_verbose(extent, blocksize, foff_w,
boff_w, tot_w, flg_w,
max_extents, &cur_extent,
if (mapping)
return maplist_f();
fprintf(stderr, file ?
- _("no mapped regions, try 'help mmap'\n") :
+ _("no mapped regions, try 'help mmap'\n") :
_("no files are open, try 'help open'\n"));
return 0;
} else if (argc == 2) {
break;
}
} while (error == ERANGE);
-
+
if (count == 0) {
/* no links for inode - something wrong here */
parent_t *buf,
size_t bufsiz,
unsigned int *count)
-
+
{
errno = EOPNOTSUPP;
return -1;
progname, strerror(error));
}
-void
+void
fs_table_insert_project_path(
char *dir,
prid_t prid)
exit(1);
}
}
-
ifndef NODEP
-include .ltdep
endif
-
}
return physmem >> 10;
}
-
if (mp->m_logdev_targp != mp->m_ddev_targp)
kmem_free(mp->m_logdev_targp);
kmem_free(mp->m_ddev_targp);
-
+
}
/*
if (ptr == NULL) {
fprintf(stderr, _("%s: zone init failed (%s, %d bytes): %s\n"),
- progname, name, (int)sizeof(kmem_zone_t),
+ progname, name, (int)sizeof(kmem_zone_t),
strerror(errno));
exit(1);
}
}
return ptr;
}
-
(unsigned long)ip->i_df.if_u1.if_extents);
if (ip->i_df.if_flags & XFS_IFEXTENTS) {
nextents = ip->i_df.if_bytes / (uint)sizeof(*ep);
- for (ep = ip->i_df.if_u1.if_extents, i = 0; i < nextents;
+ for (ep = ip->i_df.if_u1.if_extents, i = 0; i < nextents;
i++, ep++) {
xfs_bmbt_irec_t rec;
xfs_dinode_to_disk(dip, &ip->i_d);
xfs_iflush_fork(ip, dip, iip, XFS_DATA_FORK);
- if (XFS_IFORK_Q(ip))
+ if (XFS_IFORK_Q(ip))
xfs_iflush_fork(ip, dip, iip, XFS_ATTR_FORK);
/* update the lsn in the on disk inode if required */
switch (dp->i_d.di_format) {
case XFS_DINODE_FMT_EXTENTS:
/*
- * If there is no attr fork and the data fork is extents,
+ * If there is no attr fork and the data fork is extents,
* determine if creating the default attr fork will result
* in the extents form migrating to btree. If so, the
* minimum offset only needs to be the space required for
.verify_read = xfs_dquot_buf_read_verify,
.verify_write = xfs_dquot_buf_write_verify,
};
-
/*
* XFS On Disk Format Definitions
*
- * This header file defines all the on-disk format definitions for
+ * This header file defines all the on-disk format definitions for
* general XFS objects. Directory and attribute related objects are defined in
* xfs_da_format.h, which log and log item formats are defined in
* xfs_log_format.h. Everything else goes here.
goto error0;
}
- /*
+ /*
* Change the inode free counts and log the ag/sb changes.
*/
be32_add_cpu(&agi->agi_freecount, 1);
res = xfs_calc_buf_res(mp->m_in_maxlevels, XFS_FSB_TO_B(mp, 1));
if (alloc)
- res += xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1),
+ res += xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1),
XFS_FSB_TO_B(mp, 1));
if (modify)
res += (uint)XFS_FSB_TO_B(mp, 1);
i++;
if (blkno == 0) { /* super block */
printf(_(" SUPER Block Buffer:\n"));
- if (!print_buffer)
+ if (!print_buffer)
continue;
printf(_(" icount:%llu ifree:%llu "),
(unsigned long long)
int bucket, buckets;
agi = (xfs_agi_t *)p;
printf(_(" AGI Buffer: (XAGI)\n"));
- if (!print_buffer)
+ if (!print_buffer)
continue;
printf(_(" ver:%d "),
be32_to_cpu(agi->agi_versionnum));
} else if (be32_to_cpu(*(__be32 *)p) == XFS_AGF_MAGIC) {
agf = (xfs_agf_t *)p;
printf(_(" AGF Buffer: (XAGF)\n"));
- if (!print_buffer)
+ if (!print_buffer)
continue;
printf(_(" ver:%d seq#:%d len:%d \n"),
be32_to_cpu(agf->agf_versionnum),
} else if (*(uint *)p == XFS_DQUOT_MAGIC) {
ddq = (xfs_disk_dquot_t *)p;
printf(_(" DQUOT Buffer:\n"));
- if (!print_buffer)
+ if (!print_buffer)
continue;
printf(_(" UIDs 0x%lx-0x%lx\n"),
(unsigned long)be32_to_cpu(ddq->d_id),
# Always gzipped on Debian, but not Redhat pre-7.0.
# We don't deal with bzip2'd man pages, which Mandrake uses,
# someone will send us a patch sometime hopefully. :-)
-#
+#
AC_DEFUN([AC_MANUAL_FORMAT],
[ have_zipped_manpages=false
for d in ${prefix}/share/man ${prefix}/man ; do
#
# Check if we have a working fadvise system call
-#
+#
AC_DEFUN([AC_HAVE_FADVISE],
[ AC_MSG_CHECKING([for fadvise ])
AC_TRY_COMPILE([
AC_SUBST(have_fadvise)
])
-#
+#
# Check if we have a working madvise system call
-#
+#
AC_DEFUN([AC_HAVE_MADVISE],
[ AC_MSG_CHECKING([for madvise ])
AC_TRY_COMPILE([
AC_SUBST(have_madvise)
])
-#
+#
# Check if we have a working mincore system call
-#
+#
AC_DEFUN([AC_HAVE_MINCORE],
[ AC_MSG_CHECKING([for mincore ])
AC_TRY_COMPILE([
AC_SUBST(have_mincore)
])
-#
+#
# Check if we have a working sendfile system call
-#
+#
AC_DEFUN([AC_HAVE_SENDFILE],
[ AC_MSG_CHECKING([for sendfile ])
AC_TRY_COMPILE([
if (mb_count > max_indicies)
fatal("bad block count: %u\n", mb_count);
- if (fread(block_buffer, mb_count << tmb.mb_blocklog,
+ if (fread(block_buffer, mb_count << tmb.mb_blocklog,
1, src_f) != 1)
fatal("error reading from file: %s\n", strerror(errno));
* terms of 512 bytes blocks (only to convert it to bytes later..)
*/
*sunit = *sunit >> 9;
- *swidth = *swidth >> 9;
+ *swidth = *swidth >> 9;
if (blkid_topology_get_alignment_offset(tp) != 0) {
fprintf(stderr,
* so, reset the record count to 0 to avoid exposure of an invalid
* record start block.
*/
- arec->ar_blockcount = cpu_to_be32(agsize -
+ arec->ar_blockcount = cpu_to_be32(agsize -
be32_to_cpu(arec->ar_startblock));
if (!arec->ar_blockcount)
block->bb_numrecs = 0;
* so, reset the record count to 0 to avoid exposure of an invalid
* record start block.
*/
- arec->ar_blockcount = cpu_to_be32(agsize -
+ arec->ar_blockcount = cpu_to_be32(agsize -
be32_to_cpu(arec->ar_startblock));
if (!arec->ar_blockcount)
block->bb_numrecs = 0;
__uint64_t *bsoft,
__uint64_t *bhard,
__uint64_t *isoft,
- __uint64_t *ihard,
+ __uint64_t *ihard,
__uint64_t *rtbsoft,
__uint64_t *rtbhard)
{
__uint64_t *bsoft,
__uint64_t *bhard,
__uint64_t *isoft,
- __uint64_t *ihard,
+ __uint64_t *ihard,
__uint64_t *rtbsoft,
__uint64_t *rtbhard)
{
__uint64_t *bsoft,
__uint64_t *bhard,
__uint64_t *isoft,
- __uint64_t *ihard,
+ __uint64_t *ihard,
__uint64_t *rtbsoft,
__uint64_t *rtbhard)
{
__uint64_t *bsoft,
__uint64_t *bhard,
__uint64_t *isoft,
- __uint64_t *ihard,
+ __uint64_t *ihard,
__uint64_t *rtbsoft,
__uint64_t *rtbhard)
{
extern char *gid_to_name(__uint32_t __gid);
extern char *prid_to_name(__uint32_t __prid);
extern bool isdigits_only(const char *);
-
}
dir = mount->fs_name;
if (type & XFS_USER_QUOTA) {
- if (remove_qtype_extents(dir, XFS_USER_QUOTA) < 0)
+ if (remove_qtype_extents(dir, XFS_USER_QUOTA) < 0)
return;
}
if (type & XFS_GROUP_QUOTA) {
- if (remove_qtype_extents(dir, XFS_GROUP_QUOTA) < 0)
+ if (remove_qtype_extents(dir, XFS_GROUP_QUOTA) < 0)
return;
} else if (type & XFS_PROJ_QUOTA) {
- if (remove_qtype_extents(dir, XFS_PROJ_QUOTA) < 0)
+ if (remove_qtype_extents(dir, XFS_PROJ_QUOTA) < 0)
return;
}
if (flags & VERBOSE_FLAG)
be32_to_cpu(agf->agf_length), i,
mp->m_sb.sb_agblocks);
if (!no_modify)
- agf->agf_length =
+ agf->agf_length =
cpu_to_be32(mp->m_sb.sb_agblocks);
} else {
agblocks = mp->m_sb.sb_dblocks -
be32_to_cpu(agi->agi_length), agno,
mp->m_sb.sb_agblocks);
if (!no_modify)
- agi->agi_length =
+ agi->agi_length =
cpu_to_be32(mp->m_sb.sb_agblocks);
} else {
agblocks = mp->m_sb.sb_dblocks -
do_warn(
_("there are no attributes in the fork for inode %" PRIu64 "\n"),
ino);
- asf->hdr.totsize =
+ asf->hdr.totsize =
cpu_to_be16(sizeof(xfs_attr_sf_hdr_t));
*repair = 1;
return(1);
if (currententry->flags & XFS_ATTR_ROOT)
junkit |= valuecheck(mp,
(char *)¤tentry->nameval[0],
- NULL, currententry->namelen,
+ NULL, currententry->namelen,
currententry->valuelen);
remainingspace = remainingspace -
xfs_attr_leaf_name_local_t *local;
local = xfs_attr3_leaf_name_local(leaf, i);
- if (local->namelen == 0 || namecheck((char *)&local->nameval[0],
+ if (local->namelen == 0 || namecheck((char *)&local->nameval[0],
local->namelen)) {
do_warn(
_("attribute entry %d in attr block %u, inode %" PRIu64 " has bad name (namelen = %d)\n"),
/* Only check values for root security attributes */
if (entry->flags & XFS_ATTR_ROOT) {
- if (valuecheck(mp, (char *)&local->nameval[0], NULL,
+ if (valuecheck(mp, (char *)&local->nameval[0], NULL,
local->namelen, be16_to_cpu(local->valuelen))) {
do_warn(
_("bad security value for attribute entry %d in attr block %u, inode %" PRIu64 "\n"),
return -1;
}
}
- return xfs_attr_leaf_entsize_local(local->namelen,
+ return xfs_attr_leaf_entsize_local(local->namelen,
be16_to_cpu(local->valuelen));
}
remotep = xfs_attr3_leaf_name_remote(leaf, i);
- if (remotep->namelen == 0 || namecheck((char *)&remotep->name[0],
- remotep->namelen) ||
- be32_to_cpu(entry->hashval) !=
- libxfs_da_hashname((unsigned char *)&remotep->name[0],
+ if (remotep->namelen == 0 || namecheck((char *)&remotep->name[0],
+ remotep->namelen) ||
+ be32_to_cpu(entry->hashval) !=
+ libxfs_da_hashname((unsigned char *)&remotep->name[0],
remotep->namelen) ||
be32_to_cpu(entry->hashval) < last_hashval ||
be32_to_cpu(remotep->valueblk) == 0) {
if (!(entry->flags & XFS_ATTR_ROOT))
goto out;
-
+
value = malloc(be32_to_cpu(remotep->valuelen));
if (value == NULL) {
do_warn(
* since the block will get compacted anyhow by the kernel.
*/
- if ((leafhdr.holes == 0 &&
+ if ((leafhdr.holes == 0 &&
firstb != leafhdr.firstused) ||
leafhdr.firstused > firstb) {
if (!no_modify) {
do_warn(
_("- resetting first used heap value from %d to %d in "
"block %u of attribute fork of inode %" PRIu64 "\n"),
- leafhdr.firstused,
+ leafhdr.firstused,
firstb, da_bno, ino);
leafhdr.firstused = firstb;
*repair = 1;
do_warn(
_("- would reset first used value from %d to %d in "
"block %u of attribute fork of inode %" PRIu64 "\n"),
- leafhdr.firstused,
+ leafhdr.firstused,
firstb, da_bno, ino);
}
}
do_warn(
_("- resetting usedbytes cnt from %d to %d in "
"block %u of attribute fork of inode %" PRIu64 "\n"),
- leafhdr.usedbytes,
+ leafhdr.usedbytes,
usedbs, da_bno, ino);
leafhdr.usedbytes = usedbs;
*repair = 1;
do_warn(
_("- would reset usedbytes cnt from %d to %d in "
"block %u of attribute fork of %" PRIu64 "\n"),
- leafhdr.usedbytes,
+ leafhdr.usedbytes,
usedbs, da_bno, ino);
}
}
bno = blkmap_get(blkmap, 0);
if ( bno == NULLFSBLOCK ) {
- if (dip->di_aformat == XFS_DINODE_FMT_EXTENTS &&
+ if (dip->di_aformat == XFS_DINODE_FMT_EXTENTS &&
be16_to_cpu(dip->di_anextents) == 0)
return(0); /* the kernel can handle this state */
do_warn(
}
/*
* keep track of greatest block # -- that gets
- * us the length of the directory/attribute
+ * us the length of the directory/attribute
*/
if (cursor->level[this_level].bno > cursor->greatest_bno)
cursor->greatest_bno = cursor->level[this_level].bno;
xfs_agnumber_t agno,
xfs_agblock_t agbno)
{
- if (agno < (sbp->sb_agcount - 1))
+ if (agno < (sbp->sb_agcount - 1))
return (agbno >= sbp->sb_agblocks);
- if (agno == (sbp->sb_agcount - 1))
+ if (agno == (sbp->sb_agcount - 1))
return (agbno >= (sbp->sb_dblocks -
((xfs_rfsblock_t)(sbp->sb_agcount - 1) *
sbp->sb_agblocks)));
int max_blocks;
if (be64_to_cpu(dino->di_size) <= XFS_DFORK_DSIZE(dino, mp)) {
- if (dino->di_format == XFS_DINODE_FMT_LOCAL)
+ if (dino->di_format == XFS_DINODE_FMT_LOCAL)
return 0;
do_warn(
_("mismatch between format (%d) and size (%" PRId64 ") in symlink ino %" PRIu64 "\n"),
* local symlink, just copy the symlink out of the
* inode into the data area
*/
- memmove(symlink, XFS_DFORK_DPTR(dino),
+ memmove(symlink, XFS_DFORK_DPTR(dino),
be64_to_cpu(dino->di_size));
} else {
int error;
*/
switch (dino->di_format) {
case XFS_DINODE_FMT_LOCAL:
- err = process_lclinode(mp, agno, ino, dino,
+ err = process_lclinode(mp, agno, ino, dino,
XFS_DATA_FORK);
break;
case XFS_DINODE_FMT_EXTENTS:
if (check_dups) {
switch (dino->di_aformat) {
case XFS_DINODE_FMT_LOCAL:
- err = process_lclinode(mp, agno, ino, dino,
+ err = process_lclinode(mp, agno, ino, dino,
XFS_ATTR_FORK);
break;
case XFS_DINODE_FMT_EXTENTS:
agi->agi_newino = cpu_to_be32(agi_stat->first_agino);
agi->agi_dirino = cpu_to_be32(NULLAGINO);
- for (i = 0; i < XFS_AGI_UNLINKED_BUCKETS; i++)
+ for (i = 0; i < XFS_AGI_UNLINKED_BUCKETS; i++)
agi->agi_unlinked[i] = cpu_to_be32(NULLAGINO);
if (xfs_sb_version_hascrc(&mp->m_sb))
*/
error = -libxfs_dir_createname(tp, pip, &xname, ip->i_ino, &first,
&flist, nres);
- if (error)
+ if (error)
do_error(
_("can't make %s, createname error %d\n"),
ORPHANAGE, error);
{
struct pf_work_args *wargs = args;
- prefetch_ag_range(work, wargs->start_ag, wargs->end_ag,
+ prefetch_ag_range(work, wargs->start_ag, wargs->end_ag,
wargs->dirs_only, wargs->func);
free(args);
}
int verify_set_agheader(struct xfs_mount *, struct xfs_buf *,
struct xfs_sb *, struct xfs_agf *, struct xfs_agi *,
xfs_agnumber_t);
-
mp->m_sb.sb_fdblocks, fdblocks);
}
}
-
}
}
- if (!fs_aligned_inodes && xfs_sb_version_hasalign(sb))
+ if (!fs_aligned_inodes && xfs_sb_version_hasalign(sb))
sb->sb_versionnum &= ~XFS_SB_VERSION_ALIGNBIT;
}
cleanup()
{
- rm -f $PATCH
+ rm -f $PATCH
}
fail()