xfsprogs: Remove trailing blanks on various places
PATCH 1/1 xfsprogs: Remove trailing blanks on various places
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.
Note:
I decided to remove them because I have enabled highlighting of these, and they were flashing into my eyes whenever I scrolled around. :-)
Signed-off-by Jan Tulak <[email protected]>
--- copy/xfs_copy.c | 4 +-- copy/xfs_copy.h | 1 - db/bmap.c | 2 +- db/check.c | 76 +++++++++++++++++++++++------------------------ db/dir2sf.c | 1 - db/frag.c | 10 +++---- db/inode.c | 4 +-- db/input.c | 4 +-- db/sb.c | 2 +- db/symlink.c | 1 - include/atomic.h | 1 - include/builddefs.in | 2 +- include/install-sh | 16 +++++----- include/kmem.h | 2 +- include/libxlog.h | 4 +-- include/xfs_mount.h | 1 - io/fiemap.c | 2 +- io/mmap.c | 2 +- io/parent.c | 2 +- libhandle/handle.c | 2 +- libxcmd/paths.c | 3 +- libxfs/Makefile | 1 - libxfs/darwin.c | 1 - libxfs/init.c | 2 +- libxfs/kmem.c | 3 +- libxfs/util.c | 4 +-- libxfs/xfs_attr_leaf.c | 2 +- libxfs/xfs_dquot_buf.c | 1 - libxfs/xfs_format.h | 2 +- libxfs/xfs_ialloc.c | 2 +- libxfs/xfs_rtbitmap.c | 1 - libxfs/xfs_trans_resv.c | 2 +- logprint/log_print_all.c | 8 ++--- m4/manual_format.m4 | 2 +- m4/package_aiodev.m4 | 1 - m4/package_libcdev.m4 | 14 ++++----- mdrestore/xfs_mdrestore.c | 2 +- mkfs/xfs_mkfs.c | 6 ++-- quota/edit.c | 8 ++--- quota/quota.h | 1 - quota/state.c | 6 ++-- repair/agheader.c | 4 +-- repair/attr_repair.c | 32 ++++++++++---------- repair/da_util.c | 2 +- repair/dinode.c | 12 ++++---- repair/phase5.c | 2 +- repair/phase6.c | 2 +- repair/prefetch.c | 2 +- repair/protos.h | 1 - repair/scan.c | 1 - repair/versions.c | 2 +- tools/libxfs-apply | 2 +- 52 files changed, 129 insertions(+), 144 deletions(-)
copy/xfs_copy.c +2 -2
@@ -1054,8 +1054,8 @@ main(int argc, char **argv)* 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 ) {
copy/xfs_copy.h +0 -1
@@ -87,4 +87,3 @@ typedef struct {int error;int err_type; } target_control; -
db/bmap.c +1 -1
@@ -92,7 +92,7 @@ bmap( 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),
db/check.c +38 -38
243 lines not on this page · raw message
db/dir2sf.c +0 -1
@@ -273,4 +273,3 @@ const field_t dir3_sf_entry_flds[] = { FLD_OFFSET, TYP_NONE }, { NULL } }; -
db/frag.c +5 -5
@@ -258,7 +258,7 @@ process_btinode( 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 ); }
@@ -377,7 +377,7 @@ scan_ag(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 ();
@@ -457,7 +457,7 @@ scanfunc_bmap( } 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); }
@@ -495,7 +495,7 @@ scanfunc_ino(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 ();
@@ -504,6 +504,6 @@ scanfunc_ino( } 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 ); }
db/inode.c +2 -2
@@ -337,7 +337,7 @@ inode_a_size( 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));
@@ -595,7 +595,7 @@ inode_u_size(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));
db/input.c +2 -2
@@ -238,11 +238,11 @@ fetchline(void)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) {
db/sb.c +1 -1
@@ -414,7 +414,7 @@ uuid_f(/* 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)) {
db/symlink.c +0 -1
@@ -78,4 +78,3 @@ const struct field symlink_crc_flds[] = { symlink_count, FLD_COUNT, TYP_NONE }, { NULL } }; -
include/atomic.h +0 -1
@@ -34,4 +34,3 @@ typedef int64_t atomic64_t;#define atomic64_set (x, v) (*(x) = v)#endif /* __ATOMIC_H__ */ -
include/builddefs.in +1 -1
@@ -109,7 +109,7 @@ HAVE_FLS = @have_fls@ 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)
include/install-sh +8 -8
@@ -56,7 +56,7 @@ _chown () fi fi _st=0 - fi + fi fi fi
@@ -65,7 +65,7 @@ _chown () _manifest () -{ +{ echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null} }
@@ -116,14 +116,14 @@ do DIRMODE=`expr $OPTARG` FILEMODE=$DIRMODE ;; - D) + D) Dflag=true ;; - S) + S) symlink=$OPTARG Sflag=true ;; - d) + d) dir=$DIST_ROOT/$OPTARG dflag=true ;;
@@ -145,7 +145,7 @@ then # # first usage # - $MKDIR -p $dir + $MKDIR -p $dir status=$? if [ $status -eq 0 ] then
@@ -171,7 +171,7 @@ then fi $LN -s -f $symlink $target status=$? - $MANIFEST l $symlink ${target#$DIST_ROOT} + $MANIFEST l $symlink ${target#$DIST_ROOT} elif $Tflag then #
@@ -289,7 +289,7 @@ else $CP $f $dir status=$? if [ $status -eq 0 ] - then + then if [ -f $dir/$f ] then $CHMOD $FILEMODE $dir/$f
include/kmem.h +1 -1
@@ -44,7 +44,7 @@ kmem_zone_free(kmem_zone_t *zone, void *ptr)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); }
include/libxlog.h +2 -2
@@ -95,7 +95,7 @@ extern int xlog_bread_noalign(struct xlog *log, xfs_daddr_t blk_no,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);
@@ -115,7 +115,7 @@ extern int xlog_do_recovery_pass(struct xlog *log, xfs_daddr_t head_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);
include/xfs_mount.h +0 -1
@@ -153,4 +153,3 @@ extern void libxfs_umount (xfs_mount_t *);extern void libxfs_rtmount_destroy (xfs_mount_t *);#endif /* __XFS_MOUNT_H__ */ -
io/fiemap.c +1 -1
@@ -298,7 +298,7 @@ fiemap_f( &foff_w, &boff_w, &tot_w, &flg_w); } - + print_verbose(extent, blocksize, foff_w, boff_w, tot_w, flg_w, max_extents, &cur_extent,
io/mmap.c +1 -1
@@ -166,7 +166,7 @@ mmap_f(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 ) {
io/parent.c +1 -1
@@ -141,7 +141,7 @@ check_parents(parent_t *parentbuf, size_t *parentbuf_size,break ; } }while (error ==ERANGE ); - +if (count ==0 ) {/* no links for inode - something wrong here */
libhandle/handle.c +1 -1
@@ -413,7 +413,7 @@ parents_by_handle(parent_t *buf, size_t bufsiz, unsigned int *count) - + { errno =EOPNOTSUPP ;return -1 ;
libxcmd/paths.c +1 -2
@@ -515,7 +515,7 @@ out_error: progname, strerror(error)); } -void +void fs_table_insert_project_path (char *dir,prid_t prid)
@@ -536,4 +536,3 @@ fs_table_insert_project_path(exit (1 ); } } -
libxfs/Makefile +0 -1
@@ -148,4 +148,3 @@ install-dev: install ifndef NODEP -include .ltdep endif -
libxfs/darwin.c +0 -1
@@ -142,4 +142,3 @@ platform_physmem(void) }return physmem >>10 ; } -
libxfs/init.c +1 -1
@@ -840,7 +840,7 @@ libxfs_umount(xfs_mount_t *mp)if (mp->m_logdev_targp != mp->m_ddev_targp)kmem_free (mp->m_logdev_targp);kmem_free (mp->m_ddev_targp); - + }/*
libxfs/kmem.c +1 -2
@@ -13,7 +13,7 @@ kmem_zone_init(int size, char *name)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 ); }
@@ -80,4 +80,3 @@ kmem_realloc(void *ptr, size_t new_size, size_t old_size, int flags) }return ptr; } -
libxfs/util.c +2 -2
@@ -359,7 +359,7 @@ libxfs_iprint( (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;
@@ -453,7 +453,7 @@ libxfs_iflush_int(xfs_inode_t *ip, xfs_buf_t *bp)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 */
libxfs/xfs_attr_leaf.c +1 -1
@@ -421,7 +421,7 @@ xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes)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
libxfs/xfs_dquot_buf.c +0 -1
@@ -294,4 +294,3 @@ const struct xfs_buf_ops xfs_dquot_buf_ops = { .verify_read = xfs_dquot_buf_read_verify, .verify_write = xfs_dquot_buf_write_verify, }; -
libxfs/xfs_format.h +1 -1
@@ -21,7 +21,7 @@/* * 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.
libxfs/xfs_ialloc.c +1 -1
@@ -1982,7 +1982,7 @@ xfs_difree_inobt( goto error0; } -/* +/* * Change the inode free counts and log the ag/sb changes. */ be32_add_cpu (&agi->agi_freecount,1 );
libxfs/xfs_rtbitmap.c +0 -1
@@ -983,4 +983,3 @@ xfs_rtfree_extent( }return 0 ; } -
libxfs/xfs_trans_resv.c +1 -1
@@ -136,7 +136,7 @@ xfs_calc_finobt_res( 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 );
logprint/log_print_all.c +4 -4
@@ -104,7 +104,7 @@ xlog_recover_print_buffer( 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)
@@ -123,7 +123,7 @@ xlog_recover_print_buffer(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));
@@ -157,7 +157,7 @@ xlog_recover_print_buffer( }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),
@@ -179,7 +179,7 @@ xlog_recover_print_buffer( }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),
m4/manual_format.m4 +1 -1
@@ -3,7 +3,7 @@ # 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
m4/package_aiodev.m4 +0 -1
@@ -34,4 +34,3 @@ AC_DEFUN([AC_PACKAGE_NEED_LIO_LISTIO], fi AC_SUBST(librt) ]) -
m4/package_libcdev.m4 +7 -7
@@ -1,6 +1,6 @@ # # Check if we have a working fadvise system call -# +# AC_DEFUN([AC_HAVE_FADVISE], [ AC_MSG_CHECKING([for fadvise ]) AC_TRY_COMPILE([
@@ -15,9 +15,9 @@ AC_DEFUN([AC_HAVE_FADVISE], 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([
@@ -32,9 +32,9 @@ AC_DEFUN([AC_HAVE_MADVISE], 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([
@@ -49,9 +49,9 @@ AC_DEFUN([AC_HAVE_MINCORE], 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([
mdrestore/xfs_mdrestore.c +1 -1
@@ -156,7 +156,7 @@ perform_restore(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));
mkfs/xfs_mkfs.c +3 -3
@@ -430,7 +430,7 @@ static void blkid_get_topology(* 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,
@@ -2879,7 +2879,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),* 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 ;
@@ -2924,7 +2924,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),* 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 ;
quota/edit.c +4 -4
@@ -122,7 +122,7 @@ set_limits( __uint64_t *bsoft, __uint64_t *bhard, __uint64_t *isoft, - __uint64_t *ihard, + __uint64_t *ihard, __uint64_t *rtbsoft, __uint64_t *rtbhard) {
@@ -155,7 +155,7 @@ set_user_limits( __uint64_t *bsoft, __uint64_t *bhard, __uint64_t *isoft, - __uint64_t *ihard, + __uint64_t *ihard, __uint64_t *rtbsoft, __uint64_t *rtbhard) {
@@ -178,7 +178,7 @@ set_group_limits( __uint64_t *bsoft, __uint64_t *bhard, __uint64_t *isoft, - __uint64_t *ihard, + __uint64_t *ihard, __uint64_t *rtbsoft, __uint64_t *rtbhard) {
@@ -201,7 +201,7 @@ set_project_limits( __uint64_t *bsoft, __uint64_t *bhard, __uint64_t *isoft, - __uint64_t *ihard, + __uint64_t *ihard, __uint64_t *rtbsoft, __uint64_t *rtbhard) {
quota/quota.h +0 -1
@@ -82,4 +82,3 @@ extern char *uid_to_name(__uint32_t __uid);extern char *gid_to_name (__uint32_t __gid);extern char *prid_to_name (__uint32_t __prid);extern bool isdigits_only (const char *); -
quota/state.c +3 -3
@@ -339,14 +339,14 @@ remove_extents( } 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 )
repair/agheader.c +2 -2
@@ -69,7 +69,7 @@ verify_set_agf(xfs_mount_t *mp, xfs_agf_t *agf, xfs_agnumber_t i)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 -
@@ -168,7 +168,7 @@ verify_set_agi(xfs_mount_t *mp, xfs_agi_t *agi, xfs_agnumber_t agno)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 -
repair/attr_repair.c +16 -16
@@ -243,7 +243,7 @@ process_shortform_attr(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 );
@@ -325,7 +325,7 @@ process_shortform_attr(if (currententry->flags &XFS_ATTR_ROOT ) junkit |=valuecheck (mp, (char *)¤tentry->nameval[0 ], -NULL , currententry->namelen, +NULL , currententry->namelen, currententry->valuelen); remainingspace = remainingspace -
@@ -470,7 +470,7 @@ process_leaf_attr_local(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"),
@@ -497,7 +497,7 @@ process_leaf_attr_local(/* 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"),
@@ -505,7 +505,7 @@ process_leaf_attr_local(return -1 ; } } -return xfs_attr_leaf_entsize_local (local->namelen, +return xfs_attr_leaf_entsize_local (local->namelen,be16_to_cpu (local->valuelen)); }
@@ -525,10 +525,10 @@ process_leaf_attr_remote( 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 ) {
@@ -539,7 +539,7 @@ process_leaf_attr_remote(if (!(entry->flags &XFS_ATTR_ROOT )) goto out; - + value =malloc (be32_to_cpu (remotep->valuelen));if (value ==NULL ) { do_warn(
@@ -673,14 +673,14 @@ process_leaf_attr_block(* 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 ;
@@ -688,7 +688,7 @@ process_leaf_attr_block(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); } }
@@ -698,7 +698,7 @@ process_leaf_attr_block(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 ;
@@ -706,7 +706,7 @@ process_leaf_attr_block(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); } }
@@ -988,7 +988,7 @@ process_longform_attr( 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(
repair/da_util.c +1 -1
@@ -386,7 +386,7 @@ _("bad %s forward block pointer, expected 0, saw %u\n"), }/* * 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;
repair/dinode.c +6 -6
@@ -288,9 +288,9 @@ verify_ag_bno(xfs_sb_t *sbp, 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)));
@@ -1159,7 +1159,7 @@ process_symlink_extlist(xfs_mount_t *mp, xfs_ino_t lino, xfs_dinode_t *dino)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"),
@@ -1359,7 +1359,7 @@ process_symlink(* 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;
@@ -1934,7 +1934,7 @@ process_inode_data_fork(*/ 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 :
@@ -2068,7 +2068,7 @@ process_inode_attr_fork(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 :
repair/phase5.c +1 -1
@@ -1124,7 +1124,7 @@ build_agi(xfs_mount_t *mp, xfs_agnumber_t agno, bt_status_t *btree_curs, 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))
repair/phase6.c +1 -1
@@ -1039,7 +1039,7 @@ mk_orphanage(xfs_mount_t *mp)*/ 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);
repair/prefetch.c +1 -1
@@ -945,7 +945,7 @@ prefetch_ag_range_work( {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); }
repair/protos.h +0 -1
@@ -55,4 +55,3 @@ void phase7(struct xfs_mount *);int verify_set_agheader (struct xfs_mount *,struct xfs_buf *,struct xfs_sb *,struct xfs_agf *,struct xfs_agi *,xfs_agnumber_t ); -
repair/scan.c +0 -1
@@ -1803,4 +1803,3 @@ scan_ags( mp->m_sb.sb_fdblocks, fdblocks); } } -
repair/versions.c +1 -1
@@ -84,7 +84,7 @@ update_sb_version(xfs_mount_t *mp) } } -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 ; }
tools/libxfs-apply +1 -1
@@ -17,7 +17,7 @@ usage() cleanup() { - rm -f $PATCH + rm -f $PATCH } fail()
Signature · 6 lines
2.6.0 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs