From: Barry Naujok Date: Mon, 8 Sep 2008 06:18:43 +0000 (+0000) Subject: Update xfsprogs to latest kernel headers and functions X-Git-Tag: v1.1.0~357 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=2c578cb87f78052c65c09f2db2ebc5e40c85a4af Update xfsprogs to latest kernel headers and functions Merge of master-melb:xfs-cmds:32070a by kenmcd. --- diff --git a/122 b/122 index 6cb238d4..dc45e362 100755 --- a/122 +++ b/122 @@ -75,6 +75,7 @@ xfs_ioops_t xfs_mod_sb_t xfs_dqtrx_t xfs_dqtrxops_t +xfs_ail_t xfs_ail_entry_t xfs_item_ops_t xfs_log_busy_slot_t @@ -88,17 +89,20 @@ xfs_alloc_arg_t xfs_attr_list_context_t xfs_attr_sf_sort_t xfs_bmbt_irec_t +xfs_bmbt_rec_host_t xfs_bmap_free_item_t xfs_bmap_free_t xfs_bmalloca_t xfs_btree_cur_t xfs_buf_log_item_t +xfs_buf_log_format_v1_t xfs_da_args_t xfs_dabuf_t xfs_da_state_blk_t xfs_da_state_path_t xfs_da_state_t xfs_dinode_t +xfs_dircook_t xfs_dir2_block_t xfs_dir2_data_entry_t xfs_dir2_data_union_t @@ -107,6 +111,8 @@ xfs_dir2_put_args_t xfs_dir_put_args_t xfs_dir_sf_sort_t xfs_extent_t +xfs_ext_irec_t +xfs_extdelta_t xfs_flock64_t xfs_fsop_geom_v1_t xfs_growfs_data_t @@ -114,7 +120,12 @@ xfs_growfs_rt_t xfs_bstime_t xfs_bstat_t xfs_fsop_bulkreq_t +xfs_icsb_cnts_t +xfs_icdinode_t +xfs_ictimestamp_t +xfs_inobt_rec_incore_t xfs_inogrp_t +xfs_fid2_t xfs_fsop_handlereq_t xfs_fsop_setdm_handlereq_t xfs_fsop_attrlist_handlereq_t @@ -178,6 +189,9 @@ $oprog | _type_size_filter > $progout if [ $XFSPROGS_VERSION -lt 20908 ]; then echo 'offsetof(xfs_sb_t, sb_bad_features2 ) = 204' >>$progout fi +if [ $XFSPROGS_VERSION -lt 30000 ]; then + echo 'sizeof( xfs_dsb_t ) = 208' >>$progout; +fi LC_COLLATE=POSIX sort $progout diff --git a/122.out b/122.out index 98316024..c15db9c2 100644 --- a/122.out +++ b/122.out @@ -70,7 +70,6 @@ sizeof( xfs_btree_hdr_t ) = 8 sizeof( xfs_btree_lblock_t ) = 24 sizeof( xfs_btree_sblock_t ) = 16 sizeof( xfs_buf_log_format_t ) = 24 -sizeof( xfs_buf_log_format_v1_t ) = 20 sizeof( xfs_da_blkinfo_t ) = 12 sizeof( xfs_da_intnode_t ) = 24 sizeof( xfs_dinode_core_t ) = 96 @@ -99,10 +98,10 @@ sizeof( xfs_dir_leafblock_t ) = 52 sizeof( xfs_dir_sf_entry_t ) = 10 sizeof( xfs_dir_sf_hdr_t ) = 9 sizeof( xfs_dir_shortform_t ) = 19 -sizeof( xfs_dircook_t ) = 8 sizeof( xfs_disk_dquot_t ) = 104 sizeof( xfs_dq_logformat_t ) = 24 sizeof( xfs_dqblk_t ) = 136 +sizeof( xfs_dsb_t ) = 208 sizeof( xfs_efd_log_format_32_t ) = 28 sizeof( xfs_efd_log_format_64_t ) = 32 sizeof( xfs_efi_log_format_32_t ) = 28 @@ -112,7 +111,6 @@ sizeof( xfs_exntfmt_t ) = 4 sizeof( xfs_exntst_t ) = 4 sizeof( xfs_extent_32_t ) = 12 sizeof( xfs_extent_64_t ) = 16 -sizeof( xfs_fid2_t ) = 16 sizeof( xfs_fid_t ) = 16 sizeof( xfs_fsid_t ) = 8 sizeof( xfs_fsop_counts_t ) = 32 diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4 index 0a38e1b6..cafd9597 100644 --- a/m4/package_xfslibs.m4 +++ b/m4/package_xfslibs.m4 @@ -3,8 +3,7 @@ AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H], if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then echo echo 'FATAL ERROR: cannot find a valid header file.' - echo 'Install or upgrade the XFS development package.' - echo 'Alternatively, run "make install-dev" from the xfsprogs source.' + echo 'Run "make install-qa" from the xfsprogs source.' exit 1 fi ]) @@ -93,8 +92,8 @@ AC_DEFUN([AC_PACKAGE_NEED_IRIX_LIBHANDLE], ]) AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO], - [ AC_MSG_CHECKING([xfsctl from xfs/libxfs.h]) - AC_TRY_LINK([#include ], [ int x = xfsctl(0, 0, 0, 0); ], + [ AC_MSG_CHECKING([xfsctl from xfs/xfs.h]) + AC_TRY_LINK([#include ], [ int x = xfsctl(0, 0, 0, 0); ], [ echo ok ], [ echo echo 'FATAL ERROR: cannot find required macros in the XFS headers.' diff --git a/src/genhashnames.c b/src/genhashnames.c index 12801796..a4cdd599 100644 --- a/src/genhashnames.c +++ b/src/genhashnames.c @@ -12,7 +12,6 @@ #include #include #include -#include #define rol32(x,y) (((x) << (y)) | ((x) >> (32 - (y)))) diff --git a/src/loggen.c b/src/loggen.c index f0cf63ce..ce16955d 100644 --- a/src/loggen.c +++ b/src/loggen.c @@ -130,34 +130,34 @@ loggen_unmount(int count) * way things end up on disk. */ - INT_SET(head->h_magicno, ARCH_CONVERT, XLOG_HEADER_MAGIC_NUM); - INT_SET(head->h_cycle, ARCH_CONVERT, param_cycle); - INT_SET(head->h_version, ARCH_CONVERT, 1); - INT_SET(head->h_len, ARCH_CONVERT, 20); - INT_SET(head->h_chksum, ARCH_CONVERT, 0); - INT_SET(head->h_prev_block, ARCH_CONVERT, -1); - INT_SET(head->h_num_logops, ARCH_CONVERT, 1); - INT_SET(head->h_cycle_data[0], ARCH_CONVERT, 0xb0c0d0d0); - INT_SET(head->h_fmt, ARCH_CONVERT, param_fmt); - - ASSIGN_ANY_LSN_DISK(head->h_tail_lsn, param_tail_cycle, param_tail_block); + head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM); + head->h_cycle = cpu_to_be32(param_cycle); + head->h_version = cpu_to_be32(1); + head->h_len = cpu_to_be32(20); + head->h_chksum = cpu_to_be32(0); + head->h_prev_block = cpu_to_be32(-1); + head->h_num_logops = cpu_to_be32(1); + head->h_cycle_data[0] = cpu_to_be32(0xb0c0d0d0); + head->h_fmt = cpu_to_be32(param_fmt); + + head->h_tail_lsn = cpu_to_be64(xlog_assign_lsn(param_tail_cycle, + param_tail_block)); memcpy(head->h_fs_uuid, param_uuid, sizeof(uuid_t)); /* now a log unmount op */ - INT_SET(op->oh_tid, ARCH_CONVERT, param_cycle); - INT_SET(op->oh_len, ARCH_CONVERT, sizeof(magic)); - INT_SET(op->oh_clientid, ARCH_CONVERT, XFS_LOG); - INT_SET(op->oh_flags, ARCH_CONVERT, XLOG_UNMOUNT_TRANS); - INT_SET(op->oh_res2, ARCH_CONVERT, 0); + op->oh_tid = cpu_to_be32(param_cycle); + op->oh_len = cpu_to_be32(sizeof(magic)); + op->oh_clientid = XFS_LOG; + op->oh_flags = XLOG_UNMOUNT_TRANS; + op->oh_res2 = cpu_to_be16(0); /* and the data for this op */ memcpy(op+1, &magic, sizeof(magic)); while (count--) { - ASSIGN_ANY_LSN_DISK(head->h_lsn, - param_cycle, param_block++); + head->h_lsn = cpu_to_be64(xlog_assign_lsn(param_cycle, param_block++)); loggen_write(); } @@ -195,47 +195,47 @@ loggen_empty(int count) * way things end up on disk. */ - INT_SET(head->h_magicno, ARCH_CONVERT, XLOG_HEADER_MAGIC_NUM); - INT_SET(head->h_cycle, ARCH_CONVERT, param_cycle); - INT_SET(head->h_version, ARCH_CONVERT, 1); - INT_SET(head->h_len, ARCH_CONVERT, 5*sizeof(xlog_op_header_t) + + head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM); + head->h_cycle = cpu_to_be32(param_cycle); + head->h_version = cpu_to_be32(1); + head->h_len = cpu_to_be32(5*sizeof(xlog_op_header_t) + sizeof(xfs_trans_header_t)+ sizeof(xfs_buf_log_format_t)+ sizeof(int)); - INT_SET(head->h_chksum, ARCH_CONVERT, 0); - INT_SET(head->h_prev_block, ARCH_CONVERT, -1); - INT_SET(head->h_num_logops, ARCH_CONVERT, 5); - INT_SET(head->h_cycle_data[0], ARCH_CONVERT, 0xb0c0d0d0); - INT_SET(head->h_fmt, ARCH_CONVERT, param_fmt); + head->h_chksum = cpu_to_be32(0); + head->h_prev_block = cpu_to_be32(-1); + head->h_num_logops = cpu_to_be32(5); + head->h_cycle_data[0] = cpu_to_be32(0xb0c0d0d0); + head->h_fmt = cpu_to_be32(param_fmt); - ASSIGN_ANY_LSN_DISK(head->h_tail_lsn, - param_tail_cycle, param_tail_block); + head->h_tail_lsn = cpu_to_be64(xlog_assign_lsn(param_tail_cycle, + param_tail_block)); - memcpy(head->h_fs_uuid, param_uuid, sizeof(uuid_t)); + memcpy(head->h_fs_uuid, param_uuid, sizeof(uuid_t)); /* start */ - INT_SET(op1->oh_tid, ARCH_CONVERT, 1); - INT_SET(op1->oh_len, ARCH_CONVERT, 0); - INT_SET(op1->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); - INT_SET(op1->oh_flags, ARCH_CONVERT, XLOG_START_TRANS); - INT_SET(op1->oh_res2, ARCH_CONVERT, 0); + op1->oh_tid = cpu_to_be32(1); + op1->oh_len = cpu_to_be32(0); + op1->oh_clientid = XFS_TRANSACTION; + op1->oh_flags = XLOG_START_TRANS; + op1->oh_res2 = cpu_to_be16(0); /* dummy */ - INT_SET(op2->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); - INT_SET(op2->oh_len, ARCH_CONVERT, sizeof(xfs_trans_header_t)); - INT_SET(op2->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); - INT_SET(op2->oh_flags, ARCH_CONVERT, 0); - INT_SET(op2->oh_res2, ARCH_CONVERT, 0); + op2->oh_tid = cpu_to_be32(0xb0c0d0d0); + op2->oh_len = cpu_to_be32(sizeof(xfs_trans_header_t)); + op2->oh_clientid = XFS_TRANSACTION; + op2->oh_flags = 0; + op2->oh_res2 = cpu_to_be16(0); /* dummy transaction - this stuff doesn't get endian converted */ trans->th_magic = XFS_TRANS_MAGIC; trans->th_type = XFS_TRANS_DUMMY1; trans->th_tid = 0; trans->th_num_items = 1; /* buffer */ - INT_SET(op3->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); - INT_SET(op3->oh_len, ARCH_CONVERT, sizeof(xfs_buf_log_format_t)); - INT_SET(op3->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); - INT_SET(op3->oh_flags, ARCH_CONVERT, 0); - INT_SET(op3->oh_res2, ARCH_CONVERT, 0); + op3->oh_tid = cpu_to_be32(0xb0c0d0d0); + op3->oh_len = cpu_to_be32(sizeof(xfs_buf_log_format_t)); + op3->oh_clientid = XFS_TRANSACTION; + op3->oh_flags = 0; + op3->oh_res2 = cpu_to_be16(0); /* an empty buffer too */ blfs.blf_type = XFS_LI_BUF; blfs.blf_size = 2; @@ -245,23 +245,22 @@ loggen_empty(int count) blfs.blf_data_map[0]= 0; memcpy(blf, &blfs, sizeof(blfs)); /* commit */ - INT_SET(op4->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); - INT_SET(op4->oh_len, ARCH_CONVERT, sizeof(int)); - INT_SET(op4->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); - INT_SET(op4->oh_flags, ARCH_CONVERT, 0); - INT_SET(op4->oh_res2, ARCH_CONVERT, 0); + op4->oh_tid = cpu_to_be32(0xb0c0d0d0); + op4->oh_len = cpu_to_be32(sizeof(int)); + op4->oh_clientid = XFS_TRANSACTION; + op4->oh_flags = 0; + op4->oh_res2 = cpu_to_be16(0); /* and the data */ *data=*(int*)(char*)"FISH"; /* this won't get written (I hope) */ /* commit */ - INT_SET(op5->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); - INT_SET(op5->oh_len, ARCH_CONVERT, 0); - INT_SET(op5->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); - INT_SET(op5->oh_flags, ARCH_CONVERT, XLOG_COMMIT_TRANS); - INT_SET(op5->oh_res2, ARCH_CONVERT, 0); + op5->oh_tid = cpu_to_be32(0xb0c0d0d0); + op5->oh_len = cpu_to_be32(0); + op5->oh_clientid = XFS_TRANSACTION; + op5->oh_flags = XLOG_COMMIT_TRANS; + op5->oh_res2 = cpu_to_be16(0); while (count--) { - ASSIGN_ANY_LSN_DISK(head->h_lsn, - param_cycle, param_block++); + head->h_lsn = cpu_to_be64(xlog_assign_lsn(param_cycle, param_block++)); loggen_write(); } diff --git a/tools/srcdiff b/tools/srcdiff index 9840e466..7a9fdf0d 100755 --- a/tools/srcdiff +++ b/tools/srcdiff @@ -58,10 +58,10 @@ my @difflist = qw( xfs_ag.h xfs_alloc.h xfs_alloc_btree.h xfs_arch.h xfs_attr_leaf.h xfs_attr_sf.h xfs_bit.h xfs_bmap.h xfs_bmap_btree.h xfs_btree.h xfs_buf_item.h - xfs_da_btree.h xfs_dfrag.h xfs_dinode.h xfs_dir.h + xfs_da_btree.h xfs_dfrag.h xfs_dinode.h xfs_dir2.h xfs_dir2_block.h xfs_dir2_data.h xfs_dir2_leaf.h xfs_dir2_node.h xfs_dir2_sf.h - xfs_dir_leaf.h xfs_dir_sf.h xfs_extfree_item.h xfs_ialloc.h + xfs_extfree_item.h xfs_ialloc.h xfs_imap.h xfs_ialloc_btree.h xfs_inode.h xfs_inode_item.h xfs_inum.h xfs_log.h xfs_log_priv.h xfs_log_recover.h xfs_mount.h xfs_quota.h xfs_rtalloc.h @@ -286,10 +286,9 @@ sub functiondiff { my @funclist = qw( xfs_alloc.c xfs_alloc_btree.c xfs_attr.c xfs_attr_leaf.c xfs_bmap.c xfs_bmap_btree.c xfs_btree.c xfs_da_btree.c - xfs_dir.c xfs_dir2.c xfs_dir2_block.c xfs_dir2_data.c - xfs_dir2_leaf.c xfs_dir2_node.c xfs_dir2_sf.c - xfs_dir_leaf.c xfs_ialloc.c xfs_ialloc_btree.c - xfs_inode.c xfs_rtalloc.c xfs_mount.c xfs_trans.c + xfs_dir2.c xfs_dir2_block.c xfs_dir2_data.c xfs_dir2_leaf.c + xfs_dir2_node.c xfs_dir2_sf.c xfs_ialloc.c xfs_ialloc_btree.c + xfs_inode.c xfs_mount.c xfs_rtalloc.c xfs_trans.c ); print "\n=== Checking libxfs code ===\n";