Update xfsprogs to latest kernel headers and functions

Merge of master-melb:xfs-cmds:32070a by kenmcd.
This commit is contained in:
Barry Naujok
2008-09-08 06:18:43 +00:00
parent 58963d0f80
commit 2c578cb87f
6 changed files with 79 additions and 71 deletions
+14
View File
@@ -75,6 +75,7 @@ xfs_ioops_t
xfs_mod_sb_t xfs_mod_sb_t
xfs_dqtrx_t xfs_dqtrx_t
xfs_dqtrxops_t xfs_dqtrxops_t
xfs_ail_t
xfs_ail_entry_t xfs_ail_entry_t
xfs_item_ops_t xfs_item_ops_t
xfs_log_busy_slot_t xfs_log_busy_slot_t
@@ -88,17 +89,20 @@ xfs_alloc_arg_t
xfs_attr_list_context_t xfs_attr_list_context_t
xfs_attr_sf_sort_t xfs_attr_sf_sort_t
xfs_bmbt_irec_t xfs_bmbt_irec_t
xfs_bmbt_rec_host_t
xfs_bmap_free_item_t xfs_bmap_free_item_t
xfs_bmap_free_t xfs_bmap_free_t
xfs_bmalloca_t xfs_bmalloca_t
xfs_btree_cur_t xfs_btree_cur_t
xfs_buf_log_item_t xfs_buf_log_item_t
xfs_buf_log_format_v1_t
xfs_da_args_t xfs_da_args_t
xfs_dabuf_t xfs_dabuf_t
xfs_da_state_blk_t xfs_da_state_blk_t
xfs_da_state_path_t xfs_da_state_path_t
xfs_da_state_t xfs_da_state_t
xfs_dinode_t xfs_dinode_t
xfs_dircook_t
xfs_dir2_block_t xfs_dir2_block_t
xfs_dir2_data_entry_t xfs_dir2_data_entry_t
xfs_dir2_data_union_t xfs_dir2_data_union_t
@@ -107,6 +111,8 @@ xfs_dir2_put_args_t
xfs_dir_put_args_t xfs_dir_put_args_t
xfs_dir_sf_sort_t xfs_dir_sf_sort_t
xfs_extent_t xfs_extent_t
xfs_ext_irec_t
xfs_extdelta_t
xfs_flock64_t xfs_flock64_t
xfs_fsop_geom_v1_t xfs_fsop_geom_v1_t
xfs_growfs_data_t xfs_growfs_data_t
@@ -114,7 +120,12 @@ xfs_growfs_rt_t
xfs_bstime_t xfs_bstime_t
xfs_bstat_t xfs_bstat_t
xfs_fsop_bulkreq_t xfs_fsop_bulkreq_t
xfs_icsb_cnts_t
xfs_icdinode_t
xfs_ictimestamp_t
xfs_inobt_rec_incore_t
xfs_inogrp_t xfs_inogrp_t
xfs_fid2_t
xfs_fsop_handlereq_t xfs_fsop_handlereq_t
xfs_fsop_setdm_handlereq_t xfs_fsop_setdm_handlereq_t
xfs_fsop_attrlist_handlereq_t xfs_fsop_attrlist_handlereq_t
@@ -178,6 +189,9 @@ $oprog | _type_size_filter > $progout
if [ $XFSPROGS_VERSION -lt 20908 ]; then if [ $XFSPROGS_VERSION -lt 20908 ]; then
echo 'offsetof(xfs_sb_t, sb_bad_features2 ) = 204' >>$progout echo 'offsetof(xfs_sb_t, sb_bad_features2 ) = 204' >>$progout
fi fi
if [ $XFSPROGS_VERSION -lt 30000 ]; then
echo 'sizeof( xfs_dsb_t ) = 208' >>$progout;
fi
LC_COLLATE=POSIX sort $progout LC_COLLATE=POSIX sort $progout
+1 -3
View File
@@ -70,7 +70,6 @@ sizeof( xfs_btree_hdr_t ) = 8
sizeof( xfs_btree_lblock_t ) = 24 sizeof( xfs_btree_lblock_t ) = 24
sizeof( xfs_btree_sblock_t ) = 16 sizeof( xfs_btree_sblock_t ) = 16
sizeof( xfs_buf_log_format_t ) = 24 sizeof( xfs_buf_log_format_t ) = 24
sizeof( xfs_buf_log_format_v1_t ) = 20
sizeof( xfs_da_blkinfo_t ) = 12 sizeof( xfs_da_blkinfo_t ) = 12
sizeof( xfs_da_intnode_t ) = 24 sizeof( xfs_da_intnode_t ) = 24
sizeof( xfs_dinode_core_t ) = 96 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_entry_t ) = 10
sizeof( xfs_dir_sf_hdr_t ) = 9 sizeof( xfs_dir_sf_hdr_t ) = 9
sizeof( xfs_dir_shortform_t ) = 19 sizeof( xfs_dir_shortform_t ) = 19
sizeof( xfs_dircook_t ) = 8
sizeof( xfs_disk_dquot_t ) = 104 sizeof( xfs_disk_dquot_t ) = 104
sizeof( xfs_dq_logformat_t ) = 24 sizeof( xfs_dq_logformat_t ) = 24
sizeof( xfs_dqblk_t ) = 136 sizeof( xfs_dqblk_t ) = 136
sizeof( xfs_dsb_t ) = 208
sizeof( xfs_efd_log_format_32_t ) = 28 sizeof( xfs_efd_log_format_32_t ) = 28
sizeof( xfs_efd_log_format_64_t ) = 32 sizeof( xfs_efd_log_format_64_t ) = 32
sizeof( xfs_efi_log_format_32_t ) = 28 sizeof( xfs_efi_log_format_32_t ) = 28
@@ -112,7 +111,6 @@ sizeof( xfs_exntfmt_t ) = 4
sizeof( xfs_exntst_t ) = 4 sizeof( xfs_exntst_t ) = 4
sizeof( xfs_extent_32_t ) = 12 sizeof( xfs_extent_32_t ) = 12
sizeof( xfs_extent_64_t ) = 16 sizeof( xfs_extent_64_t ) = 16
sizeof( xfs_fid2_t ) = 16
sizeof( xfs_fid_t ) = 16 sizeof( xfs_fid_t ) = 16
sizeof( xfs_fsid_t ) = 8 sizeof( xfs_fsid_t ) = 8
sizeof( xfs_fsop_counts_t ) = 32 sizeof( xfs_fsop_counts_t ) = 32
+3 -4
View File
@@ -3,8 +3,7 @@ AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then
echo echo
echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.' echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.'
echo 'Install or upgrade the XFS development package.' echo 'Run "make install-qa" from the xfsprogs source.'
echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
exit 1 exit 1
fi fi
]) ])
@@ -93,8 +92,8 @@ AC_DEFUN([AC_PACKAGE_NEED_IRIX_LIBHANDLE],
]) ])
AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO], AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
[ AC_MSG_CHECKING([xfsctl from xfs/libxfs.h]) [ AC_MSG_CHECKING([xfsctl from xfs/xfs.h])
AC_TRY_LINK([#include <xfs/libxfs.h>], [ int x = xfsctl(0, 0, 0, 0); ], AC_TRY_LINK([#include <xfs/xfs.h>], [ int x = xfsctl(0, 0, 0, 0); ],
[ echo ok ], [ echo ok ],
[ echo [ echo
echo 'FATAL ERROR: cannot find required macros in the XFS headers.' echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
-1
View File
@@ -12,7 +12,6 @@
#include <errno.h> #include <errno.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <xfs/libxfs.h>
#define rol32(x,y) (((x) << (y)) | ((x) >> (32 - (y)))) #define rol32(x,y) (((x) << (y)) | ((x) >> (32 - (y))))
+55 -56
View File
@@ -130,34 +130,34 @@ loggen_unmount(int count)
* way things end up on disk. * way things end up on disk.
*/ */
INT_SET(head->h_magicno, ARCH_CONVERT, XLOG_HEADER_MAGIC_NUM); head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM);
INT_SET(head->h_cycle, ARCH_CONVERT, param_cycle); head->h_cycle = cpu_to_be32(param_cycle);
INT_SET(head->h_version, ARCH_CONVERT, 1); head->h_version = cpu_to_be32(1);
INT_SET(head->h_len, ARCH_CONVERT, 20); head->h_len = cpu_to_be32(20);
INT_SET(head->h_chksum, ARCH_CONVERT, 0); head->h_chksum = cpu_to_be32(0);
INT_SET(head->h_prev_block, ARCH_CONVERT, -1); head->h_prev_block = cpu_to_be32(-1);
INT_SET(head->h_num_logops, ARCH_CONVERT, 1); head->h_num_logops = cpu_to_be32(1);
INT_SET(head->h_cycle_data[0], ARCH_CONVERT, 0xb0c0d0d0); head->h_cycle_data[0] = cpu_to_be32(0xb0c0d0d0);
INT_SET(head->h_fmt, ARCH_CONVERT, param_fmt); 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));
/* now a log unmount op */ /* now a log unmount op */
INT_SET(op->oh_tid, ARCH_CONVERT, param_cycle); op->oh_tid = cpu_to_be32(param_cycle);
INT_SET(op->oh_len, ARCH_CONVERT, sizeof(magic)); op->oh_len = cpu_to_be32(sizeof(magic));
INT_SET(op->oh_clientid, ARCH_CONVERT, XFS_LOG); op->oh_clientid = XFS_LOG;
INT_SET(op->oh_flags, ARCH_CONVERT, XLOG_UNMOUNT_TRANS); op->oh_flags = XLOG_UNMOUNT_TRANS;
INT_SET(op->oh_res2, ARCH_CONVERT, 0); op->oh_res2 = cpu_to_be16(0);
/* and the data for this op */ /* and the data for this op */
memcpy(op+1, &magic, sizeof(magic)); memcpy(op+1, &magic, sizeof(magic));
while (count--) { while (count--) {
ASSIGN_ANY_LSN_DISK(head->h_lsn, head->h_lsn = cpu_to_be64(xlog_assign_lsn(param_cycle, param_block++));
param_cycle, param_block++);
loggen_write(); loggen_write();
} }
@@ -195,47 +195,47 @@ loggen_empty(int count)
* way things end up on disk. * way things end up on disk.
*/ */
INT_SET(head->h_magicno, ARCH_CONVERT, XLOG_HEADER_MAGIC_NUM); head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM);
INT_SET(head->h_cycle, ARCH_CONVERT, param_cycle); head->h_cycle = cpu_to_be32(param_cycle);
INT_SET(head->h_version, ARCH_CONVERT, 1); head->h_version = cpu_to_be32(1);
INT_SET(head->h_len, ARCH_CONVERT, 5*sizeof(xlog_op_header_t) + head->h_len = cpu_to_be32(5*sizeof(xlog_op_header_t) +
sizeof(xfs_trans_header_t)+ sizeof(xfs_trans_header_t)+
sizeof(xfs_buf_log_format_t)+ sizeof(xfs_buf_log_format_t)+
sizeof(int)); sizeof(int));
INT_SET(head->h_chksum, ARCH_CONVERT, 0); head->h_chksum = cpu_to_be32(0);
INT_SET(head->h_prev_block, ARCH_CONVERT, -1); head->h_prev_block = cpu_to_be32(-1);
INT_SET(head->h_num_logops, ARCH_CONVERT, 5); head->h_num_logops = cpu_to_be32(5);
INT_SET(head->h_cycle_data[0], ARCH_CONVERT, 0xb0c0d0d0); head->h_cycle_data[0] = cpu_to_be32(0xb0c0d0d0);
INT_SET(head->h_fmt, ARCH_CONVERT, param_fmt); head->h_fmt = cpu_to_be32(param_fmt);
ASSIGN_ANY_LSN_DISK(head->h_tail_lsn, head->h_tail_lsn = cpu_to_be64(xlog_assign_lsn(param_tail_cycle,
param_tail_cycle, param_tail_block); param_tail_block));
memcpy(head->h_fs_uuid, param_uuid, sizeof(uuid_t)); memcpy(head->h_fs_uuid, param_uuid, sizeof(uuid_t));
/* start */ /* start */
INT_SET(op1->oh_tid, ARCH_CONVERT, 1); op1->oh_tid = cpu_to_be32(1);
INT_SET(op1->oh_len, ARCH_CONVERT, 0); op1->oh_len = cpu_to_be32(0);
INT_SET(op1->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); op1->oh_clientid = XFS_TRANSACTION;
INT_SET(op1->oh_flags, ARCH_CONVERT, XLOG_START_TRANS); op1->oh_flags = XLOG_START_TRANS;
INT_SET(op1->oh_res2, ARCH_CONVERT, 0); op1->oh_res2 = cpu_to_be16(0);
/* dummy */ /* dummy */
INT_SET(op2->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); op2->oh_tid = cpu_to_be32(0xb0c0d0d0);
INT_SET(op2->oh_len, ARCH_CONVERT, sizeof(xfs_trans_header_t)); op2->oh_len = cpu_to_be32(sizeof(xfs_trans_header_t));
INT_SET(op2->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); op2->oh_clientid = XFS_TRANSACTION;
INT_SET(op2->oh_flags, ARCH_CONVERT, 0); op2->oh_flags = 0;
INT_SET(op2->oh_res2, ARCH_CONVERT, 0); op2->oh_res2 = cpu_to_be16(0);
/* dummy transaction - this stuff doesn't get endian converted */ /* dummy transaction - this stuff doesn't get endian converted */
trans->th_magic = XFS_TRANS_MAGIC; trans->th_magic = XFS_TRANS_MAGIC;
trans->th_type = XFS_TRANS_DUMMY1; trans->th_type = XFS_TRANS_DUMMY1;
trans->th_tid = 0; trans->th_tid = 0;
trans->th_num_items = 1; trans->th_num_items = 1;
/* buffer */ /* buffer */
INT_SET(op3->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); op3->oh_tid = cpu_to_be32(0xb0c0d0d0);
INT_SET(op3->oh_len, ARCH_CONVERT, sizeof(xfs_buf_log_format_t)); op3->oh_len = cpu_to_be32(sizeof(xfs_buf_log_format_t));
INT_SET(op3->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); op3->oh_clientid = XFS_TRANSACTION;
INT_SET(op3->oh_flags, ARCH_CONVERT, 0); op3->oh_flags = 0;
INT_SET(op3->oh_res2, ARCH_CONVERT, 0); op3->oh_res2 = cpu_to_be16(0);
/* an empty buffer too */ /* an empty buffer too */
blfs.blf_type = XFS_LI_BUF; blfs.blf_type = XFS_LI_BUF;
blfs.blf_size = 2; blfs.blf_size = 2;
@@ -245,23 +245,22 @@ loggen_empty(int count)
blfs.blf_data_map[0]= 0; blfs.blf_data_map[0]= 0;
memcpy(blf, &blfs, sizeof(blfs)); memcpy(blf, &blfs, sizeof(blfs));
/* commit */ /* commit */
INT_SET(op4->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); op4->oh_tid = cpu_to_be32(0xb0c0d0d0);
INT_SET(op4->oh_len, ARCH_CONVERT, sizeof(int)); op4->oh_len = cpu_to_be32(sizeof(int));
INT_SET(op4->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); op4->oh_clientid = XFS_TRANSACTION;
INT_SET(op4->oh_flags, ARCH_CONVERT, 0); op4->oh_flags = 0;
INT_SET(op4->oh_res2, ARCH_CONVERT, 0); op4->oh_res2 = cpu_to_be16(0);
/* and the data */ /* and the data */
*data=*(int*)(char*)"FISH"; /* this won't get written (I hope) */ *data=*(int*)(char*)"FISH"; /* this won't get written (I hope) */
/* commit */ /* commit */
INT_SET(op5->oh_tid, ARCH_CONVERT, 0xb0c0d0d0); op5->oh_tid = cpu_to_be32(0xb0c0d0d0);
INT_SET(op5->oh_len, ARCH_CONVERT, 0); op5->oh_len = cpu_to_be32(0);
INT_SET(op5->oh_clientid, ARCH_CONVERT, XFS_TRANSACTION); op5->oh_clientid = XFS_TRANSACTION;
INT_SET(op5->oh_flags, ARCH_CONVERT, XLOG_COMMIT_TRANS); op5->oh_flags = XLOG_COMMIT_TRANS;
INT_SET(op5->oh_res2, ARCH_CONVERT, 0); op5->oh_res2 = cpu_to_be16(0);
while (count--) { while (count--) {
ASSIGN_ANY_LSN_DISK(head->h_lsn, head->h_lsn = cpu_to_be64(xlog_assign_lsn(param_cycle, param_block++));
param_cycle, param_block++);
loggen_write(); loggen_write();
} }
+5 -6
View File
@@ -58,10 +58,10 @@ my @difflist = qw(
xfs_ag.h xfs_alloc.h xfs_alloc_btree.h xfs_arch.h 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_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_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.h xfs_dir2_block.h xfs_dir2_data.h
xfs_dir2_leaf.h xfs_dir2_node.h xfs_dir2_sf.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_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_inum.h xfs_log.h xfs_log_priv.h xfs_log_recover.h
xfs_mount.h xfs_quota.h xfs_rtalloc.h xfs_mount.h xfs_quota.h xfs_rtalloc.h
@@ -286,10 +286,9 @@ sub functiondiff {
my @funclist = qw( my @funclist = qw(
xfs_alloc.c xfs_alloc_btree.c xfs_attr.c xfs_attr_leaf.c 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_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.c xfs_dir2_block.c xfs_dir2_data.c xfs_dir2_leaf.c
xfs_dir2_leaf.c xfs_dir2_node.c xfs_dir2_sf.c xfs_dir2_node.c xfs_dir2_sf.c xfs_ialloc.c xfs_ialloc_btree.c
xfs_dir_leaf.c xfs_ialloc.c xfs_ialloc_btree.c xfs_inode.c xfs_mount.c xfs_rtalloc.c xfs_trans.c
xfs_inode.c xfs_rtalloc.c xfs_mount.c xfs_trans.c
); );
print "\n=== Checking libxfs code ===\n"; print "\n=== Checking libxfs code ===\n";