scrub: remove xfs_ prefixes from various function
PATCH 1/2 scrub: remove xfs_ prefixes from various function
Don't prefix tool private functions. We'll use the xfs_* namespace for the shared libxfs functions soon, and want to be able to easily verify that the callers handle return negative errors for them.
--- scrub/common.c | 2 +- scrub/common.h | 2 +- scrub/filemap.c | 2 +- scrub/inodes.c | 2 +- scrub/phase1.c | 8 ++-- scrub/phase2.c | 8 ++-- scrub/phase3.c | 18 ++++---- scrub/phase4.c | 2 +- scrub/phase5.c | 2 +- scrub/phase7.c | 2 +- scrub/repair.c | 2 +- scrub/scrub.c | 106 +++++++++++++++++++++++----------------------- scrub/scrub.h | 42 +++++++++--------- scrub/spacemap.c | 2 +- scrub/vfs.c | 2 +- scrub/xfs_scrub.c | 4 +- 16 files changed, 103 insertions(+), 103 deletions(-)
scrub/common.c +1 -1
@@ -30,7 +30,7 @@ extern char *progname;/* Too many errors? Bail out. */ bool -xfs_scrub_excessive_errors ( +scrub_excessive_errors (struct scrub_ctx *ctx) {unsigned long long errors_seen;
scrub/common.h +1 -1
@@ -13,7 +13,7 @@*/ #define DESCR_BUFSZ 256 -bool xfs_scrub_excessive_errors (struct scrub_ctx *ctx); +bool scrub_excessive_errors (struct scrub_ctx *ctx);enum error_level {S_ERROR =0 ,
scrub/filemap.c +1 -1
@@ -93,7 +93,7 @@ scrub_iterate_filemaps( ret =fn (ctx, fd, whichfork, &fsx, &bmap, arg);if (ret) goto out; -if (xfs_scrub_excessive_errors (ctx)) +if (scrub_excessive_errors (ctx)) goto out; }
scrub/inodes.c +1 -1
@@ -193,7 +193,7 @@ _("Changed too many times during scan; giving up."));default : goto err; } -if (xfs_scrub_excessive_errors (ctx)) { +if (scrub_excessive_errors (ctx)) { si->aborted = true; goto out; }
scrub/phase1.c +4 -4
@@ -140,10 +140,10 @@ _("Not an XFS filesystem.")); }/* Do we have kernel-assisted metadata scrubbing? */ -if (!xfs_can_scrub_fs_metadata (ctx) || !xfs_can_scrub_inode (ctx) || - !xfs_can_scrub_bmap (ctx) || !xfs_can_scrub_dir (ctx) || - !xfs_can_scrub_attr (ctx) || !xfs_can_scrub_symlink (ctx) || - !xfs_can_scrub_parent (ctx)) { +if (!can_scrub_fs_metadata (ctx) || !can_scrub_inode (ctx) || + !can_scrub_bmap (ctx) || !can_scrub_dir (ctx) || + !can_scrub_attr (ctx) || !can_scrub_symlink (ctx) || + !can_scrub_parent (ctx)) {str_error (ctx, ctx->mntpoint,_ ("Kernel metadata scrubbing facility is not available." ));return ECANCELED ;
scrub/phase2.c +4 -4
@@ -44,7 +44,7 @@ scan_ag_metadata(* First we scrub and fix the AG headers, because we need * them to work well enough to check the AG btrees. */ - ret =xfs_scrub_ag_headers (ctx, agno, &alist); + ret =scrub_ag_headers (ctx, agno, &alist);if (ret) goto err;
@@ -54,7 +54,7 @@ scan_ag_metadata( goto err;/* Now scrub the AG btrees. */ - ret =xfs_scrub_ag_metadata (ctx, agno, &alist); + ret =scrub_ag_metadata (ctx, agno, &alist);if (ret) goto err;
@@ -108,7 +108,7 @@ scan_fs_metadata(return ;action_list_init (&alist); - ret =xfs_scrub_fs_metadata (ctx, &alist); + ret =scrub_fs_metadata (ctx, &alist);if (ret) { *aborted = true;return ;
@@ -141,7 +141,7 @@ phase2_func(* anything else. */ action_list_init (&alist); - ret =xfs_scrub_primary_super (ctx, &alist); + ret =scrub_primary_super (ctx, &alist);if (ret) goto out; ret =action_list_process_or_defer (ctx,0 , &alist);
scrub/phase3.c +9 -9
@@ -84,7 +84,7 @@ scrub_inode( }/* Scrub the inode. */ - error =scrub_fd (ctx, xfs_scrub_inode_fields, bstat, &alist); + error =scrub_fd (ctx, scrub_inode_fields, bstat, &alist);if (error) goto out;
@@ -93,13 +93,13 @@ scrub_inode( goto out;/* Scrub all block mappings. */ - error =scrub_fd (ctx, xfs_scrub_data_fork, bstat, &alist); + error =scrub_fd (ctx, scrub_data_fork, bstat, &alist);if (error) goto out; - error =scrub_fd (ctx, xfs_scrub_attr_fork, bstat, &alist); + error =scrub_fd (ctx, scrub_attr_fork, bstat, &alist);if (error) goto out; - error =scrub_fd (ctx, xfs_scrub_cow_fork, bstat, &alist); + error =scrub_fd (ctx, scrub_cow_fork, bstat, &alist);if (error) goto out;
@@ -109,22 +109,22 @@ scrub_inode(if (S_ISLNK (bstat->bs_mode)) {/* Check symlink contents. */ - error =xfs_scrub_symlink (ctx, bstat->bs_ino, bstat->bs_gen, + error =scrub_symlink (ctx, bstat->bs_ino, bstat->bs_gen, &alist); }else if (S_ISDIR (bstat->bs_mode)) {/* Check the directory entries. */ - error =scrub_fd (ctx, xfs_scrub_dir, bstat, &alist); + error =scrub_fd (ctx, scrub_dir, bstat, &alist); }if (error) goto out;/* Check all the extended attributes. */ - error =scrub_fd (ctx, xfs_scrub_attr, bstat, &alist); + error =scrub_fd (ctx, scrub_attr, bstat, &alist);if (error) goto out;/* Check parent pointers. */ - error =scrub_fd (ctx, xfs_scrub_parent, bstat, &alist); + error =scrub_fd (ctx, scrub_parent, bstat, &alist);if (error) goto out;
@@ -181,7 +181,7 @@ phase3_func(if (err) goto free; -xfs_scrub_report_preen_triggers (ctx); +scrub_report_preen_triggers (ctx); err =ptcounter_value (ictx.icount, &val);if (err) {str_liberror (ctx, err,_ ("summing scanned inode counter" ));
scrub/phase4.c +1 -1
@@ -119,7 +119,7 @@ phase4_func(* counters, so counter repairs have to be put on the list now so that * they get fixed before we stop retrying unfixed metadata repairs. */ - ret =xfs_scrub_fs_summary (ctx, &ctx->action_lists[0 ]); + ret =scrub_fs_summary (ctx, &ctx->action_lists[0 ]);if (ret)return ret;
scrub/phase5.c +1 -1
@@ -402,7 +402,7 @@ _("Filesystem has errors, skipping connectivity checks."));if (aborted)return ECANCELED ; -xfs_scrub_report_preen_triggers (ctx); +scrub_report_preen_triggers (ctx);return 0 ; }
scrub/phase7.c +1 -1
@@ -119,7 +119,7 @@ phase7_func(/* Check and fix the fs summary counters. */ action_list_init (&alist); - error =xfs_scrub_fs_summary (ctx, &alist); + error =scrub_fs_summary (ctx, &alist);if (error)return error; error = action_list_process(ctx, ctx->mnt.fd, &alist,
scrub/repair.c +1 -1
@@ -258,7 +258,7 @@ action_list_process( } } -if (xfs_scrub_excessive_errors (ctx)) +if (scrub_excessive_errors (ctx))return ECANCELED ;return 0 ; }
scrub/scrub.c +53 -53
325 lines not on this page · raw message
scrub/scrub.h +21 -21
60 lines not on this page · raw message
scrub/spacemap.c +1 -1
@@ -62,7 +62,7 @@ scrub_iterate_fsmap( error =fn (ctx, p, arg);if (error) goto out; -if (xfs_scrub_excessive_errors (ctx)) +if (scrub_excessive_errors (ctx)) goto out; }
scrub/vfs.c +1 -1
@@ -182,7 +182,7 @@ scan_fs_dir(break ; } -if (xfs_scrub_excessive_errors (ctx)) { +if (scrub_excessive_errors (ctx)) { sft->aborted = true;break ; }
scrub/xfs_scrub.c +2 -2
@@ -493,7 +493,7 @@ _("Scrub aborted after phase %d."),break ;/* Too many errors? */ -if (xfs_scrub_excessive_errors (ctx)) { +if (scrub_excessive_errors (ctx)) { ret =ECANCELED ;break ; }
@@ -761,7 +761,7 @@ main(* We don't want every thread yelling that into the output, so check * if we hit the threshold and tell the user *once*. */ -if (xfs_scrub_excessive_errors (&ctx)) +if (scrub_excessive_errors (&ctx))str_info (&ctx, ctx.mntpoint,_ ("Too many errors; aborting." ));if (debug_tweak_on ("XFS_SCRUB_FORCE_ERROR" ))
Signature · 1 line
2.26.2
PATCH 2/2 xfsprogs: remove the libxfs_* API redirections
For historical reasons xfsprogs tries to renamed xfs_* symbols used by tools (but not those used inside libxfs) to libxfs_. Remove this indirection to make it clear what function is being called, and to avoid having to keep the renaming header uptodate.
--- copy/xfs_copy.c | 10 +- db/agfl.c | 2 +- db/attrset.c | 28 +-- db/bmap.c | 4 +- db/bmroot.c | 4 +- db/btdump.c | 18 +- db/btheight.c | 14 +- db/check.c | 40 ++-- db/dir2.c | 10 +- db/dir2sf.c | 8 +- db/frag.c | 2 +- db/freesp.c | 6 +- db/fsmap.c | 16 +- db/hash.c | 2 +- db/info.c | 12 +- db/init.c | 8 +- db/inode.c | 4 +- db/io.c | 12 +- db/logformat.c | 2 +- db/metadump.c | 34 ++-- db/sb.c | 10 +- include/cache.h | 2 +- include/libxfs.h | 7 +- include/xfs_inode.h | 8 +- include/xfs_trans.h | 48 ++--- io/open.c | 2 +- libxfs/Makefile | 1 - libxfs/cache.c | 2 +- libxfs/init.c | 16 +- libxfs/libxfs_api_defs.h | 191 ------------------ libxfs/libxfs_io.h | 30 +-- libxfs/libxfs_priv.h | 7 +- libxfs/rdwr.c | 66 +++---- libxfs/trans.c | 78 ++++---- libxfs/util.c | 8 +- libxlog/xfs_log_recover.c | 28 +-- logprint/log_misc.c | 4 +- logprint/log_print_all.c | 2 +- logprint/logprint.c | 2 +- mdrestore/xfs_mdrestore.c | 4 +- mkfs/proto.c | 112 +++++------ mkfs/xfs_mkfs.c | 86 ++++---- repair/agheader.c | 10 +- repair/attr_repair.c | 46 +++-- repair/da_util.c | 36 ++-- repair/dino_chunks.c | 20 +- repair/dinode.c | 40 ++-- repair/dir2.c | 88 ++++----- repair/phase3.c | 6 +- repair/phase4.c | 12 +- repair/phase5.c | 128 ++++++------ repair/phase6.c | 366 +++++++++++++++++------------------ repair/phase7.c | 10 +- repair/prefetch.c | 18 +- repair/rmap.c | 72 +++---- repair/rt.c | 10 +- repair/sb.c | 10 +- repair/scan.c | 46 ++--- repair/xfs_repair.c | 18 +- tools/find-api-violations.sh | 38 +--- 60 files changed, 847 insertions(+), 1077 deletions(-) delete mode 100644 libxfs/libxfs_api_defs.h
copy/xfs_copy.c +5 -5
@@ -711,7 +711,7 @@ main(int argc, char **argv)/* We don't yet know the sector size, so read maximal size */ libxfs_buftarg_init (&mbuf, xargs.ddev, xargs.logdev, xargs.rtdev); - error = -libxfs_buf_read_uncached (mbuf.m_ddev_targp,XFS_SB_DADDR , + error = -xfs_buf_read_uncached (mbuf.m_ddev_targp,XFS_SB_DADDR ,1 << (XFS_MAX_SECTORSIZE_LOG -BBSHIFT ),0 , &sbp,NULL );if (error) { do_log(_("%s: couldn't read superblock, error=%d\n"),
@@ -720,12 +720,12 @@ main(int argc, char **argv) } sb = &mbuf.m_sb; -libxfs_sb_from_disk (sb, sbp->b_addr); +xfs_sb_from_disk (sb, sbp->b_addr);/* Do it again, now with proper length and verifier */ -libxfs_buf_relse (sbp); +xfs_buf_relse (sbp); - error = -libxfs_buf_read (mbuf.m_ddev_targp,XFS_SB_DADDR , + error = -xfs_buf_read (mbuf.m_ddev_targp,XFS_SB_DADDR ,1 << (sb->sb_sectlog -BBSHIFT ),0 , &sbp, &xfs_sb_buf_ops);if (error) {
@@ -733,7 +733,7 @@ main(int argc, char **argv) progname, error);exit (1 ); } -libxfs_buf_relse (sbp); +xfs_buf_relse (sbp); mp =libxfs_mount (&mbuf, sb, xargs.ddev, xargs.logdev, xargs.rtdev,0 );if (mp ==NULL ) {
db/agfl.c +1 -1
@@ -58,7 +58,7 @@ agfl_bno_size( void *obj, int startoff) { -return libxfs_agfl_size (mp); +return xfs_agfl_size (mp); } static void
db/attrset.c +14 -14
@@ -84,16 +84,16 @@ attr_set_f(switch (c) {/* namespaces */ case 'r' : - args.attr_filter |=LIBXFS_ATTR_ROOT ; - args.attr_filter &= ~LIBXFS_ATTR_SECURE ; + args.attr_filter |=XFS_ATTR_ROOT ; + args.attr_filter &= ~XFS_ATTR_SECURE ;break ;case 'u' : - args.attr_filter &= ~(LIBXFS_ATTR_ROOT | -LIBXFS_ATTR_SECURE ); + args.attr_filter &= ~(XFS_ATTR_ROOT | +XFS_ATTR_SECURE );break ;case 's' : - args.attr_filter |=LIBXFS_ATTR_SECURE ; - args.attr_filter &= ~LIBXFS_ATTR_ROOT ; + args.attr_filter |=XFS_ATTR_SECURE ; + args.attr_filter &= ~XFS_ATTR_ROOT ;break ;/* modifiers */
@@ -160,7 +160,7 @@ attr_set_f( goto out; } -if (libxfs_attr_set (&args)) { +if (xfs_attr_set (&args)) {dbprintf (_ ("failed to set attr %s on inode %llu\n" ), args.name, (unsigned long long )iocur_top->ino); goto out;
@@ -199,16 +199,16 @@ attr_remove_f(switch (c) {/* namespaces */ case 'r' : - args.attr_filter |=LIBXFS_ATTR_ROOT ; - args.attr_filter &= ~LIBXFS_ATTR_SECURE ; + args.attr_filter |=XFS_ATTR_ROOT ; + args.attr_filter &= ~XFS_ATTR_SECURE ;break ;case 'u' : - args.attr_filter &= ~(LIBXFS_ATTR_ROOT | -LIBXFS_ATTR_SECURE ); + args.attr_filter &= ~(XFS_ATTR_ROOT | +XFS_ATTR_SECURE );break ;case 's' : - args.attr_filter |=LIBXFS_ATTR_SECURE ; - args.attr_filter &= ~LIBXFS_ATTR_ROOT ; + args.attr_filter |=XFS_ATTR_SECURE ; + args.attr_filter &= ~XFS_ATTR_ROOT ;break ;case 'n' :
@@ -245,7 +245,7 @@ attr_remove_f( goto out; } -if (libxfs_attr_set (&args)) { +if (xfs_attr_set (&args)) {dbprintf (_ ("failed to remove attr %s from inode %llu\n" ), (unsigned char *)args.name, (unsigned long long )iocur_top->ino);
db/bmap.c +2 -2
@@ -78,7 +78,7 @@ bmap(push_cur (); rblock = (xfs_bmdr_block_t *)XFS_DFORK_PTR (dip, whichfork); fsize =XFS_DFORK_SIZE (dip, mp, whichfork); - pp =XFS_BMDR_PTR_ADDR (rblock,1 ,libxfs_bmdr_maxrecs (fsize,0 )); + 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,be16_to_cpu (rblock->bb_numrecs));
@@ -89,7 +89,7 @@ bmap(if (be16_to_cpu (block->bb_level) ==0 )break ; pp =XFS_BMBT_PTR_ADDR (mp, block,1 , -libxfs_bmbt_maxrecs (mp, mp->m_sb.sb_blocksize,0 )); +xfs_bmbt_maxrecs (mp, mp->m_sb.sb_blocksize,0 )); kp =XFS_BMBT_KEY_ADDR (mp, block,1 ); bno =select_child (curoffset, kp, pp,be16_to_cpu (block->bb_numrecs));
db/bmroot.c +2 -2
@@ -128,7 +128,7 @@ bmroota_ptr_offset(ASSERT (XFS_DFORK_Q (dip) && (char *)block ==XFS_DFORK_APTR (dip));ASSERT (be16_to_cpu (block->bb_level) >0 ); pp =XFS_BMDR_PTR_ADDR (block, idx, -libxfs_bmdr_maxrecs (XFS_DFORK_ASIZE (dip, mp),0 )); +xfs_bmdr_maxrecs (XFS_DFORK_ASIZE (dip, mp),0 ));return bitize ((int )((char *)pp - (char *)block)); }
@@ -223,7 +223,7 @@ bmrootd_ptr_offset( block = (xfs_bmdr_block_t *)((char *)obj +byteize (startoff));ASSERT (be16_to_cpu (block->bb_level) >0 ); pp =XFS_BMDR_PTR_ADDR (block, idx, -libxfs_bmdr_maxrecs (XFS_DFORK_DSIZE (dip, mp),0 )); +xfs_bmdr_maxrecs (XFS_DFORK_DSIZE (dip, mp),0 ));return bitize ((int )((char *)pp - (char *)block)); }
db/btdump.c +9 -9
@@ -212,10 +212,10 @@ dir_has_rightsib(struct xfs_da3_icnode_hdr nhdr;if (level >0 ) { -libxfs_da3_node_hdr_from_disk (mp, &nhdr, block); +xfs_da3_node_hdr_from_disk (mp, &nhdr, block);return nhdr.forw !=0 ; } -libxfs_dir2_leaf_hdr_from_disk (mp, &lhdr, block); +xfs_dir2_leaf_hdr_from_disk (mp, &lhdr, block);return lhdr.forw !=0 ; }
@@ -229,10 +229,10 @@ dir_level(switch (((struct xfs_da_intnode *)block)->hdr.info.magic) {case cpu_to_be16 (XFS_DIR2_LEAF1_MAGIC ):case cpu_to_be16 (XFS_DIR2_LEAFN_MAGIC ): -libxfs_dir2_leaf_hdr_from_disk (mp, &lhdr, block); +xfs_dir2_leaf_hdr_from_disk (mp, &lhdr, block);return 0 ;case cpu_to_be16 (XFS_DA_NODE_MAGIC ): -libxfs_da3_node_hdr_from_disk (mp, &nhdr, block); +xfs_da3_node_hdr_from_disk (mp, &nhdr, block);return nhdr.level;default :return -1 ;
@@ -249,10 +249,10 @@ dir3_level(switch (((struct xfs_da_intnode *)block)->hdr.info.magic) {case cpu_to_be16 (XFS_DIR3_LEAF1_MAGIC ):case cpu_to_be16 (XFS_DIR3_LEAFN_MAGIC ): -libxfs_dir2_leaf_hdr_from_disk (mp, &lhdr, block); +xfs_dir2_leaf_hdr_from_disk (mp, &lhdr, block);return 0 ;case cpu_to_be16 (XFS_DA3_NODE_MAGIC ): -libxfs_da3_node_hdr_from_disk (mp, &nhdr, block); +xfs_da3_node_hdr_from_disk (mp, &nhdr, block);return nhdr.level;default :return -1 ;
@@ -268,7 +268,7 @@ attr_has_rightsib(struct xfs_da3_icnode_hdr nhdr;if (level >0 ) { -libxfs_da3_node_hdr_from_disk (mp, &nhdr, block); +xfs_da3_node_hdr_from_disk (mp, &nhdr, block);return nhdr.forw !=0 ; }xfs_attr3_leaf_hdr_to_disk (mp->m_attr_geo, &lhdr, block);
@@ -287,7 +287,7 @@ attr_level(xfs_attr3_leaf_hdr_to_disk (mp->m_attr_geo, &lhdr, block);return 0 ;case cpu_to_be16 (XFS_DA_NODE_MAGIC ): -libxfs_da3_node_hdr_from_disk (mp, &nhdr, block); +xfs_da3_node_hdr_from_disk (mp, &nhdr, block);return nhdr.level;default :return -1 ;
@@ -306,7 +306,7 @@ attr3_level(xfs_attr3_leaf_hdr_to_disk (mp->m_attr_geo, &lhdr, block);return 0 ;case cpu_to_be16 (XFS_DA3_NODE_MAGIC ): -libxfs_da3_node_hdr_from_disk (mp, &nhdr, block); +xfs_da3_node_hdr_from_disk (mp, &nhdr, block);return nhdr.level;default :return -1 ;
db/btheight.c +7 -7
@@ -14,12 +14,12 @@static int refc_maxrecs (struct xfs_mount *mp,int blocklen,int leaf) { -return libxfs_refcountbt_maxrecs (blocklen, leaf !=0 ); +return xfs_refcountbt_maxrecs (blocklen, leaf !=0 ); }static int rmap_maxrecs (struct xfs_mount *mp,int blocklen,int leaf) { -return libxfs_rmapbt_maxrecs (blocklen, leaf); +return xfs_rmapbt_maxrecs (blocklen, leaf); }struct btmap {
@@ -27,11 +27,11 @@ struct btmap {int (*maxrecs)(struct xfs_mount *mp,int blocklen,int leaf); } maps[] = { - {"bnobt", libxfs_allocbt_maxrecs}, - {"cntbt", libxfs_allocbt_maxrecs}, - {"inobt", libxfs_inobt_maxrecs}, - {"finobt", libxfs_inobt_maxrecs}, - {"bmapbt", libxfs_bmbt_maxrecs}, + {"bnobt", xfs_allocbt_maxrecs}, + {"cntbt", xfs_allocbt_maxrecs}, + {"inobt", xfs_inobt_maxrecs}, + {"finobt", xfs_inobt_maxrecs}, + {"bmapbt", xfs_bmbt_maxrecs}, {"refcountbt", refc_maxrecs}, {"rmapbt", rmap_maxrecs}, };
db/check.c +20 -20
@@ -2269,7 +2269,7 @@ process_btinode(return ; }if (be16_to_cpu (dib->bb_numrecs) > -libxfs_bmdr_maxrecs (XFS_DFORK_SIZE (dip, mp, whichfork), +xfs_bmdr_maxrecs (XFS_DFORK_SIZE (dip, mp, whichfork),be16_to_cpu (dib->bb_level) ==0 )) {if (!sflag || id->ilist) dbprintf(_("numrecs for ino %lld %s fork bmap root too "
@@ -2287,7 +2287,7 @@ process_btinode( *nex +=be16_to_cpu (dib->bb_numrecs);return ; }else { - pp =XFS_BMDR_PTR_ADDR (dib,1 ,libxfs_bmdr_maxrecs ( + 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(get_unaligned_be64(&pp[i]),
@@ -2358,7 +2358,7 @@ process_data_dir_v2(return NULLFSINO ; } db =xfs_dir2_da_to_db (mp->m_dir_geo, dabno); - bf =libxfs_dir2_data_bestfree_p (mp, data); + bf =xfs_dir2_data_bestfree_p (mp, data); ptr = (char *)data + mp->m_dir_geo->data_entry_offset;if (be32_to_cpu (block->magic) ==XFS_DIR2_BLOCK_MAGIC ||be32_to_cpu (block->magic) ==XFS_DIR3_BLOCK_MAGIC ) {
@@ -2444,7 +2444,7 @@ process_data_dir_v2( (int)((char *)dep - (char *)data)); error++; } - tagp =libxfs_dir2_data_entry_tag_p (mp, dep); + tagp =xfs_dir2_data_entry_tag_p (mp, dep);if ((char *)tagp >= endptr) {if (!sflag || v) dbprintf(_("dir %lld block %d bad entry at %d\n"),
@@ -2458,8 +2458,8 @@ process_data_dir_v2( (char *)dep - (char *)data); xname.name = dep->name; xname.len = dep->namelen; -dir_hash_add (libxfs_dir2_hashname (mp, &xname), addr); - ptr +=libxfs_dir2_data_entsize (mp, dep->namelen); +dir_hash_add (xfs_dir2_hashname (mp, &xname), addr); + ptr +=xfs_dir2_data_entsize (mp, dep->namelen); count++; lastfree =0 ; lino =be64_to_cpu (dep->inumber);
@@ -2584,7 +2584,7 @@ process_data_dir_v2_freefind(xfs_dir2_data_aoff_t off; off = (xfs_dir2_data_aoff_t)((char *)dup - (char *)data); - bf =libxfs_dir2_data_bestfree_p (mp, data); + bf =xfs_dir2_data_bestfree_p (mp, data);if (be16_to_cpu (dup->length) <be16_to_cpu (bf[XFS_DIR2_DATA_FD_COUNT -1 ].length))return NULL ;
@@ -2752,7 +2752,7 @@ process_inode(/* xfs_inode_from_disk expects to have an mp to work with */ xino.i_mount = mp; -libxfs_inode_from_disk (&xino, dip); +xfs_inode_from_disk (&xino, dip); ino =XFS_AGINO_TO_INO (mp,be32_to_cpu (agf->agf_seqno), agino);if (!isfree) {
@@ -2768,7 +2768,7 @@ process_inode( error++;return ; } -if (!libxfs_dinode_good_version (&mp->m_sb, dip->di_version)) { +if (!xfs_dinode_good_version (&mp->m_sb, dip->di_version)) {if (isfree || v)dbprintf (_ ("bad version number %#x for inode %lld\n" ), dip->di_version, ino);
@@ -3306,7 +3306,7 @@ process_leaf_node_dir_v2_int(struct xfs_dir3_icleaf_hdr leafhdr; leaf = iocur_top->data; -libxfs_dir2_leaf_hdr_from_disk (mp, &leafhdr, leaf); +xfs_dir2_leaf_hdr_from_disk (mp, &leafhdr, leaf);switch (be16_to_cpu (leaf->hdr.info.magic)) {case XFS_DIR3_LEAF1_MAGIC :
@@ -3364,7 +3364,7 @@ process_leaf_node_dir_v2_int(case XFS_DA_NODE_MAGIC :case XFS_DA3_NODE_MAGIC : node = iocur_top->data; -libxfs_da3_node_hdr_from_disk (mp, &nodehdr, node); +xfs_da3_node_hdr_from_disk (mp, &nodehdr, node);if (nodehdr.level <1 || nodehdr.level >XFS_DA_NODE_MAXDEPTH ) {if (!sflag || v) dbprintf(_("bad node block level %d for dir ino "
@@ -3671,7 +3671,7 @@ process_sf_dir_v2( offset = mp->m_dir_geo->data_first_offset;for (i = sf->count -1 , i8 =0 ; i >=0 ; i--) {if ((intptr_t )sfe + -libxfs_dir2_sf_entsize (mp, sf, sfe->namelen) - +xfs_dir2_sf_entsize (mp, sf, sfe->namelen) - (intptr_t )sf >be64_to_cpu (dip->di_size)) {if (!sflag) dbprintf(_("dir %llu bad size in entry at %d\n"),
@@ -3680,7 +3680,7 @@ process_sf_dir_v2( error++;break ; } - lino =libxfs_dir2_sf_get_ino (mp, sf, sfe); + lino =xfs_dir2_sf_get_ino (mp, sf, sfe);if (lino >XFS_DIR2_MAX_SHORT_INUM ) i8++; cid =find_inode (lino,1 );
@@ -3710,8 +3710,8 @@ process_sf_dir_v2( } offset =xfs_dir2_sf_get_offset (sfe) + -libxfs_dir2_sf_entsize (mp, sf, sfe->namelen); - sfe =libxfs_dir2_sf_nextentry (mp, sf, sfe); +xfs_dir2_sf_entsize (mp, sf, sfe->namelen); + sfe =xfs_dir2_sf_nextentry (mp, sf, sfe); }if (i <0 && (intptr_t )sfe - (intptr_t )sf !=be64_to_cpu (dip->di_size)) {
@@ -3727,7 +3727,7 @@ process_sf_dir_v2(dbprintf (_ ("dir %llu offsets too high\n" ), id->ino); error++; } - lino =libxfs_dir2_sf_get_parent_ino (sf); + lino =xfs_dir2_sf_get_parent_ino (sf);if (lino >XFS_DIR2_MAX_SHORT_INUM ) i8++; cid =find_inode (lino,1 );
@@ -3897,7 +3897,7 @@ scan_ag( goto pop1_out; } -libxfs_sb_from_disk (sb, iocur_top->data); +xfs_sb_from_disk (sb, iocur_top->data);if (sb->sb_magicnum !=XFS_SB_MAGIC ) {if (!sflag)
@@ -4110,8 +4110,8 @@ scan_freelist( }/* verify agf values before proceeding */ -if (be32_to_cpu (agf->agf_flfirst) >=libxfs_agfl_size (mp) || -be32_to_cpu (agf->agf_fllast) >=libxfs_agfl_size (mp)) { +if (be32_to_cpu (agf->agf_flfirst) >=xfs_agfl_size (mp) || +be32_to_cpu (agf->agf_fllast) >=xfs_agfl_size (mp)) {dbprintf (_ ("agf %d freelist blocks bad, skipping " "freelist scan\n" ), seqno);pop_cur ();
@@ -4121,7 +4121,7 @@ scan_freelist(/* open coded xfs_buf_to_agfl_bno */ state.count =0 ; state.agno = seqno; -libxfs_agfl_walk (mp, agf, iocur_top->bp, scan_agfl, &state); +xfs_agfl_walk (mp, agf, iocur_top->bp, scan_agfl, &state);if (state.count !=be32_to_cpu (agf->agf_flcount)) {if (!sflag) dbprintf(_("freeblk count %u != flcount %u in ag %u\n"),
db/dir2.c +5 -5
@@ -211,7 +211,7 @@ __dir2_data_entries_count( ptr +=be16_to_cpu (dup->length); else { dep = (xfs_dir2_data_entry_t *)ptr; - ptr +=libxfs_dir2_data_entsize (mp, dep->namelen); + ptr +=xfs_dir2_data_entsize (mp, dep->namelen); } }return i;
@@ -235,7 +235,7 @@ __dir2_data_entry_offset( ptr +=be16_to_cpu (dup->length); else { dep = (xfs_dir2_data_entry_t *)ptr; - ptr +=libxfs_dir2_data_entsize (mp, dep->namelen); + ptr +=xfs_dir2_data_entsize (mp, dep->namelen); } }return ptr;
@@ -486,7 +486,7 @@ dir2_data_union_tag_count( end = (char *)&dep->namelen +sizeof (dep->namelen);if (end > (char *)obj + mp->m_dir_geo->blksize)return 0 ; - tagp =libxfs_dir2_data_entry_tag_p (mp, dep); + tagp =xfs_dir2_data_entry_tag_p (mp, dep); } end = (char *)tagp +sizeof (*tagp);return end <= (char *)obj + mp->m_dir_geo->blksize;
@@ -508,7 +508,7 @@ dir2_data_union_tag_offset(return bitize ((int )((char *)xfs_dir2_data_unused_tag_p (dup) - (char *)dup)); dep = (xfs_dir2_data_entry_t *)dup; -return bitize ((int )((char *)libxfs_dir2_data_entry_tag_p (mp, dep) - +return bitize ((int )((char *)xfs_dir2_data_entry_tag_p (mp, dep) - (char *)dep)); }
@@ -585,7 +585,7 @@ dir2_data_union_size(return bitize (be16_to_cpu (dup->length)); else { dep = (xfs_dir2_data_entry_t *)dup; -return bitize (libxfs_dir2_data_entsize (mp, dep->namelen)); +return bitize (xfs_dir2_data_entsize (mp, dep->namelen)); } }
db/dir2sf.c +4 -4
@@ -167,8 +167,8 @@ dir2_sf_entry_size( sf = (struct xfs_dir2_sf_hdr *)((char *)obj +byteize (startoff)); e =xfs_dir2_sf_firstentry (sf);for (i =0 ; i < idx; i++) - e =libxfs_dir2_sf_nextentry (mp, sf, e); -return bitize ((int )libxfs_dir2_sf_entsize (mp, sf, e->namelen)); + e =xfs_dir2_sf_nextentry (mp, sf, e); +return bitize ((int )xfs_dir2_sf_entsize (mp, sf, e->namelen)); }/*ARGSUSED*/
@@ -212,7 +212,7 @@ dir2_sf_list_offset( sf = (struct xfs_dir2_sf_hdr *)((char *)obj +byteize (startoff)); e =xfs_dir2_sf_firstentry (sf);for (i =0 ; i < idx; i++) - e =libxfs_dir2_sf_nextentry (mp, sf, e); + e =xfs_dir2_sf_nextentry (mp, sf, e);return bitize ((int )((char *)e - (char *)sf)); }
@@ -232,7 +232,7 @@ dir2sf_size( sf = (struct xfs_dir2_sf_hdr *)((char *)obj +byteize (startoff)); e =xfs_dir2_sf_firstentry (sf);for (i =0 ; i < sf->count; i++) - e =libxfs_dir2_sf_nextentry (mp, sf, e); + e =xfs_dir2_sf_nextentry (mp, sf, e);return bitize ((int )((char *)e - (char *)sf)); }
db/frag.c +1 -1
@@ -248,7 +248,7 @@ process_btinode(return ; } pp =XFS_BMDR_PTR_ADDR (dib,1 , -libxfs_bmdr_maxrecs (XFS_DFORK_SIZE (dip, mp, whichfork),0 )); +xfs_bmdr_maxrecs (XFS_DFORK_SIZE (dip, mp, whichfork),0 ));for (i =0 ; i <be16_to_cpu (dib->bb_numrecs); i++) scan_lbtree(get_unaligned_be64(&pp[i]), be16_to_cpu(dib->bb_level), scanfunc_bmap, extmapp,
db/freesp.c +3 -3
@@ -242,15 +242,15 @@ scan_freelist( XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);/* verify agf values before proceeding */ -if (be32_to_cpu (agf->agf_flfirst) >=libxfs_agfl_size (mp) || -be32_to_cpu (agf->agf_fllast) >=libxfs_agfl_size (mp)) { +if (be32_to_cpu (agf->agf_flfirst) >=xfs_agfl_size (mp) || +be32_to_cpu (agf->agf_fllast) >=xfs_agfl_size (mp)) {dbprintf (_ ("agf %d freelist blocks bad, skipping " "freelist scan\n" ), seqno);pop_cur ();return ; } -libxfs_agfl_walk (mp, agf, iocur_top->bp, scan_agfl, &seqno); +xfs_agfl_walk (mp, agf, iocur_top->bp, scan_agfl, &seqno);pop_cur (); }
db/fsmap.c +8 -8
@@ -67,32 +67,32 @@ fsmap(if (agno == end_ag) high.rm_startblock =XFS_FSB_TO_AGBNO (mp, end_fsb); - error = -libxfs_alloc_read_agf (mp,NULL , agno,0 , &agbp); + error = -xfs_alloc_read_agf (mp,NULL , agno,0 , &agbp);if (error) {dbprintf (_ ("Error %d while reading AGF.\n" ), error);return ; } - bt_cur =libxfs_rmapbt_init_cursor (mp,NULL , agbp, agno); + bt_cur =xfs_rmapbt_init_cursor (mp,NULL , agbp, agno);if (!bt_cur) { -libxfs_buf_relse (agbp); +xfs_buf_relse (agbp);dbprintf (_ ("Not enough memory.\n" ));return ; } info.agno = agno; - error = -libxfs_rmap_query_range (bt_cur, &low, &high, + error = -xfs_rmap_query_range (bt_cur, &low, &high, fsmap_fn, &info);if (error) { -libxfs_btree_del_cursor (bt_cur,XFS_BTREE_ERROR ); -libxfs_buf_relse (agbp); +xfs_btree_del_cursor (bt_cur,XFS_BTREE_ERROR ); +xfs_buf_relse (agbp);dbprintf (_ ("Error %d while querying fsmap btree.\n" ), error);return ; } -libxfs_btree_del_cursor (bt_cur,XFS_BTREE_NOERROR ); -libxfs_buf_relse (agbp); +xfs_btree_del_cursor (bt_cur,XFS_BTREE_NOERROR ); +xfs_buf_relse (agbp);if (agno == start_ag) low.rm_startblock =0 ;
db/hash.c +1 -1
@@ -41,7 +41,7 @@ hash_f( {xfs_dahash_t hashval; - hashval =libxfs_da_hashname ((unsigned char *)argv[1 ], (int )strlen (argv[1 ])); + hashval =xfs_da_hashname ((unsigned char *)argv[1 ], (int )strlen (argv[1 ]));dbprintf ("0x%x\n" , hashval);return 0 ; }
db/info.c +6 -6
@@ -29,7 +29,7 @@ info_f( {struct xfs_fsop_geom geo; -libxfs_fs_geometry (&mp->m_sb, &geo,XFS_FS_GEOM_MAX_STRUCT_VER ); +xfs_fs_geometry (&mp->m_sb, &geo,XFS_FS_GEOM_MAX_STRUCT_VER );xfs_report_geom (&geo, fsdevice, x.logname, x.rtname);return 0 ; }
@@ -72,24 +72,24 @@ print_agresv_info(xfs_extlen_t length =0 ;int error; - error = -libxfs_refcountbt_calc_reserves (mp,NULL , agno, &ask, &used); + error = -xfs_refcountbt_calc_reserves (mp,NULL , agno, &ask, &used);if (error)xfrog_perror (error,"refcountbt" ); - error = -libxfs_finobt_calc_reserves (mp,NULL , agno, &ask, &used); + error = -xfs_finobt_calc_reserves (mp,NULL , agno, &ask, &used);if (error)xfrog_perror (error,"finobt" ); - error = -libxfs_rmapbt_calc_reserves (mp,NULL , agno, &ask, &used); + error = -xfs_rmapbt_calc_reserves (mp,NULL , agno, &ask, &used);if (error)xfrog_perror (error,"rmapbt" ); - error = -libxfs_read_agf (mp,NULL , agno,0 , &bp); + error = -xfs_read_agf (mp,NULL , agno,0 , &bp);if (error)xfrog_perror (error,"AGF" ); agf = bp->b_addr; length =be32_to_cpu (agf->agf_length); free =be32_to_cpu (agf->agf_freeblks) +be32_to_cpu (agf->agf_flcount); -libxfs_buf_relse (bp); +xfs_buf_relse (bp);printf ("AG %d: length: %u free: %u reserved: %u used: %u" , agno, length, free, ask, used);
db/init.c +4 -4
@@ -110,7 +110,7 @@ init(*/ memset (&xmount,0 ,sizeof (struct xfs_mount ));libxfs_buftarg_init (&xmount, x.ddev, x.logdev, x.rtdev); - error = -libxfs_buf_read_uncached (xmount.m_ddev_targp,XFS_SB_DADDR , + error = -xfs_buf_read_uncached (xmount.m_ddev_targp,XFS_SB_DADDR ,1 << (XFS_MAX_SECTORSIZE_LOG -BBSHIFT ),0 , &bp,NULL );if (error) { fprintf(stderr, _("%s: %s is invalid (cannot read first 512 "
@@ -119,8 +119,8 @@ init( }/* copy SB from buffer to in-core, converting architecture as we go */ -libxfs_sb_from_disk (&xmount.m_sb, bp->b_addr); -libxfs_buf_relse (bp); +xfs_sb_from_disk (&xmount.m_sb, bp->b_addr); +xfs_buf_relse (bp); sbp = &xmount.m_sb;if (sbp->sb_magicnum !=XFS_SB_MAGIC ) {
@@ -153,7 +153,7 @@ init(*/ if (sbp->sb_rootino !=NULLFSINO &&xfs_sb_version_haslazysbcount (&mp->m_sb)) { -int error = -libxfs_initialize_perag_data (mp, sbp->sb_agcount); +int error = -xfs_initialize_perag_data (mp, sbp->sb_agcount);if (error) { fprintf(stderr, _("%s: cannot init perag data (%d). Continuing anyway.\n"),
db/inode.c +2 -2
@@ -688,7 +688,7 @@ set_cur_inode( iocur_top->dirino = ino;if (xfs_sb_version_hascrc (&mp->m_sb)) { - iocur_top->ino_crc_ok =libxfs_verify_cksum ((char *)dip, + iocur_top->ino_crc_ok =xfs_verify_cksum ((char *)dip, mp->m_sb.sb_inodesize,XFS_DINODE_CRC_OFF );if (!iocur_top->ino_crc_ok)
@@ -708,6 +708,6 @@ xfs_inode_set_crc(ASSERT (iocur_top->ino_buf);ASSERT (iocur_top->bp == bp); -libxfs_dinode_calc_crc (mp, iocur_top->data); +xfs_dinode_calc_crc (mp, iocur_top->data); iocur_top->ino_crc_ok =1 ; }
db/io.c +6 -6
@@ -96,7 +96,7 @@ pop_cur(void)return ; }if (iocur_top->bp) { -libxfs_buf_relse (iocur_top->bp); +xfs_buf_relse (iocur_top->bp); iocur_top->bp =NULL ; }if (iocur_top->bbmap) {
@@ -426,7 +426,7 @@ write_cur_buf(void) {int ret; - ret = -libxfs_bwrite (iocur_top->bp); + ret = -xfs_bwrite (iocur_top->bp);if (ret !=0 )dbprintf (_ ("write error: %s\n" ),strerror (ret));
@@ -442,7 +442,7 @@ write_cur_bbs(void) {int ret; - ret = -libxfs_bwrite (iocur_top->bp); + ret = -xfs_bwrite (iocur_top->bp);if (ret !=0 )dbprintf (_ ("write error: %s\n" ),strerror (ret));
@@ -496,7 +496,7 @@ write_cur(void)/* If we didn't write the crc automatically, re-check inode validity */ if (xfs_sb_version_hascrc (&mp->m_sb) && skip_crc && iocur_top->ino_buf) { - iocur_top->ino_crc_ok =libxfs_verify_cksum (iocur_top->data, + iocur_top->ino_crc_ok =xfs_verify_cksum (iocur_top->data, mp->m_sb.sb_inodesize,XFS_DINODE_CRC_OFF ); }
@@ -543,11 +543,11 @@ set_cur(if (!iocur_top->bbmap)return ;memcpy (iocur_top->bbmap, bbmap,sizeof (struct bbmap )); - error = -libxfs_buf_read_map (mp->m_ddev_targp, bbmap->b, + error = -xfs_buf_read_map (mp->m_ddev_targp, bbmap->b, bbmap->nmaps,LIBXFS_READBUF_SALVAGE , &bp, ops); }else { - error = -libxfs_buf_read (mp->m_ddev_targp, blknum, len, + error = -xfs_buf_read (mp->m_ddev_targp, blknum, len,LIBXFS_READBUF_SALVAGE , &bp, ops); iocur_top->bbmap =NULL ; }
db/logformat.c +1 -1
@@ -160,7 +160,7 @@ logres_f( end_res = (struct xfs_trans_res *)(M_RES (mp) +1 );for (i =0 ; res < end_res; i++, res++)print_logres (i, res); -libxfs_log_get_max_trans_res (mp, &resv); +xfs_log_get_max_trans_res (mp, &resv);print_logres (-1 , &resv);return 0 ;
db/metadump.c +17 -17
@@ -882,7 +882,7 @@ obfuscate_name( *first ^=0x10 ;ASSERT (!is_invalid_char (*first)); } -ASSERT (libxfs_da_hashname (name, name_len) == hash); +ASSERT (xfs_da_hashname (name, name_len) == hash); }/*
@@ -1206,7 +1206,7 @@ generate_obfuscated_name(/* Obfuscate the name (if possible) */ - hash =libxfs_da_hashname (name, namelen); + hash =xfs_da_hashname (name, namelen);obfuscate_name (hash, namelen, name);/*
@@ -1269,7 +1269,7 @@ process_sf_dir( namelen = ino_dir_size - ((char *)&sfep->name[0 ] - (char *)sfp); }else if ((char *)sfep - (char *)sfp + -libxfs_dir2_sf_entsize (mp, sfp, sfep->namelen) > +xfs_dir2_sf_entsize (mp, sfp, sfep->namelen) > ino_dir_size) {if (show_warnings) print_warning("entry length in dir inode %llu "
@@ -1282,11 +1282,11 @@ process_sf_dir(if (obfuscate)generate_obfuscated_name ( -libxfs_dir2_sf_get_ino (mp, sfp, sfep), +xfs_dir2_sf_get_ino (mp, sfp, sfep), namelen, &sfep->name[0 ]); sfep = (xfs_dir2_sf_entry_t *)((char *)sfep + -libxfs_dir2_sf_entsize (mp, sfp, namelen)); +xfs_dir2_sf_entsize (mp, sfp, namelen)); }/* zero stale data in rest of space in data fork, if any */
@@ -1319,7 +1319,7 @@ obfuscate_path_components(if (!slash) {/* last (or single) component */ namelen =strnlen ((char *)comp, len); - hash =libxfs_da_hashname (comp, namelen); + hash =xfs_da_hashname (comp, namelen);obfuscate_name (hash, namelen, comp);break ; }
@@ -1330,7 +1330,7 @@ obfuscate_path_components( len--;continue ; } - hash =libxfs_da_hashname (comp, namelen); + hash =xfs_da_hashname (comp, namelen);obfuscate_name (hash, namelen, comp); comp += namelen +1 ; len -= namelen +1 ;
@@ -1433,7 +1433,7 @@ process_dir_free_block(return ; free = (struct xfs_dir2_free *)block; -libxfs_dir2_free_hdr_from_disk (mp, &freehdr, free); +xfs_dir2_free_hdr_from_disk (mp, &freehdr, free);switch (freehdr.magic) {case XFS_DIR2_FREE_MAGIC :
@@ -1471,7 +1471,7 @@ process_dir_leaf_block(/* Yes, this works for dir2 & dir3. Difference is padding. */ leaf = (struct xfs_dir2_leaf *)block; -libxfs_dir2_leaf_hdr_from_disk (mp, &leafhdr, leaf); +xfs_dir2_leaf_hdr_from_disk (mp, &leafhdr, leaf);switch (leafhdr.magic) {case XFS_DIR2_LEAF1_MAGIC :
@@ -1602,7 +1602,7 @@ process_dir_data_block( } dep = (xfs_dir2_data_entry_t *)ptr; - length =libxfs_dir2_data_entsize (mp, dep->namelen); + length =xfs_dir2_data_entsize (mp, dep->namelen);if (dir_offset + length > end_of_data || ptr + length > endptr) {
@@ -1612,7 +1612,7 @@ process_dir_data_block( (long long)cur_ino);return ; } -if (be16_to_cpu (*libxfs_dir2_data_entry_tag_p (mp, dep)) != +if (be16_to_cpu (*xfs_dir2_data_entry_tag_p (mp, dep)) != dir_offset)return ;
@@ -1625,7 +1625,7 @@ process_dir_data_block(if (zero_stale_data) {/* 1 byte for ftype; don't bother with conditional */ int zlen = - (char *)libxfs_dir2_data_entry_tag_p (mp, dep) - + (char *)xfs_dir2_data_entry_tag_p (mp, dep) - (char *)&dep->name[dep->namelen] -1 ;if (zlen >0 ) {memset (&dep->name[dep->namelen] +1 ,0 , zlen);
@@ -1877,7 +1877,7 @@ process_single_fsb_objects(struct xfs_da3_icnode_hdr hdr;int used; -libxfs_da3_node_hdr_from_disk (mp, &hdr, node); +xfs_da3_node_hdr_from_disk (mp, &hdr, node);switch (btype) {case TYP_DIR2 : used = mp->m_dir_geo->node_hdr_size;
@@ -2225,7 +2225,7 @@ process_btinode( nrecs, itype); } - maxrecs =libxfs_bmdr_maxrecs (XFS_DFORK_SIZE (dip, mp, whichfork),0 ); + maxrecs =xfs_bmdr_maxrecs (XFS_DFORK_SIZE (dip, mp, whichfork),0 );if (nrecs > maxrecs) {if (show_warnings) print_warning("invalid numrecs (%u) in inode %lld %s "
@@ -2374,7 +2374,7 @@ process_inode(/* we only care about crc recalculation if we will modify the inode. */ if (obfuscate || zero_stale_data) { - crc_was_ok =libxfs_verify_cksum ((char *)dip, + crc_was_ok =xfs_verify_cksum ((char *)dip, mp->m_sb.sb_inodesize, offsetof(struct xfs_dinode , di_crc)); }
@@ -2441,7 +2441,7 @@ done: need_new_crc =1 ;if (crc_was_ok && need_new_crc) -libxfs_dinode_calc_crc (mp, dip); +xfs_dinode_calc_crc (mp, dip);return success; }
@@ -2752,7 +2752,7 @@ scan_ag( i =be32_to_cpu (agf->agf_fllast);for (;;) { -if (++i ==libxfs_agfl_size (mp)) +if (++i ==xfs_agfl_size (mp)) i =0 ;if (i ==be32_to_cpu (agf->agf_flfirst))break ;
db/sb.c +5 -5
@@ -189,7 +189,7 @@ get_sb(xfs_agnumber_t agno, xfs_sb_t *sb)return 0 ; } -libxfs_sb_from_disk (sb, iocur_top->data); +xfs_sb_from_disk (sb, iocur_top->data);if (sb->sb_magicnum !=XFS_SB_MAGIC ) { dbprintf(_("bad sb magic # %#x in AG %u\n"),
@@ -344,7 +344,7 @@ do_uuid(xfs_agnumber_t agno, uuid_t *uuid) uuid_equal(uuid, &mp->m_sb.sb_meta_uuid)) {memset (&tsb.sb_meta_uuid,0 ,sizeof (uuid_t));/* Write those zeros now; it's ignored once we clear the flag */ -libxfs_sb_to_disk (iocur_top->data, &tsb); +xfs_sb_to_disk (iocur_top->data, &tsb); mp->m_sb.sb_features_incompat &= ~XFS_SB_FEAT_INCOMPAT_META_UUID ; tsb.sb_features_incompat &= ~XFS_SB_FEAT_INCOMPAT_META_UUID ;
@@ -352,7 +352,7 @@ do_uuid(xfs_agnumber_t agno, uuid_t *uuid) write:memcpy (&tsb.sb_uuid, uuid,sizeof (uuid_t)); -libxfs_sb_to_disk (iocur_top->data, &tsb); +xfs_sb_to_disk (iocur_top->data, &tsb);write_cur ();return uuid; }
@@ -516,7 +516,7 @@ do_label(xfs_agnumber_t agno, char *label)memset (&tsb.sb_fname,0 ,sizeof (tsb.sb_fname));memcpy (&tsb.sb_fname, label, len);memcpy (&lbl[0 ], &tsb.sb_fname,sizeof (tsb.sb_fname)); -libxfs_sb_to_disk (iocur_top->data, &tsb); +xfs_sb_to_disk (iocur_top->data, &tsb);write_cur ();return &lbl[0 ]; }
@@ -615,7 +615,7 @@ do_version(xfs_agnumber_t agno, uint16_t version, uint32_t features) tsb.sb_versionnum = version; tsb.sb_features2 = features; tsb.sb_bad_features2 = features; -libxfs_sb_to_disk (iocur_top->data, &tsb); +xfs_sb_to_disk (iocur_top->data, &tsb);write_cur ();return 1 ; }
include/cache.h +1 -1
@@ -33,7 +33,7 @@ enum {* For prefetch support, the top half of the range starts at * CACHE_PREFETCH_PRIORITY and everytime the buffer is fetched and is at or * above this priority level, it is reduced to below this level (refer to -* libxfs_buf_get). +* xfs_buf_get). * * If we have dirty nodes, we can't recycle them until they've been cleaned. To * keep these out of the reclaimable lists (as there can be lots of them) give
include/libxfs.h +3 -4
@@ -7,7 +7,6 @@#ifndef __LIBXFS_H__#define __LIBXFS_H__ -#include "libxfs_api_defs.h" #include "platform_defs.h" #include "xfs.h"
@@ -157,7 +156,7 @@ extern int libxfs_log_header(char *, uuid_t *, int, int, int, xfs_lsn_t,/* Shared utility routines */ -extern int libxfs_alloc_file_space (struct xfs_inode *,xfs_off_t , +extern int xfs_alloc_file_space (struct xfs_inode *,xfs_off_t ,xfs_off_t ,int ,int );/* XXX: this is messy and needs fixing */
@@ -210,8 +209,8 @@ libxfs_bmbt_disk_get_all(/* XXX: this is clearly a bug - a shared header needs to export this */ /* xfs_rtalloc.c */ -int libxfs_rtfree_extent (struct xfs_trans *,xfs_rtblock_t ,xfs_extlen_t ); -bool libxfs_verify_rtbno (struct xfs_mount *mp,xfs_rtblock_t rtbno); +int xfs_rtfree_extent (struct xfs_trans *,xfs_rtblock_t ,xfs_extlen_t ); +bool xfs_verify_rtbno (struct xfs_mount *mp,xfs_rtblock_t rtbno);#include "xfs_attr.h"
include/xfs_inode.h +4 -4
@@ -146,20 +146,20 @@ typedef struct cred {gid_t cr_gid; } cred_t; -extern int libxfs_inode_alloc (struct xfs_trans **,struct xfs_inode *, +extern int xfs_inode_alloc (struct xfs_trans **,struct xfs_inode *,mode_t ,nlink_t ,xfs_dev_t ,struct cred *,struct fsxattr *,struct xfs_inode **); -extern void libxfs_trans_inode_alloc_buf (struct xfs_trans *, +extern void xfs_trans_inode_alloc_buf (struct xfs_trans *,struct xfs_buf *); -extern void libxfs_trans_ichgtime (struct xfs_trans *, +extern void xfs_trans_ichgtime (struct xfs_trans *,struct xfs_inode *,int );extern int libxfs_iflush_int (struct xfs_inode *,struct xfs_buf *);extern struct timespec64 current_time (struct inode *inode);/* Inode Cache Interfaces */ -extern bool libxfs_inode_verify_forks (struct xfs_inode *ip); +extern bool xfs_inode_verify_forks (struct xfs_inode *ip);extern int libxfs_iget (struct xfs_mount *,struct xfs_trans *,xfs_ino_t ,uint ,struct xfs_inode **,struct xfs_ifork_ops *);
include/xfs_trans.h +24 -24
88 lines not on this page · raw message
io/open.c +1 -1
@@ -754,7 +754,7 @@ get_last_inode(void)/* The last inode number in use */ last_ino = ireq->inumbers[lastgrp].xi_startino + -libxfs_highbit64 (ireq->inumbers[lastgrp].xi_allocmask); +xfs_highbit64 (ireq->inumbers[lastgrp].xi_allocmask); out:free (ireq);
libxfs/Makefile +0 -1
@@ -49,7 +49,6 @@ HFILES = \ xfs_trans_resv.h \ xfs_trans_space.h \ libxfs_io.h \ - libxfs_api_defs.h \ init.h \ libxfs_priv.h \ xfs_dir2_priv.h
libxfs/cache.c +1 -1
@@ -53,7 +53,7 @@ cache_init( cache->c_misses =0 ; cache->c_maxcount = maxcount; cache->c_hashsize = hashsize; - cache->c_hashshift =libxfs_highbit32 (hashsize); + cache->c_hashshift =xfs_highbit32 (hashsize); cache->hash = cache_operations->hash; cache->alloc = cache_operations->alloc; cache->flush = cache_operations->flush;
libxfs/init.c +8 -8
@@ -456,14 +456,14 @@ rtmount_init( (unsigned long long) mp->m_sb.sb_rblocks);return -1 ; } - error =libxfs_buf_read (mp->m_rtdev, d -XFS_FSB_TO_BB (mp,1 ), + error =xfs_buf_read (mp->m_rtdev, d -XFS_FSB_TO_BB (mp,1 ),XFS_FSB_TO_BB (mp,1 ),0 , &bp,NULL );if (error) {fprintf (stderr,_ ("%s: realtime size check failed\n" ), progname);return -1 ; } -libxfs_buf_relse (bp); +xfs_buf_relse (bp);return 0 ; }
@@ -736,20 +736,20 @@ libxfs_mount(return mp;/* device size checks must pass unless we're a debugger. */ - error =libxfs_buf_read (mp->m_dev, d -XFS_FSS_TO_BB (mp,1 ), + error =xfs_buf_read (mp->m_dev, d -XFS_FSS_TO_BB (mp,1 ),XFS_FSS_TO_BB (mp,1 ),0 , &bp,NULL );if (error) {fprintf (stderr,_ ("%s: data size check failed\n" ), progname);if (!debugger)return NULL ; }else -libxfs_buf_relse (bp); +xfs_buf_relse (bp);if (mp->m_logdev_targp->dev && mp->m_logdev_targp->dev != mp->m_ddev_targp->dev) { d = (xfs_daddr_t )XFS_FSB_TO_BB (mp, mp->m_sb.sb_logblocks);if (XFS_BB_TO_FSB (mp, d) != mp->m_sb.sb_logblocks || -libxfs_buf_read (mp->m_logdev_targp, +xfs_buf_read (mp->m_logdev_targp, d -XFS_FSB_TO_BB (mp,1 ),XFS_FSB_TO_BB (mp,1 ),0 , &bp,NULL )) { fprintf(stderr, _("%s: log size checks failed\n"),
@@ -758,7 +758,7 @@ libxfs_mount(return NULL ; }if (bp) -libxfs_buf_relse (bp); +xfs_buf_relse (bp); }/* Initialize realtime fields in the mount structure */
@@ -776,7 +776,7 @@ libxfs_mount(* read the first one and let the user know to check the geometry. */ if (sbp->sb_agcount >1000000 ) { - error =libxfs_buf_read (mp->m_dev, + error =xfs_buf_read (mp->m_dev,XFS_AG_DADDR (mp, sbp->sb_agcount -1 ,0 ),1 ,0 , &bp,NULL );if (error) {
@@ -788,7 +788,7 @@ libxfs_mount( progname); sbp->sb_agcount =1 ; }else -libxfs_buf_relse (bp); +xfs_buf_relse (bp); } error =libxfs_initialize_perag (mp, sbp->sb_agcount, &mp->m_maxagi);
libxfs/libxfs_api_defs.h deleted +0 -191
191 lines not on this page · raw message
libxfs/libxfs_io.h +15 -15
@@ -130,22 +130,22 @@ extern struct cache_operations libxfs_bcache_operations;#ifdef XFS_BUF_TRACING -#define libxfs_buf_read (dev, daddr, len, flags, bpp, ops) \ +#define xfs_buf_read (dev, daddr, len, flags, bpp, ops) \ libxfs_trace_readbuf(__FUNCTION__, __FILE__, __LINE__, \ (dev), (daddr), (len), (flags), (bpp), (ops)) -#define libxfs_buf_read_map (dev, map, nmaps, flags, bpp, ops) \ +#define xfs_buf_read_map (dev, map, nmaps, flags, bpp, ops) \ libxfs_trace_readbuf_map(__FUNCTION__, __FILE__, __LINE__, \ (dev), (map), (nmaps), (flags), (bpp), (ops))#define libxfs_buf_mark_dirty (buf) \ libxfs_trace_dirtybuf(__FUNCTION__, __FILE__, __LINE__, \ (buf)) -#define libxfs_buf_get (dev, daddr, len, bpp) \ +#define xfs_buf_get (dev, daddr, len, bpp) \ libxfs_trace_getbuf(__FUNCTION__, __FILE__, __LINE__, \ (dev), (daddr), (len), (bpp)) -#define libxfs_buf_get_map (dev, map, nmaps, flags, bpp) \ +#define xfs_buf_get_map (dev, map, nmaps, flags, bpp) \ libxfs_trace_getbuf_map(__FUNCTION__, __FILE__, __LINE__, \ (dev), (map), (nmaps), (flags), (bpp)) -#define libxfs_buf_relse (buf) \ +#define xfs_buf_relse (buf) \ libxfs_trace_putbuf(__FUNCTION__, __FILE__, __LINE__, (buf)) int libxfs_trace_readbuf(const char *func, const char *file, int line,
@@ -169,16 +169,16 @@ extern void libxfs_trace_putbuf (const char *, const char *, int,#else -int libxfs_buf_read_map (struct xfs_buftarg *btp,struct xfs_buf_map *maps, +int xfs_buf_read_map (struct xfs_buftarg *btp,struct xfs_buf_map *maps,int nmaps,int flags,struct xfs_buf **bpp,const struct xfs_buf_ops *ops);void libxfs_buf_mark_dirty (struct xfs_buf *bp); -int libxfs_buf_get_map (struct xfs_buftarg *btp,struct xfs_buf_map *maps, +int xfs_buf_get_map (struct xfs_buftarg *btp,struct xfs_buf_map *maps,int nmaps,int flags,struct xfs_buf **bpp); -void libxfs_buf_relse (struct xfs_buf *bp); +void xfs_buf_relse (struct xfs_buf *bp); static inline int -libxfs_buf_get( +xfs_buf_get( struct xfs_buftarg *target, xfs_daddr_t blkno, size_t numblks,
@@ -186,11 +186,11 @@ libxfs_buf_get( {DEFINE_SINGLE_BUF_MAP (map, blkno, numblks); -return libxfs_buf_get_map (target, &map,1 ,0 , bpp); +return xfs_buf_get_map (target, &map,1 ,0 , bpp); } static inline int -libxfs_buf_read( +xfs_buf_read( struct xfs_buftarg *target, xfs_daddr_t blkno, size_t numblks,
@@ -200,7 +200,7 @@ libxfs_buf_read( {DEFINE_SINGLE_BUF_MAP (map, blkno, numblks); -return libxfs_buf_read_map (target, &map,1 , flags, bpp, ops); +return xfs_buf_read_map (target, &map,1 , flags, bpp, ops); }#endif /* XFS_BUF_TRACING */
@@ -213,7 +213,7 @@ extern void libxfs_bcache_flush(void);extern int libxfs_bcache_overflowed (void );/* Buffer (Raw) Interfaces */ -int libxfs_bwrite (struct xfs_buf *bp); +int xfs_bwrite (struct xfs_buf *bp);extern int libxfs_readbufr (struct xfs_buftarg *,xfs_daddr_t ,xfs_buf_t *,int ,int );extern int libxfs_readbufr_map (struct xfs_buftarg *,struct xfs_buf *,int );
@@ -243,9 +243,9 @@ xfs_buf_associate_memory(struct xfs_buf *bp, void *mem, size_t len)return 0 ; } -int libxfs_buf_get_uncached (struct xfs_buftarg *targ,size_t bblen,int flags, +int xfs_buf_get_uncached (struct xfs_buftarg *targ,size_t bblen,int flags,struct xfs_buf **bpp); -int libxfs_buf_read_uncached (struct xfs_buftarg *targ,xfs_daddr_t daddr, +int xfs_buf_read_uncached (struct xfs_buftarg *targ,xfs_daddr_t daddr,size_t bblen,int flags,struct xfs_buf **bpp,const struct xfs_buf_ops *ops);
libxfs/libxfs_priv.h +3 -4
@@ -37,7 +37,6 @@#ifndef __LIBXFS_INTERNAL_XFS_H__#define __LIBXFS_INTERNAL_XFS_H__ -#include "libxfs_api_defs.h" #include "platform_defs.h" #include "xfs.h"
@@ -573,8 +572,8 @@ xfs_buf_corruption_error(struct xfs_buf *bp, xfs_failaddr_t fa);/* XXX: this is clearly a bug - a shared header needs to export this */ /* xfs_rtalloc.c */ -int libxfs_rtfree_extent (struct xfs_trans *,xfs_rtblock_t ,xfs_extlen_t ); -bool libxfs_verify_rtbno (struct xfs_mount *mp,xfs_rtblock_t rtbno); +int xfs_rtfree_extent (struct xfs_trans *,xfs_rtblock_t ,xfs_extlen_t ); +bool xfs_verify_rtbno (struct xfs_mount *mp,xfs_rtblock_t rtbno);struct xfs_rtalloc_rec {xfs_rtblock_t ar_startext;
@@ -586,7 +585,7 @@ typedef int (*xfs_rtalloc_query_range_fn)(struct xfs_rtalloc_rec *rec, void *priv); -int libxfs_zero_extent (struct xfs_inode *ip,xfs_fsblock_t start_fsb, +int xfs_zero_extent (struct xfs_inode *ip,xfs_fsblock_t start_fsb,xfs_off_t count_fsb);
libxfs/rdwr.c +33 -33
238 lines not on this page · raw message
libxfs/trans.c +39 -39
298 lines not on this page · raw message
libxfs/util.c +4 -4
@@ -383,7 +383,7 @@ libxfs_iflush_int(xfs_inode_t *ip, xfs_buf_t *bp)VFS_I (ip)->i_version++;/* Check the inline fork data before we write out. */ -if (!libxfs_inode_verify_forks (ip)) +if (!xfs_inode_verify_forks (ip))return -EFSCORRUPTED ;/*
@@ -432,7 +432,7 @@ libxfs_mod_incore_sb(* Originally derived from xfs_alloc_file_space(). */ int -libxfs_alloc_file_space( +xfs_alloc_file_space( xfs_inode_t *ip, xfs_off_t offset, xfs_off_t len,
@@ -516,7 +516,7 @@ error0: /* Cancel bmap, cancel trans */* other in repair - now there is just the one. */ int -libxfs_inode_alloc( +xfs_inode_alloc( xfs_trans_t **tp, xfs_inode_t *pip, mode_t mode,
@@ -700,7 +700,7 @@ xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) }int -libxfs_zero_extent ( +xfs_zero_extent (struct xfs_inode *ip,xfs_fsblock_t start_fsb,xfs_off_t count_fsb)
libxlog/xfs_log_recover.c +14 -14
@@ -69,7 +69,7 @@ xlog_get_bp( nbblks += log->l_sectBBsize; nbblks =round_up (nbblks, log->l_sectBBsize); -libxfs_buf_get_uncached (log->l_dev, nbblks,0 , &bp); +xfs_buf_get_uncached (log->l_dev, nbblks,0 , &bp);return bp; }
@@ -270,7 +270,7 @@ xlog_find_verify_cycle( *new_blk =-1 ; out: -libxfs_buf_relse (bp); +xfs_buf_relse (bp);return error; }
@@ -379,7 +379,7 @@ xlog_find_verify_log_record( *last_blk = i; out: -libxfs_buf_relse (bp); +xfs_buf_relse (bp);return error; }
@@ -630,7 +630,7 @@ validate_head: goto bp_err; } -libxfs_buf_relse (bp); +xfs_buf_relse (bp);if (head_blk == log_bbnum) *return_head_blk =0 ;else
@@ -644,7 +644,7 @@ validate_head:return 0 ; bp_err: -libxfs_buf_relse (bp); +xfs_buf_relse (bp);if (error)xfs_warn (log->l_mp,"failed to find log head" );
@@ -741,7 +741,7 @@ xlog_find_tail( }if (!found) {xfs_warn (log->l_mp,"%s: couldn't find sync record" , __func__); -libxfs_buf_relse (bp); +xfs_buf_relse (bp);ASSERT (0 );return XFS_ERROR (EIO ); }
@@ -854,7 +854,7 @@ xlog_find_tail( error =xlog_clear_stale_blocks (log, tail_lsn); done: -libxfs_buf_relse (bp); +xfs_buf_relse (bp);if (error)xfs_warn (log->l_mp,"failed to locate log tail" );
@@ -902,7 +902,7 @@ xlog_find_zeroed( first_cycle =xlog_get_cycle (offset);if (first_cycle ==0 ) {/* completely zeroed log */ *blk_no =0 ; -libxfs_buf_relse (bp); +xfs_buf_relse (bp);return -1 ; }
@@ -913,7 +913,7 @@ xlog_find_zeroed( last_cycle =xlog_get_cycle (offset);if (last_cycle !=0 ) {/* log completely written to */ -libxfs_buf_relse (bp); +xfs_buf_relse (bp);return 0 ; }else if (first_cycle !=1 ) {/*
@@ -970,7 +970,7 @@ xlog_find_zeroed( *blk_no = last_blk; bp_err: -libxfs_buf_relse (bp); +xfs_buf_relse (bp);if (error)return error;return -1 ;
@@ -1453,7 +1453,7 @@ xlog_do_recovery_pass( hblks = h_size /XLOG_HEADER_CYCLE_SIZE ;if (h_size %XLOG_HEADER_CYCLE_SIZE ) hblks++; -libxfs_buf_relse (hbp); +xfs_buf_relse (hbp); hbp =xlog_get_bp (log, hblks); }else { hblks =1 ;
@@ -1469,7 +1469,7 @@ xlog_do_recovery_pass(return ENOMEM ; dbp =xlog_get_bp (log,BTOBB (h_size));if (!dbp) { -libxfs_buf_relse (hbp); +xfs_buf_relse (hbp);return ENOMEM ; }
@@ -1653,8 +1653,8 @@ xlog_do_recovery_pass( } bread_err2: -libxfs_buf_relse (dbp); +xfs_buf_relse (dbp); bread_err1: -libxfs_buf_relse (hbp); +xfs_buf_relse (hbp);return error; }
logprint/log_misc.c +2 -2
@@ -489,12 +489,12 @@ xlog_print_dir2_sf( count = sfp->count; sfep =xfs_dir2_sf_firstentry (sfp);for (i =0 ; i < count; i++) { - ino =libxfs_dir2_sf_get_ino (log->l_mp, sfp, sfep); + ino =xfs_dir2_sf_get_ino (log->l_mp, sfp, sfep);memmove (namebuf, (sfep->name), sfep->namelen); namebuf[sfep->namelen] ='\0' ;printf (_ ("%s ino 0x%llx namelen %d\n" ), namebuf, (unsigned long long )ino, sfep->namelen); - sfep =libxfs_dir2_sf_nextentry (log->l_mp, sfp, sfep); + sfep =xfs_dir2_sf_nextentry (log->l_mp, sfp, sfep); } }
logprint/log_print_all.c +1 -1
@@ -39,7 +39,7 @@ xlog_print_find_oldest( error =xlog_find_cycle_start (log, bp, first_blk, last_blk, last_half_cycle); -libxfs_buf_relse (bp); +xfs_buf_relse (bp);return error; }
logprint/logprint.c +1 -1
@@ -79,7 +79,7 @@ logstat(xfs_mount_t *mp)* Conjure up a mount structure */ sb = &mp->m_sb; -libxfs_sb_from_disk (sb, (xfs_dsb_t *)buf); +xfs_sb_from_disk (sb, (xfs_dsb_t *)buf); mp->m_blkbb_log = sb->sb_blocklog -BBSHIFT ; x.logBBsize =XFS_FSB_TO_BB (mp, sb->sb_logblocks);
mdrestore/xfs_mdrestore.c +2 -2
@@ -89,7 +89,7 @@ perform_restore(if (fread (block_buffer, mb_count << mbp->mb_blocklog,1 , src_f) !=1 )fatal ("error reading from metadump file\n" ); -libxfs_sb_from_disk (&sb, (xfs_dsb_t *)block_buffer); +xfs_sb_from_disk (&sb, (xfs_dsb_t *)block_buffer);if (sb.sb_magicnum !=XFS_SB_MAGIC )fatal ("bad magic number for primary superblock\n" );
@@ -163,7 +163,7 @@ perform_restore(memset (block_buffer,0 , sb.sb_sectsize); sb.sb_inprogress =0 ; -libxfs_sb_to_disk ((xfs_dsb_t *)block_buffer, &sb); +xfs_sb_to_disk ((xfs_dsb_t *)block_buffer, &sb);if (xfs_sb_version_hascrc (&sb)) {xfs_update_cksum (block_buffer, sb.sb_sectsize, offsetof(struct xfs_sb , sb_crc));
mkfs/proto.c +56 -56
339 lines not on this page · raw message
mkfs/xfs_mkfs.c +43 -43
303 lines not on this page · raw message
repair/agheader.c +5 -5
@@ -79,18 +79,18 @@ verify_set_agf(xfs_mount_t *mp, xfs_agf_t *agf, xfs_agnumber_t i)* check first/last AGF fields. if need be, lose the free * space in the AGFL, we'll reclaim it later. */ -if (be32_to_cpu (agf->agf_flfirst) >=libxfs_agfl_size (mp)) { +if (be32_to_cpu (agf->agf_flfirst) >=xfs_agfl_size (mp)) {do_warn (_ ("flfirst %d in agf %d too large (max = %u)\n" ),be32_to_cpu (agf->agf_flfirst), - i,libxfs_agfl_size (mp) -1 ); + i,xfs_agfl_size (mp) -1 );if (!no_modify) agf->agf_flfirst =cpu_to_be32 (0 ); } -if (be32_to_cpu (agf->agf_fllast) >=libxfs_agfl_size (mp)) { +if (be32_to_cpu (agf->agf_fllast) >=xfs_agfl_size (mp)) {do_warn (_ ("fllast %d in agf %d too large (max = %u)\n" ),be32_to_cpu (agf->agf_fllast), - i,libxfs_agfl_size (mp) -1 ); + i,xfs_agfl_size (mp) -1 );if (!no_modify) agf->agf_fllast =cpu_to_be32 (0 ); }
@@ -338,7 +338,7 @@ secondary_sb_whack(* secondaries. * * Also, the in-core inode flags now have different meaning to the -* on-disk flags, and so libxfs_sb_to_disk cannot directly write the +* on-disk flags, and so xfs_sb_to_disk cannot directly write the * sb_gquotino/sb_pquotino fields without specific sb_qflags being set. * Hence we need to zero those fields directly in the sb buffer here. */
repair/attr_repair.c +22 -24
169 lines not on this page · raw message
repair/da_util.c +18 -18
@@ -64,7 +64,7 @@ da_read_buf( map[i].bm_bn =XFS_FSB_TO_DADDR (mp, bmp[i].startblock); map[i].bm_len =XFS_FSB_TO_BB (mp, bmp[i].blockcount); } -libxfs_buf_read_map (mp->m_dev, map, nex,LIBXFS_READBUF_SALVAGE , +xfs_buf_read_map (mp->m_dev, map, nex,LIBXFS_READBUF_SALVAGE , &bp, ops);if (map != map_array)free (map);
@@ -135,7 +135,7 @@ _("can't read %s block %u for inode %" PRIu64 "\n"), } node = bp->b_addr; -libxfs_da3_node_hdr_from_disk (mp, &nodehdr, node); +xfs_da3_node_hdr_from_disk (mp, &nodehdr, node); if (whichfork == XFS_DATA_FORK && (nodehdr.magic == XFS_DIR2_LEAFN_MAGIC ||
@@ -146,7 +146,7 @@ _("found non-root LEAFN node in inode %" PRIu64 " bno = %u\n"), da_cursor->ino, bno); } *rbno =0 ; -libxfs_buf_relse (bp); +xfs_buf_relse (bp);return 1 ; }
@@ -156,13 +156,13 @@ _("found non-root LEAFN node in inode %" PRIu64 " bno = %u\n"),_ ("bad %s magic number 0x%x in inode %" PRIu64" bno = %u\n" ),FORKNAME (whichfork), nodehdr.magic, da_cursor->ino, bno); -libxfs_buf_relse (bp); +xfs_buf_relse (bp); goto error_out; }/* corrupt node; rebuild the dir. */ if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED ) { -libxfs_buf_relse (bp); +xfs_buf_relse (bp);do_warn (_ ("corrupt %s tree block %u for inode %" PRIu64"\n" ),FORKNAME (whichfork), bno, da_cursor->ino);
@@ -174,7 +174,7 @@ _("corrupt %s tree block %u for inode %" PRIu64 "\n"),_ ("bad %s record count in inode %" PRIu64", count = %d, max = %d\n" ),FORKNAME (whichfork), da_cursor->ino, nodehdr.count, geo->node_ents); -libxfs_buf_relse (bp); +xfs_buf_relse (bp); goto error_out; }
@@ -187,7 +187,7 @@ _("bad %s record count in inode %" PRIu64 ", count = %d, max = %d\n"),do_warn (_ ("bad header depth for directory inode %" PRIu64"\n" ), da_cursor->ino); -libxfs_buf_relse (bp); +xfs_buf_relse (bp); i =-1 ; goto error_out; }
@@ -198,7 +198,7 @@ _("bad header depth for directory inode %" PRIu64 "\n"),do_warn (_ ("bad %s btree for inode %" PRIu64"\n" ),FORKNAME (whichfork), da_cursor->ino); -libxfs_buf_relse (bp); +xfs_buf_relse (bp); goto error_out; } }
@@ -223,7 +223,7 @@ _("bad %s btree for inode %" PRIu64 "\n"), error_out:while (i >1 && i <= da_cursor->active) { -libxfs_buf_relse (da_cursor->level[i].bp); +xfs_buf_relse (da_cursor->level[i].bp); i++; }
@@ -253,7 +253,7 @@ release_da_cursor_int( }ASSERT (error !=0 ); -libxfs_buf_relse (cursor->level[level].bp); +xfs_buf_relse (cursor->level[level].bp); cursor->level[level].bp =NULL ; }
@@ -314,7 +314,7 @@ verify_final_da_path(*/ entry = cursor->level[this_level].index; node = cursor->level[this_level].bp->b_addr; -libxfs_da3_node_hdr_from_disk (mp, &nodehdr, node); +xfs_da3_node_hdr_from_disk (mp, &nodehdr, node);/* * check internal block consistency on this level -- ensure
@@ -406,10 +406,10 @@ _("would correct bad hashval in non-leaf %s block\n"if (cursor->level[this_level].dirty && !no_modify) {libxfs_buf_mark_dirty (cursor->level[this_level].bp); -libxfs_buf_relse (cursor->level[this_level].bp); +xfs_buf_relse (cursor->level[this_level].bp); }else -libxfs_buf_relse (cursor->level[this_level].bp); +xfs_buf_relse (cursor->level[this_level].bp); cursor->level[this_level].bp =NULL ;
Lines of this file are not shown. View the raw message.
repair/dir2.c +44 -44
88 lines not on this page · raw message
repair/phase5.c +64 -64
128 lines not on this page · raw message
repair/phase6.c +183 -183
366 lines not on this page · raw message
repair/rmap.c +36 -36
72 lines not on this page · raw message
repair/scan.c +23 -23
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.26.2
Part of the diff is not shown here. View the raw message.
Re: [PATCH 2/2] xfsprogs: remove the libxfs_* API redirections
Quoted 6 lines · Christoph Hellwig
For historical reasons xfsprogs tries to renamed xfs_* symbols used by tools (but not those used inside libxfs) to
libxfs_. Remove this indirection to make it clear what function is being called, and to avoid having to keep the renaming header uptodate.Signed-off-by Christoph Hellwig <[email protected]>
I merged the first patch (scrub prefix removal) but I want to give this one a little more thought. I'd be happy to get rid of this but I want to be certain that we stay robust and correct w.r.t. error sign problems and until I feel like I have that all in my brain, I'd like to leave this as is.
Thanks,
-Eric
Quoted 5 lines · Christoph Hellwig
Don't prefix tool private functions. We'll use the xfs_* namespace for the shared libxfs functions soon, and want to be able to easily verify that the callers handle return negative errors for them.
Signed-off-by Christoph Hellwig <[email protected]>
Looks good to me,
--D
Quoted 707 lines
--- scrub/common.c | 2 +- scrub/common.h | 2 +- scrub/filemap.c | 2 +- scrub/inodes.c | 2 +- scrub/phase1.c | 8 ++-- scrub/phase2.c | 8 ++-- scrub/phase3.c | 18 ++++---- scrub/phase4.c | 2 +- scrub/phase5.c | 2 +- scrub/phase7.c | 2 +- scrub/repair.c | 2 +- scrub/scrub.c | 106 +++++++++++++++++++++++----------------------- scrub/scrub.h | 42 +++++++++--------- scrub/spacemap.c | 2 +- scrub/vfs.c | 2 +- scrub/xfs_scrub.c | 4 +- 16 files changed, 103 insertions(+), 103 deletions(-)scrub/common.c +1
-1@@ -30,7 +30,7 @@ extern char *progname;/* Too many errors? Bail out. */ bool -xfs_scrub_excessive_errors ( +scrub_excessive_errors (struct scrub_ctx *ctx) {unsigned long long errors_seen;scrub/common.h +1
-1@@ -13,7 +13,7 @@*/ #define DESCR_BUFSZ 256 -bool xfs_scrub_excessive_errors (struct scrub_ctx *ctx); +bool scrub_excessive_errors (struct scrub_ctx *ctx);enum error_level {S_ERROR =0 ,scrub/filemap.c +1
-1@@ -93,7 +93,7 @@ scrub_iterate_filemaps( ret =fn (ctx, fd, whichfork, &fsx, &bmap, arg);if (ret) goto out; -if (xfs_scrub_excessive_errors (ctx)) +if (scrub_excessive_errors (ctx)) goto out; }scrub/inodes.c +1
-1@@ -193,7 +193,7 @@ _("Changed too many times during scan; giving up."));default : goto err; } -if (xfs_scrub_excessive_errors (ctx)) { +if (scrub_excessive_errors (ctx)) { si->aborted = true; goto out; }scrub/phase1.c +4
-4@@ -140,10 +140,10 @@ _("Not an XFS filesystem.")); }/* Do we have kernel-assisted metadata scrubbing? */ -if (!xfs_can_scrub_fs_metadata (ctx) || !xfs_can_scrub_inode (ctx) || - !xfs_can_scrub_bmap (ctx) || !xfs_can_scrub_dir (ctx) || - !xfs_can_scrub_attr (ctx) || !xfs_can_scrub_symlink (ctx) || - !xfs_can_scrub_parent (ctx)) { +if (!can_scrub_fs_metadata (ctx) || !can_scrub_inode (ctx) || + !can_scrub_bmap (ctx) || !can_scrub_dir (ctx) || + !can_scrub_attr (ctx) || !can_scrub_symlink (ctx) || + !can_scrub_parent (ctx)) {str_error (ctx, ctx->mntpoint,_ ("Kernel metadata scrubbing facility is not available." ));return ECANCELED ;scrub/phase2.c +4
-4@@ -44,7 +44,7 @@ scan_ag_metadata(* First we scrub and fix the AG headers, because we need * them to work well enough to check the AG btrees. */ - ret =xfs_scrub_ag_headers (ctx, agno, &alist); + ret =scrub_ag_headers (ctx, agno, &alist);if (ret) goto err;@@ -54,7 +54,7 @@ scan_ag_metadata( goto err;/* Now scrub the AG btrees. */ - ret =xfs_scrub_ag_metadata (ctx, agno, &alist); + ret =scrub_ag_metadata (ctx, agno, &alist);if (ret) goto err;@@ -108,7 +108,7 @@ scan_fs_metadata(return ;action_list_init (&alist); - ret =xfs_scrub_fs_metadata (ctx, &alist); + ret =scrub_fs_metadata (ctx, &alist);if (ret) { *aborted = true;return ;@@ -141,7 +141,7 @@ phase2_func(* anything else. */ action_list_init (&alist); - ret =xfs_scrub_primary_super (ctx, &alist); + ret =scrub_primary_super (ctx, &alist);if (ret) goto out; ret =action_list_process_or_defer (ctx,0 , &alist);scrub/phase3.c +9
-9@@ -84,7 +84,7 @@ scrub_inode( }/* Scrub the inode. */ - error =scrub_fd (ctx, xfs_scrub_inode_fields, bstat, &alist); + error =scrub_fd (ctx, scrub_inode_fields, bstat, &alist);if (error) goto out;@@ -93,13 +93,13 @@ scrub_inode( goto out;/* Scrub all block mappings. */ - error =scrub_fd (ctx, xfs_scrub_data_fork, bstat, &alist); + error =scrub_fd (ctx, scrub_data_fork, bstat, &alist);if (error) goto out; - error =scrub_fd (ctx, xfs_scrub_attr_fork, bstat, &alist); + error =scrub_fd (ctx, scrub_attr_fork, bstat, &alist);if (error) goto out; - error =scrub_fd (ctx, xfs_scrub_cow_fork, bstat, &alist); + error =scrub_fd (ctx, scrub_cow_fork, bstat, &alist);if (error) goto out;@@ -109,22 +109,22 @@ scrub_inode(if (S_ISLNK (bstat->bs_mode)) {/* Check symlink contents. */ - error =xfs_scrub_symlink (ctx, bstat->bs_ino, bstat->bs_gen, + error =scrub_symlink (ctx, bstat->bs_ino, bstat->bs_gen, &alist); }else if (S_ISDIR (bstat->bs_mode)) {/* Check the directory entries. */ - error =scrub_fd (ctx, xfs_scrub_dir, bstat, &alist); + error =scrub_fd (ctx, scrub_dir, bstat, &alist); }if (error) goto out;/* Check all the extended attributes. */ - error =scrub_fd (ctx, xfs_scrub_attr, bstat, &alist); + error =scrub_fd (ctx, scrub_attr, bstat, &alist);if (error) goto out;/* Check parent pointers. */ - error =scrub_fd (ctx, xfs_scrub_parent, bstat, &alist); + error =scrub_fd (ctx, scrub_parent, bstat, &alist);if (error) goto out;@@ -181,7 +181,7 @@ phase3_func(if (err) goto free; -xfs_scrub_report_preen_triggers (ctx); +scrub_report_preen_triggers (ctx); err =ptcounter_value (ictx.icount, &val);if (err) {str_liberror (ctx, err,_ ("summing scanned inode counter" ));scrub/phase4.c +1
-1@@ -119,7 +119,7 @@ phase4_func(* counters, so counter repairs have to be put on the list now so that * they get fixed before we stop retrying unfixed metadata repairs. */ - ret =xfs_scrub_fs_summary (ctx, &ctx->action_lists[0 ]); + ret =scrub_fs_summary (ctx, &ctx->action_lists[0 ]);if (ret)return ret;scrub/phase5.c +1
-1@@ -402,7 +402,7 @@ _("Filesystem has errors, skipping connectivity checks."));if (aborted)return ECANCELED ; -xfs_scrub_report_preen_triggers (ctx); +scrub_report_preen_triggers (ctx);return 0 ; }scrub/phase7.c +1
-1@@ -119,7 +119,7 @@ phase7_func(/* Check and fix the fs summary counters. */ action_list_init (&alist); - error =xfs_scrub_fs_summary (ctx, &alist); + error =scrub_fs_summary (ctx, &alist);if (error)return error; error = action_list_process(ctx, ctx->mnt.fd, &alist,scrub/repair.c +1
-1@@ -258,7 +258,7 @@ action_list_process( } } -if (xfs_scrub_excessive_errors (ctx)) +if (scrub_excessive_errors (ctx))return ECANCELED ;return 0 ; }scrub/scrub.c +53
-53@@ -96,7 +96,7 @@ static inline bool needs_repair(struct xfs_scrub_metadata *sm)/* Warn about strange circumstances after scrub. */ static inline void -xfs_scrub_warn_incomplete_scrub ( +scrub_warn_incomplete_scrub (struct scrub_ctx *ctx,struct descr *dsc,struct xfs_scrub_metadata *meta)@@ -184,7 +184,7 @@ _("Filesystem is shut down, aborting.")); }/* Complain about incomplete or suspicious metadata. */ -xfs_scrub_warn_incomplete_scrub (ctx, &dsc, meta); +scrub_warn_incomplete_scrub (ctx, &dsc, meta);/* * If we need repairs or there were discrepancies, schedule a @@ -229,7 +229,7 @@ _("Optimization is possible."));/* Bulk-notify user about things that could be optimized. */ void -xfs_scrub_report_preen_triggers ( +scrub_report_preen_triggers (struct scrub_ctx *ctx) {int i;@@ -249,7 +249,7 @@ _("Optimizations of %s are possible."), _(xfrog_scrubbers[i].descr));/* Save a scrub context for later repairs. */ static int -xfs_scrub_save_repair ( +scrub_save_repair (struct scrub_ctx *ctx,struct action_list *alist,struct xfs_scrub_metadata *meta)@@ -290,7 +290,7 @@ xfs_scrub_save_repair(* return a positive error code. */ static int -xfs_scrub_meta_type( +scrub_meta_type( struct scrub_ctx *ctx, unsigned int type, xfs_agnumber_t agno,@@ -313,7 +313,7 @@ xfs_scrub_meta_type(case CHECK_ABORT :return ECANCELED ;case CHECK_REPAIR : - ret =xfs_scrub_save_repair (ctx, alist, &meta); + ret =scrub_save_repair (ctx, alist, &meta);if (ret)return ret;/* fall through */ @@ -331,7 +331,7 @@ xfs_scrub_meta_type(* XFROG_SCRUB_TYPE_INODE or for checking summary metadata. */ static bool -xfs_scrub_all_types( +scrub_all_types( struct scrub_ctx *ctx, enum xfrog_scrub_type scrub_type, xfs_agnumber_t agno,@@ -349,7 +349,7 @@ xfs_scrub_all_types(if (sc->flags &XFROG_SCRUB_DESCR_SUMMARY )continue ; - ret =xfs_scrub_meta_type (ctx, type, agno, alist); + ret =scrub_meta_type (ctx, type, agno, alist);if (ret)return ret; }@@ -364,49 +364,49 @@ xfs_scrub_all_types(* return nonzero. */ int -xfs_scrub_primary_super ( +scrub_primary_super (struct scrub_ctx *ctx,struct action_list *alist) { -return xfs_scrub_meta_type (ctx,XFS_SCRUB_TYPE_SB ,0 , alist); +return scrub_meta_type (ctx,XFS_SCRUB_TYPE_SB ,0 , alist); }/* Scrub each AG's header blocks. */ int -xfs_scrub_ag_headers ( +scrub_ag_headers (struct scrub_ctx *ctx,xfs_agnumber_t agno,struct action_list *alist) { -return xfs_scrub_all_types (ctx,XFROG_SCRUB_TYPE_AGHEADER , agno, alist); +return scrub_all_types (ctx,XFROG_SCRUB_TYPE_AGHEADER , agno, alist); }/* Scrub each AG's metadata btrees. */ int -xfs_scrub_ag_metadata ( +scrub_ag_metadata (struct scrub_ctx *ctx,xfs_agnumber_t agno,struct action_list *alist) { -return xfs_scrub_all_types (ctx,XFROG_SCRUB_TYPE_PERAG , agno, alist); +return scrub_all_types (ctx,XFROG_SCRUB_TYPE_PERAG , agno, alist); }/* Scrub whole-FS metadata btrees. */ int -xfs_scrub_fs_metadata ( +scrub_fs_metadata (struct scrub_ctx *ctx,struct action_list *alist) { -return xfs_scrub_all_types (ctx,XFROG_SCRUB_TYPE_FS ,0 , alist); +return scrub_all_types (ctx,XFROG_SCRUB_TYPE_FS ,0 , alist); }/* Scrub FS summary metadata. */ int -xfs_scrub_fs_summary ( +scrub_fs_summary (struct scrub_ctx *ctx,struct action_list *alist) { -return xfs_scrub_meta_type (ctx,XFS_SCRUB_TYPE_FSCOUNTERS ,0 , alist); +return scrub_meta_type (ctx,XFS_SCRUB_TYPE_FSCOUNTERS ,0 , alist); }/* How many items do we have to check? */ @@ -440,7 +440,7 @@ scrub_estimate_ag_work(* return nonzero. */ static int -__xfs_scrub_file( +__scrub_file( struct scrub_ctx *ctx, uint64_t ino, uint32_t gen,@@ -464,87 +464,87 @@ __xfs_scrub_file(if (fix ==CHECK_DONE )return 0 ; -return xfs_scrub_save_repair (ctx, alist, &meta); +return scrub_save_repair (ctx, alist, &meta); }int -xfs_scrub_inode_fields ( +scrub_inode_fields (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_INODE , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_INODE , alist); }int -xfs_scrub_data_fork ( +scrub_data_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_BMBTD , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_BMBTD , alist); }int -xfs_scrub_attr_fork ( +scrub_attr_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_BMBTA , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_BMBTA , alist); }int -xfs_scrub_cow_fork ( +scrub_cow_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_BMBTC , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_BMBTC , alist); }int -xfs_scrub_dir ( +scrub_dir (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_DIR , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_DIR , alist); }int -xfs_scrub_attr ( +scrub_attr (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_XATTR , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_XATTR , alist); }int -xfs_scrub_symlink ( +scrub_symlink (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_SYMLINK , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_SYMLINK , alist); }int -xfs_scrub_parent ( +scrub_parent (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist) { -return __xfs_scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_PARENT , alist); +return __scrub_file (ctx, ino, gen,XFS_SCRUB_TYPE_PARENT , alist); }/* @@ -553,7 +553,7 @@ xfs_scrub_parent(* return false. */ static bool -__xfs_scrub_test ( +__scrub_test (struct scrub_ctx *ctx,unsigned int type,bool repair)@@ -606,59 +606,59 @@ _("Kernel %s %s facility not detected."), }bool -xfs_can_scrub_fs_metadata ( +can_scrub_fs_metadata (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_PROBE , false); +return __scrub_test (ctx,XFS_SCRUB_TYPE_PROBE , false); }bool -xfs_can_scrub_inode ( +can_scrub_inode (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_INODE , false); +return __scrub_test (ctx,XFS_SCRUB_TYPE_INODE , false); }bool -xfs_can_scrub_bmap ( +can_scrub_bmap (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_BMBTD , false); +return __scrub_test (ctx,XFS_SCRUB_TYPE_BMBTD , false); }bool -xfs_can_scrub_dir ( +can_scrub_dir (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_DIR , false); +return __scrub_test (ctx,XFS_SCRUB_TYPE_DIR , false); }bool -xfs_can_scrub_attr ( +can_scrub_attr (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_XATTR , false); +return __scrub_test (ctx,XFS_SCRUB_TYPE_XATTR , false); }bool -xfs_can_scrub_symlink ( +can_scrub_symlink (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_SYMLINK , false); +return __scrub_test (ctx,XFS_SCRUB_TYPE_SYMLINK , false); }bool -xfs_can_scrub_parent ( +can_scrub_parent (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_PARENT , false); +return __scrub_test (ctx,XFS_SCRUB_TYPE_PARENT , false); }bool xfs_can_repair (struct scrub_ctx *ctx) { -return __xfs_scrub_test (ctx,XFS_SCRUB_TYPE_PROBE , true); +return __scrub_test (ctx,XFS_SCRUB_TYPE_PROBE , true); }/* General repair routines. */ @@ -776,7 +776,7 @@ _("Read-only filesystem; cannot make changes.")); }if (repair_flags &XRM_COMPLAIN_IF_UNFIXED ) -xfs_scrub_warn_incomplete_scrub (ctx, &dsc, &meta); +scrub_warn_incomplete_scrub (ctx, &dsc, &meta);if (needs_repair (&meta)) {/* * Still broken; if we've been told not to complain then we scrub/scrub.h +21
-21@@ -16,39 +16,39 @@ enum check_outcome {struct action_item ; -void xfs_scrub_report_preen_triggers (struct scrub_ctx *ctx); -int xfs_scrub_primary_super (struct scrub_ctx *ctx,struct action_list *alist); -int xfs_scrub_ag_headers (struct scrub_ctx *ctx,xfs_agnumber_t agno, +void scrub_report_preen_triggers (struct scrub_ctx *ctx); +int scrub_primary_super (struct scrub_ctx *ctx,struct action_list *alist); +int scrub_ag_headers (struct scrub_ctx *ctx,xfs_agnumber_t agno,struct action_list *alist); -int xfs_scrub_ag_metadata (struct scrub_ctx *ctx,xfs_agnumber_t agno, +int scrub_ag_metadata (struct scrub_ctx *ctx,xfs_agnumber_t agno,struct action_list *alist); -int xfs_scrub_fs_metadata (struct scrub_ctx *ctx,struct action_list *alist); -int xfs_scrub_fs_summary (struct scrub_ctx *ctx,struct action_list *alist); +int scrub_fs_metadata (struct scrub_ctx *ctx,struct action_list *alist); +int scrub_fs_summary (struct scrub_ctx *ctx,struct action_list *alist); -bool xfs_can_scrub_fs_metadata (struct scrub_ctx *ctx); -bool xfs_can_scrub_inode (struct scrub_ctx *ctx); -bool xfs_can_scrub_bmap (struct scrub_ctx *ctx); -bool xfs_can_scrub_dir (struct scrub_ctx *ctx); -bool xfs_can_scrub_attr (struct scrub_ctx *ctx); -bool xfs_can_scrub_symlink (struct scrub_ctx *ctx); -bool xfs_can_scrub_parent (struct scrub_ctx *ctx); +bool can_scrub_fs_metadata (struct scrub_ctx *ctx); +bool can_scrub_inode (struct scrub_ctx *ctx); +bool can_scrub_bmap (struct scrub_ctx *ctx); +bool can_scrub_dir (struct scrub_ctx *ctx); +bool can_scrub_attr (struct scrub_ctx *ctx); +bool can_scrub_symlink (struct scrub_ctx *ctx); +bool can_scrub_parent (struct scrub_ctx *ctx);bool xfs_can_repair (struct scrub_ctx *ctx); -int xfs_scrub_inode_fields (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_inode_fields (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist); -int xfs_scrub_data_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_data_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist); -int xfs_scrub_attr_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_attr_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist); -int xfs_scrub_cow_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_cow_fork (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist); -int xfs_scrub_dir (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_dir (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist); -int xfs_scrub_attr (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_attr (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist); -int xfs_scrub_symlink (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_symlink (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist); -int xfs_scrub_parent (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen, +int scrub_parent (struct scrub_ctx *ctx,uint64_t ino,uint32_t gen,struct action_list *alist);/* Repair parameters are the scrub inputs and retry count. */ scrub/spacemap.c +1
-1@@ -62,7 +62,7 @@ scrub_iterate_fsmap( error =fn (ctx, p, arg);if (error) goto out; -if (xfs_scrub_excessive_errors (ctx)) +if (scrub_excessive_errors (ctx)) goto out; }scrub/vfs.c +1
-1@@ -182,7 +182,7 @@ scan_fs_dir(break ; } -if (xfs_scrub_excessive_errors (ctx)) { +if (scrub_excessive_errors (ctx)) { sft->aborted = true;break ; }scrub/xfs_scrub.c +2
-2@@ -493,7 +493,7 @@ _("Scrub aborted after phase %d."),break ;/* Too many errors? */ -if (xfs_scrub_excessive_errors (ctx)) { +if (scrub_excessive_errors (ctx)) { ret =ECANCELED ;break ; }@@ -761,7 +761,7 @@ main(* We don't want every thread yelling that into the output, so check * if we hit the threshold and tell the user *once*. */ -if (xfs_scrub_excessive_errors (&ctx)) +if (scrub_excessive_errors (&ctx))str_info (&ctx, ctx.mntpoint,_ ("Too many errors; aborting." ));if (debug_tweak_on ("XFS_SCRUB_FORCE_ERROR" ))Signature · 1 line
2.26.2