* [PATCH 0/2] xfsprogs: libxfs cosmetic tidyups
@ 2020-01-22 16:38 Eric Sandeen
2020-01-22 16:41 ` [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h Eric Sandeen
2020-01-22 16:48 ` [PATCH 2/2] libxfs: move header includes closer to kernelspace Eric Sandeen
0 siblings, 2 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-01-22 16:38 UTC (permalink / raw)
To: linux-xfs
These should be no-op, almost purely cosmetic patches to ease
future libxfs porting work.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h
2020-01-22 16:38 [PATCH 0/2] xfsprogs: libxfs cosmetic tidyups Eric Sandeen
@ 2020-01-22 16:41 ` Eric Sandeen
2020-01-22 17:02 ` Darrick J. Wong
2020-01-25 23:14 ` Christoph Hellwig
2020-01-22 16:48 ` [PATCH 2/2] libxfs: move header includes closer to kernelspace Eric Sandeen
1 sibling, 2 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-01-22 16:41 UTC (permalink / raw)
To: linux-xfs
Rather than randomly choosing locations for new #defines in the
future, alphabetize the file now for consistency.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/libxfs/libxfs_api_defs.h b/libxfs/libxfs_api_defs.h
index eed63ace..33e52926 100644
--- a/libxfs/libxfs_api_defs.h
+++ b/libxfs/libxfs_api_defs.h
@@ -13,164 +13,167 @@
* it can be included in both the internal and external libxfs header files
* without introducing any depenencies between the two.
*/
-#define xfs_highbit32 libxfs_highbit32
-#define xfs_highbit64 libxfs_highbit64
-
-#define xfs_trans_alloc libxfs_trans_alloc
-#define xfs_trans_alloc_empty libxfs_trans_alloc_empty
-#define xfs_trans_add_item libxfs_trans_add_item
-#define xfs_trans_bhold libxfs_trans_bhold
-#define xfs_trans_bhold_release libxfs_trans_bhold_release
-#define xfs_trans_binval libxfs_trans_binval
-#define xfs_trans_bjoin libxfs_trans_bjoin
-#define xfs_trans_brelse libxfs_trans_brelse
-#define xfs_trans_commit libxfs_trans_commit
-#define xfs_trans_cancel libxfs_trans_cancel
-#define xfs_trans_del_item libxfs_trans_del_item
-#define xfs_trans_get_buf libxfs_trans_get_buf
-#define xfs_trans_getsb libxfs_trans_getsb
-#define xfs_trans_ichgtime libxfs_trans_ichgtime
-#define xfs_trans_ijoin libxfs_trans_ijoin
-#define xfs_trans_init libxfs_trans_init
-#define xfs_trans_inode_alloc_buf libxfs_trans_inode_alloc_buf
-#define xfs_trans_dirty_buf libxfs_trans_dirty_buf
-#define xfs_trans_log_buf libxfs_trans_log_buf
-#define xfs_trans_ordered_buf libxfs_trans_ordered_buf
-#define xfs_trans_log_inode libxfs_trans_log_inode
-#define xfs_trans_roll_inode libxfs_trans_roll_inode
-#define xfs_trans_mod_sb libxfs_trans_mod_sb
-#define xfs_trans_read_buf libxfs_trans_read_buf
-#define xfs_trans_read_buf_map libxfs_trans_read_buf_map
-#define xfs_trans_roll libxfs_trans_roll
-#define xfs_trans_get_buf_map libxfs_trans_get_buf_map
-#define xfs_trans_resv_calc libxfs_trans_resv_calc
-#define xfs_log_get_max_trans_res libxfs_log_get_max_trans_res
-#define xfs_attr_get libxfs_attr_get
-#define xfs_attr_set libxfs_attr_set
-#define xfs_attr_remove libxfs_attr_remove
-#define xfs_attr_leaf_newentsize libxfs_attr_leaf_newentsize
+#define LIBXFS_ATTR_CREATE ATTR_CREATE
+#define LIBXFS_ATTR_REPLACE ATTR_REPLACE
+#define LIBXFS_ATTR_ROOT ATTR_ROOT
+#define LIBXFS_ATTR_SECURE ATTR_SECURE
+#define xfs_agfl_size libxfs_agfl_size
#define xfs_agfl_walk libxfs_agfl_walk
+
+#define xfs_ag_init_headers libxfs_ag_init_headers
+
+#define xfs_alloc_ag_max_usable libxfs_alloc_ag_max_usable
+#define xfs_allocbt_maxrecs libxfs_allocbt_maxrecs
#define xfs_alloc_fix_freelist libxfs_alloc_fix_freelist
#define xfs_alloc_min_freelist libxfs_alloc_min_freelist
#define xfs_alloc_read_agf libxfs_alloc_read_agf
-#define xfs_bmap_last_offset libxfs_bmap_last_offset
-#define xfs_iext_lookup_extent libxfs_iext_lookup_extent
-#define xfs_bmapi_write libxfs_bmapi_write
-#define xfs_bmapi_read libxfs_bmapi_read
-#define xfs_bunmapi libxfs_bunmapi
-#define xfs_rtfree_extent libxfs_rtfree_extent
-#define xfs_verify_rtbno libxfs_verify_rtbno
-#define xfs_verify_ino libxfs_verify_ino
-#define xfs_zero_extent libxfs_zero_extent
-#define xfs_defer_finish libxfs_defer_finish
-#define xfs_defer_cancel libxfs_defer_cancel
+#define xfs_attr_get libxfs_attr_get
+#define xfs_attr_leaf_newentsize libxfs_attr_leaf_newentsize
+#define xfs_attr_namecheck libxfs_attr_namecheck
+#define xfs_attr_remove libxfs_attr_remove
+#define xfs_attr_set libxfs_attr_set
+#define xfs_bmapi_read libxfs_bmapi_read
+#define xfs_bmapi_write libxfs_bmapi_write
+#define xfs_bmap_last_offset libxfs_bmap_last_offset
+#define xfs_bmbt_maxrecs libxfs_bmbt_maxrecs
+#define xfs_bmdr_maxrecs libxfs_bmdr_maxrecs
+
+#define xfs_btree_del_cursor libxfs_btree_del_cursor
+#define xfs_btree_init_block libxfs_btree_init_block
+#define xfs_buf_delwri_submit libxfs_buf_delwri_submit
+#define xfs_bunmapi libxfs_bunmapi
+#define xfs_calc_dquots_per_chunk libxfs_calc_dquots_per_chunk
+#define xfs_da3_node_hdr_from_disk libxfs_da3_node_hdr_from_disk
+#define xfs_da_get_buf libxfs_da_get_buf
#define xfs_da_hashname libxfs_da_hashname
-#define xfs_da_shrink_inode libxfs_da_shrink_inode
#define xfs_da_read_buf libxfs_da_read_buf
-#define xfs_da3_node_hdr_from_disk libxfs_da3_node_hdr_from_disk
-#define xfs_dir_createname libxfs_dir_createname
-#define xfs_dir_init libxfs_dir_init
-#define xfs_dir_lookup libxfs_dir_lookup
-#define xfs_dir_replace libxfs_dir_replace
+#define xfs_da_shrink_inode libxfs_da_shrink_inode
+#define xfs_default_ifork_ops libxfs_default_ifork_ops
+#define xfs_defer_cancel libxfs_defer_cancel
+#define xfs_defer_finish libxfs_defer_finish
+#define xfs_dinode_calc_crc libxfs_dinode_calc_crc
+#define xfs_dinode_good_version libxfs_dinode_good_version
+#define xfs_dinode_verify libxfs_dinode_verify
+
#define xfs_dir2_data_bestfree_p libxfs_dir2_data_bestfree_p
-#define xfs_dir2_data_get_ftype libxfs_dir2_data_get_ftype
-#define xfs_dir2_data_put_ftype libxfs_dir2_data_put_ftype
-#define xfs_dir2_leaf_hdr_from_disk libxfs_dir2_leaf_hdr_from_disk
-#define xfs_dir2_free_hdr_from_disk libxfs_dir2_free_hdr_from_disk
-#define xfs_dir2_isblock libxfs_dir2_isblock
-#define xfs_dir2_isleaf libxfs_dir2_isleaf
+#define xfs_dir2_data_entry_tag_p libxfs_dir2_data_entry_tag_p
+#define xfs_dir2_data_entsize libxfs_dir2_data_entsize
#define xfs_dir2_data_freescan libxfs_dir2_data_freescan
+#define xfs_dir2_data_get_ftype libxfs_dir2_data_get_ftype
#define xfs_dir2_data_log_entry libxfs_dir2_data_log_entry
#define xfs_dir2_data_log_header libxfs_dir2_data_log_header
#define xfs_dir2_data_make_free libxfs_dir2_data_make_free
+#define xfs_dir2_data_put_ftype libxfs_dir2_data_put_ftype
#define xfs_dir2_data_use_free libxfs_dir2_data_use_free
-#define xfs_dir2_data_entsize libxfs_dir2_data_entsize
-#define xfs_dir2_data_entry_tag_p libxfs_dir2_data_entry_tag_p
+#define xfs_dir2_free_hdr_from_disk libxfs_dir2_free_hdr_from_disk
#define xfs_dir2_hashname libxfs_dir2_hashname
-#define xfs_dir2_shrink_inode libxfs_dir2_shrink_inode
-#define xfs_dir2_sf_get_parent_ino libxfs_dir2_sf_get_parent_ino
-#define xfs_dir2_sf_put_parent_ino libxfs_dir2_sf_put_parent_ino
+#define xfs_dir2_isblock libxfs_dir2_isblock
+#define xfs_dir2_isleaf libxfs_dir2_isleaf
+#define xfs_dir2_leaf_hdr_from_disk libxfs_dir2_leaf_hdr_from_disk
+#define xfs_dir2_namecheck libxfs_dir2_namecheck
#define xfs_dir2_sf_entsize libxfs_dir2_sf_entsize
-#define xfs_dir2_sf_nextentry libxfs_dir2_sf_nextentry
#define xfs_dir2_sf_get_ftype libxfs_dir2_sf_get_ftype
-#define xfs_dir2_sf_put_ftype libxfs_dir2_sf_put_ftype
#define xfs_dir2_sf_get_ino libxfs_dir2_sf_get_ino
+#define xfs_dir2_sf_get_parent_ino libxfs_dir2_sf_get_parent_ino
+#define xfs_dir2_sf_nextentry libxfs_dir2_sf_nextentry
+#define xfs_dir2_sf_put_ftype libxfs_dir2_sf_put_ftype
#define xfs_dir2_sf_put_ino libxfs_dir2_sf_put_ino
-#define xfs_dir2_namecheck libxfs_dir2_namecheck
-#define xfs_da_get_buf libxfs_da_get_buf
-
-#define xfs_inode_from_disk libxfs_inode_from_disk
-#define xfs_inode_to_disk libxfs_inode_to_disk
-#define xfs_dinode_calc_crc libxfs_dinode_calc_crc
-#define xfs_idata_realloc libxfs_idata_realloc
-#define xfs_idestroy_fork libxfs_idestroy_fork
-#define xfs_inode_validate_extsize libxfs_inode_validate_extsize
-#define xfs_inode_validate_cowextsize libxfs_inode_validate_cowextsize
-
-#define xfs_rmap_alloc libxfs_rmap_alloc
-#define xfs_rmap_query_range libxfs_rmap_query_range
-#define xfs_rmap_lookup_le libxfs_rmap_lookup_le
-#define xfs_rmap_get_rec libxfs_rmap_get_rec
-#define xfs_rmap_irec_offset_pack libxfs_rmap_irec_offset_pack
-#define xfs_rmap_irec_offset_unpack libxfs_rmap_irec_offset_unpack
-#define xfs_rmapbt_init_cursor libxfs_rmapbt_init_cursor
-#define xfs_btree_del_cursor libxfs_btree_del_cursor
-#define xfs_mode_to_ftype libxfs_mode_to_ftype
+#define xfs_dir2_sf_put_parent_ino libxfs_dir2_sf_put_parent_ino
+#define xfs_dir2_shrink_inode libxfs_dir2_shrink_inode
-#define xfs_log_sb libxfs_log_sb
-#define xfs_sb_from_disk libxfs_sb_from_disk
-#define xfs_sb_quota_from_disk libxfs_sb_quota_from_disk
-#define xfs_sb_to_disk libxfs_sb_to_disk
+#define xfs_dir_createname libxfs_dir_createname
+#define xfs_dir_init libxfs_dir_init
+#define xfs_dir_ino_validate libxfs_dir_ino_validate
+#define xfs_dir_lookup libxfs_dir_lookup
+#define xfs_dir_replace libxfs_dir_replace
-#define xfs_calc_dquots_per_chunk libxfs_calc_dquots_per_chunk
-#define xfs_dquot_verify libxfs_dquot_verify
#define xfs_dqblk_repair libxfs_dqblk_repair
+#define xfs_dquot_verify libxfs_dquot_verify
-#define xfs_symlink_blocks libxfs_symlink_blocks
-#define xfs_symlink_hdr_ok libxfs_symlink_hdr_ok
-
-#define xfs_verify_cksum libxfs_verify_cksum
-#define xfs_dinode_verify libxfs_dinode_verify
-
-#define xfs_alloc_ag_max_usable libxfs_alloc_ag_max_usable
-#define xfs_allocbt_maxrecs libxfs_allocbt_maxrecs
-#define xfs_bmbt_maxrecs libxfs_bmbt_maxrecs
-#define xfs_bmdr_maxrecs libxfs_bmdr_maxrecs
-#define xfs_btree_init_block libxfs_btree_init_block
-#define xfs_dir_ino_validate libxfs_dir_ino_validate
+#define xfs_free_extent libxfs_free_extent
+#define xfs_fs_geometry libxfs_fs_geometry
+#define xfs_highbit32 libxfs_highbit32
+#define xfs_highbit64 libxfs_highbit64
+#define xfs_idata_realloc libxfs_idata_realloc
+#define xfs_idestroy_fork libxfs_idestroy_fork
+#define xfs_iext_lookup_extent libxfs_iext_lookup_extent
#define xfs_initialize_perag_data libxfs_initialize_perag_data
+#define xfs_init_local_fork libxfs_init_local_fork
+
#define xfs_inobt_maxrecs libxfs_inobt_maxrecs
-#define xfs_rmapbt_maxrecs libxfs_rmapbt_maxrecs
-#define xfs_refcountbt_maxrecs libxfs_refcountbt_maxrecs
+#define xfs_inode_from_disk libxfs_inode_from_disk
+#define xfs_inode_to_disk libxfs_inode_to_disk
+#define xfs_inode_validate_cowextsize libxfs_inode_validate_cowextsize
+#define xfs_inode_validate_extsize libxfs_inode_validate_extsize
+
#define xfs_iread_extents libxfs_iread_extents
#define xfs_log_calc_minimum_size libxfs_log_calc_minimum_size
+#define xfs_log_get_max_trans_res libxfs_log_get_max_trans_res
+#define xfs_log_sb libxfs_log_sb
+#define xfs_mode_to_ftype libxfs_mode_to_ftype
#define xfs_perag_get libxfs_perag_get
#define xfs_perag_put libxfs_perag_put
#define xfs_prealloc_blocks libxfs_prealloc_blocks
-#define xfs_dinode_good_version libxfs_dinode_good_version
-#define xfs_free_extent libxfs_free_extent
+#define xfs_refc_block libxfs_refc_block
#define xfs_refcountbt_init_cursor libxfs_refcountbt_init_cursor
-#define xfs_refcount_lookup_le libxfs_refcount_lookup_le
+#define xfs_refcountbt_maxrecs libxfs_refcountbt_maxrecs
#define xfs_refcount_get_rec libxfs_refcount_get_rec
-#define xfs_rmap_lookup_le_range libxfs_rmap_lookup_le_range
-#define xfs_agfl_size libxfs_agfl_size
-#define xfs_refc_block libxfs_refc_block
+#define xfs_refcount_lookup_le libxfs_refcount_lookup_le
+
+#define xfs_rmap_alloc libxfs_rmap_alloc
+#define xfs_rmapbt_init_cursor libxfs_rmapbt_init_cursor
+#define xfs_rmapbt_maxrecs libxfs_rmapbt_maxrecs
#define xfs_rmap_compare libxfs_rmap_compare
-#define xfs_default_ifork_ops libxfs_default_ifork_ops
-#define xfs_fs_geometry libxfs_fs_geometry
-#define xfs_init_local_fork libxfs_init_local_fork
-#define xfs_attr_namecheck libxfs_attr_namecheck
+#define xfs_rmap_get_rec libxfs_rmap_get_rec
+#define xfs_rmap_irec_offset_pack libxfs_rmap_irec_offset_pack
+#define xfs_rmap_irec_offset_unpack libxfs_rmap_irec_offset_unpack
+#define xfs_rmap_lookup_le libxfs_rmap_lookup_le
+#define xfs_rmap_lookup_le_range libxfs_rmap_lookup_le_range
+#define xfs_rmap_query_range libxfs_rmap_query_range
-#define LIBXFS_ATTR_ROOT ATTR_ROOT
-#define LIBXFS_ATTR_SECURE ATTR_SECURE
-#define LIBXFS_ATTR_CREATE ATTR_CREATE
-#define LIBXFS_ATTR_REPLACE ATTR_REPLACE
+#define xfs_rtfree_extent libxfs_rtfree_extent
+#define xfs_sb_from_disk libxfs_sb_from_disk
+#define xfs_sb_quota_from_disk libxfs_sb_quota_from_disk
+#define xfs_sb_to_disk libxfs_sb_to_disk
+#define xfs_symlink_blocks libxfs_symlink_blocks
+#define xfs_symlink_hdr_ok libxfs_symlink_hdr_ok
-#define xfs_ag_init_headers libxfs_ag_init_headers
-#define xfs_buf_delwri_submit libxfs_buf_delwri_submit
+#define xfs_trans_add_item libxfs_trans_add_item
+#define xfs_trans_alloc_empty libxfs_trans_alloc_empty
+#define xfs_trans_alloc libxfs_trans_alloc
+#define xfs_trans_bhold libxfs_trans_bhold
+#define xfs_trans_bhold_release libxfs_trans_bhold_release
+#define xfs_trans_binval libxfs_trans_binval
+#define xfs_trans_bjoin libxfs_trans_bjoin
+#define xfs_trans_brelse libxfs_trans_brelse
+#define xfs_trans_cancel libxfs_trans_cancel
+#define xfs_trans_commit libxfs_trans_commit
+#define xfs_trans_del_item libxfs_trans_del_item
+#define xfs_trans_dirty_buf libxfs_trans_dirty_buf
+#define xfs_trans_get_buf libxfs_trans_get_buf
+#define xfs_trans_get_buf_map libxfs_trans_get_buf_map
+#define xfs_trans_getsb libxfs_trans_getsb
+#define xfs_trans_ichgtime libxfs_trans_ichgtime
+#define xfs_trans_ijoin libxfs_trans_ijoin
+#define xfs_trans_init libxfs_trans_init
+#define xfs_trans_inode_alloc_buf libxfs_trans_inode_alloc_buf
+#define xfs_trans_log_buf libxfs_trans_log_buf
+#define xfs_trans_log_inode libxfs_trans_log_inode
+#define xfs_trans_mod_sb libxfs_trans_mod_sb
+#define xfs_trans_ordered_buf libxfs_trans_ordered_buf
+#define xfs_trans_read_buf libxfs_trans_read_buf
+#define xfs_trans_read_buf_map libxfs_trans_read_buf_map
+#define xfs_trans_resv_calc libxfs_trans_resv_calc
+#define xfs_trans_roll_inode libxfs_trans_roll_inode
+#define xfs_trans_roll libxfs_trans_roll
+
+#define xfs_verify_cksum libxfs_verify_cksum
+#define xfs_verify_ino libxfs_verify_ino
+#define xfs_verify_rtbno libxfs_verify_rtbno
+#define xfs_zero_extent libxfs_zero_extent
#endif /* __LIBXFS_API_DEFS_H__ */
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] libxfs: move header includes closer to kernelspace
2020-01-22 16:38 [PATCH 0/2] xfsprogs: libxfs cosmetic tidyups Eric Sandeen
2020-01-22 16:41 ` [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h Eric Sandeen
@ 2020-01-22 16:48 ` Eric Sandeen
2020-01-22 17:03 ` Darrick J. Wong
2020-01-25 23:15 ` Christoph Hellwig
1 sibling, 2 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-01-22 16:48 UTC (permalink / raw)
To: linux-xfs
Aid application of future kernel patches which change #includes;
not all headers exist in userspace so this is not a 1:1 match, but
it brings userspace files a bit closer to kernelspace by adding all
#includes which do match, and putting them in the same order.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/libxfs/xfs_ag_resv.c b/libxfs/xfs_ag_resv.c
index 1fe13bf4..530455a5 100644
--- a/libxfs/xfs_ag_resv.c
+++ b/libxfs/xfs_ag_resv.c
@@ -7,10 +7,13 @@
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
+#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_alloc.h"
+#include "xfs_errortag.h"
#include "xfs_trace.h"
+#include "xfs_trans.h"
#include "xfs_rmap_btree.h"
#include "xfs_btree.h"
#include "xfs_refcount_btree.h"
diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c
index 1d25d14f..ec233d0d 100644
--- a/libxfs/xfs_alloc.c
+++ b/libxfs/xfs_alloc.c
@@ -17,6 +17,7 @@
#include "xfs_rmap.h"
#include "xfs_alloc_btree.h"
#include "xfs_alloc.h"
+#include "xfs_errortag.h"
#include "xfs_trace.h"
#include "xfs_trans.h"
#include "xfs_ag_resv.h"
diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c
index d39c973a..57327deb 100644
--- a/libxfs/xfs_alloc_btree.c
+++ b/libxfs/xfs_alloc_btree.c
@@ -7,6 +7,7 @@
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
+#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_sb.h"
#include "xfs_mount.h"
@@ -14,6 +15,7 @@
#include "xfs_alloc_btree.h"
#include "xfs_alloc.h"
#include "xfs_trace.h"
+#include "xfs_trans.h"
STATIC struct xfs_btree_cur *
diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c
index 7f11de3e..219736ac 100644
--- a/libxfs/xfs_attr_leaf.c
+++ b/libxfs/xfs_attr_leaf.c
@@ -13,6 +13,7 @@
#include "xfs_sb.h"
#include "xfs_mount.h"
#include "xfs_da_format.h"
+#include "xfs_da_btree.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_bmap_btree.h"
diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c
index 0969f655..5efa2f0c 100644
--- a/libxfs/xfs_bmap.c
+++ b/libxfs/xfs_bmap.c
@@ -20,6 +20,7 @@
#include "xfs_alloc.h"
#include "xfs_bmap.h"
#include "xfs_bmap_btree.h"
+#include "xfs_errortag.h"
#include "xfs_trans_space.h"
#include "xfs_trace.h"
#include "xfs_attr_leaf.h"
diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c
index 08a7e4eb..aae1d30f 100644
--- a/libxfs/xfs_btree.c
+++ b/libxfs/xfs_btree.c
@@ -14,7 +14,9 @@
#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_btree.h"
+#include "xfs_errortag.h"
#include "xfs_trace.h"
+#include "xfs_alloc.h"
/*
* Cursor allocation zone.
diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c
index cff27a9b..c7a536ac 100644
--- a/libxfs/xfs_defer.c
+++ b/libxfs/xfs_defer.c
@@ -6,9 +6,13 @@
#include "libxfs_priv.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
+#include "xfs_format.h"
#include "xfs_log_format.h"
+#include "xfs_trans_resv.h"
+#include "xfs_mount.h"
#include "xfs_defer.h"
#include "xfs_trans.h"
+#include "xfs_inode.h"
#include "xfs_trace.h"
/*
diff --git a/libxfs/xfs_dir2.c b/libxfs/xfs_dir2.c
index 9a104a76..31ac89a3 100644
--- a/libxfs/xfs_dir2.c
+++ b/libxfs/xfs_dir2.c
@@ -15,6 +15,7 @@
#include "xfs_bmap.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
+#include "xfs_errortag.h"
#include "xfs_trace.h"
struct xfs_name xfs_name_dotdot = { (unsigned char *)"..", 2, XFS_DIR3_FT_DIR };
diff --git a/libxfs/xfs_dquot_buf.c b/libxfs/xfs_dquot_buf.c
index 4a175bc3..5b372a23 100644
--- a/libxfs/xfs_dquot_buf.c
+++ b/libxfs/xfs_dquot_buf.c
@@ -8,9 +8,12 @@
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
+#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_quota_defs.h"
+#include "xfs_inode.h"
+#include "xfs_trans.h"
int
xfs_calc_dquots_per_chunk(
diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
index 23bcc8c9..baa99551 100644
--- a/libxfs/xfs_ialloc.c
+++ b/libxfs/xfs_ialloc.c
@@ -17,6 +17,7 @@
#include "xfs_ialloc.h"
#include "xfs_ialloc_btree.h"
#include "xfs_alloc.h"
+#include "xfs_errortag.h"
#include "xfs_bmap.h"
#include "xfs_trans.h"
#include "xfs_trace.h"
diff --git a/libxfs/xfs_iext_tree.c b/libxfs/xfs_iext_tree.c
index 568fb33b..f68091dc 100644
--- a/libxfs/xfs_iext_tree.c
+++ b/libxfs/xfs_iext_tree.c
@@ -3,14 +3,14 @@
* Copyright (c) 2017 Christoph Hellwig.
*/
-// #include <linux/cache.h>
-// #include <linux/kernel.h>
-// #include <linux/slab.h>
#include "libxfs_priv.h"
+#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_bit.h"
#include "xfs_log_format.h"
#include "xfs_inode.h"
+#include "xfs_trans_resv.h"
+#include "xfs_mount.h"
#include "xfs_trace.h"
/*
diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c
index 4c90e198..c0cb5676 100644
--- a/libxfs/xfs_inode_buf.c
+++ b/libxfs/xfs_inode_buf.c
@@ -11,6 +11,7 @@
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_inode.h"
+#include "xfs_errortag.h"
#include "xfs_trans.h"
#include "xfs_ialloc.h"
#include "xfs_dir2.h"
diff --git a/libxfs/xfs_inode_fork.c b/libxfs/xfs_inode_fork.c
index a4b5686e..819faa63 100644
--- a/libxfs/xfs_inode_fork.c
+++ b/libxfs/xfs_inode_fork.c
@@ -3,6 +3,7 @@
* Copyright (c) 2000-2006 Silicon Graphics, Inc.
* All Rights Reserved.
*/
+
#include "libxfs_priv.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
@@ -21,7 +22,6 @@
#include "xfs_dir2_priv.h"
#include "xfs_attr_leaf.h"
-
kmem_zone_t *xfs_ifork_zone;
STATIC int xfs_iformat_local(xfs_inode_t *, xfs_dinode_t *, int, int);
diff --git a/libxfs/xfs_refcount.c b/libxfs/xfs_refcount.c
index 5149b0f7..71d29486 100644
--- a/libxfs/xfs_refcount.c
+++ b/libxfs/xfs_refcount.c
@@ -15,6 +15,7 @@
#include "xfs_bmap.h"
#include "xfs_refcount_btree.h"
#include "xfs_alloc.h"
+#include "xfs_errortag.h"
#include "xfs_trace.h"
#include "xfs_trans.h"
#include "xfs_bit.h"
diff --git a/libxfs/xfs_refcount_btree.c b/libxfs/xfs_refcount_btree.c
index a52b50c3..c1561325 100644
--- a/libxfs/xfs_refcount_btree.c
+++ b/libxfs/xfs_refcount_btree.c
@@ -16,6 +16,7 @@
#include "xfs_alloc.h"
#include "xfs_trace.h"
#include "xfs_trans.h"
+#include "xfs_bit.h"
#include "xfs_rmap.h"
static struct xfs_btree_cur *
diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c
index 69a14d66..10a17e41 100644
--- a/libxfs/xfs_rmap.c
+++ b/libxfs/xfs_rmap.c
@@ -18,6 +18,7 @@
#include "xfs_rmap.h"
#include "xfs_rmap_btree.h"
#include "xfs_trace.h"
+#include "xfs_errortag.h"
#include "xfs_inode.h"
/*
diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c
index f0b48a7d..5f3279d4 100644
--- a/libxfs/xfs_trans_resv.c
+++ b/libxfs/xfs_trans_resv.c
@@ -13,6 +13,7 @@
#include "xfs_mount.h"
#include "xfs_da_format.h"
#include "xfs_da_btree.h"
+#include "xfs_inode.h"
#include "xfs_bmap_btree.h"
#include "xfs_trans.h"
#include "xfs_trans_space.h"
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h
2020-01-22 16:41 ` [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h Eric Sandeen
@ 2020-01-22 17:02 ` Darrick J. Wong
2020-01-25 23:14 ` Christoph Hellwig
1 sibling, 0 replies; 10+ messages in thread
From: Darrick J. Wong @ 2020-01-22 17:02 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Wed, Jan 22, 2020 at 10:41:05AM -0600, Eric Sandeen wrote:
> Rather than randomly choosing locations for new #defines in the
> future, alphabetize the file now for consistency.
LOLWUT, sanity??
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/libxfs/libxfs_api_defs.h b/libxfs/libxfs_api_defs.h
> index eed63ace..33e52926 100644
> --- a/libxfs/libxfs_api_defs.h
> +++ b/libxfs/libxfs_api_defs.h
> @@ -13,164 +13,167 @@
> * it can be included in both the internal and external libxfs header files
> * without introducing any depenencies between the two.
> */
> -#define xfs_highbit32 libxfs_highbit32
> -#define xfs_highbit64 libxfs_highbit64
> -
> -#define xfs_trans_alloc libxfs_trans_alloc
> -#define xfs_trans_alloc_empty libxfs_trans_alloc_empty
> -#define xfs_trans_add_item libxfs_trans_add_item
> -#define xfs_trans_bhold libxfs_trans_bhold
> -#define xfs_trans_bhold_release libxfs_trans_bhold_release
> -#define xfs_trans_binval libxfs_trans_binval
> -#define xfs_trans_bjoin libxfs_trans_bjoin
> -#define xfs_trans_brelse libxfs_trans_brelse
> -#define xfs_trans_commit libxfs_trans_commit
> -#define xfs_trans_cancel libxfs_trans_cancel
> -#define xfs_trans_del_item libxfs_trans_del_item
> -#define xfs_trans_get_buf libxfs_trans_get_buf
> -#define xfs_trans_getsb libxfs_trans_getsb
> -#define xfs_trans_ichgtime libxfs_trans_ichgtime
> -#define xfs_trans_ijoin libxfs_trans_ijoin
> -#define xfs_trans_init libxfs_trans_init
> -#define xfs_trans_inode_alloc_buf libxfs_trans_inode_alloc_buf
> -#define xfs_trans_dirty_buf libxfs_trans_dirty_buf
> -#define xfs_trans_log_buf libxfs_trans_log_buf
> -#define xfs_trans_ordered_buf libxfs_trans_ordered_buf
> -#define xfs_trans_log_inode libxfs_trans_log_inode
> -#define xfs_trans_roll_inode libxfs_trans_roll_inode
> -#define xfs_trans_mod_sb libxfs_trans_mod_sb
> -#define xfs_trans_read_buf libxfs_trans_read_buf
> -#define xfs_trans_read_buf_map libxfs_trans_read_buf_map
> -#define xfs_trans_roll libxfs_trans_roll
> -#define xfs_trans_get_buf_map libxfs_trans_get_buf_map
> -#define xfs_trans_resv_calc libxfs_trans_resv_calc
> -#define xfs_log_get_max_trans_res libxfs_log_get_max_trans_res
> -#define xfs_attr_get libxfs_attr_get
> -#define xfs_attr_set libxfs_attr_set
> -#define xfs_attr_remove libxfs_attr_remove
> -#define xfs_attr_leaf_newentsize libxfs_attr_leaf_newentsize
> +#define LIBXFS_ATTR_CREATE ATTR_CREATE
> +#define LIBXFS_ATTR_REPLACE ATTR_REPLACE
> +#define LIBXFS_ATTR_ROOT ATTR_ROOT
> +#define LIBXFS_ATTR_SECURE ATTR_SECURE
>
> +#define xfs_agfl_size libxfs_agfl_size
> #define xfs_agfl_walk libxfs_agfl_walk
> +
> +#define xfs_ag_init_headers libxfs_ag_init_headers
> +
> +#define xfs_alloc_ag_max_usable libxfs_alloc_ag_max_usable
> +#define xfs_allocbt_maxrecs libxfs_allocbt_maxrecs
> #define xfs_alloc_fix_freelist libxfs_alloc_fix_freelist
> #define xfs_alloc_min_freelist libxfs_alloc_min_freelist
> #define xfs_alloc_read_agf libxfs_alloc_read_agf
> -#define xfs_bmap_last_offset libxfs_bmap_last_offset
> -#define xfs_iext_lookup_extent libxfs_iext_lookup_extent
> -#define xfs_bmapi_write libxfs_bmapi_write
> -#define xfs_bmapi_read libxfs_bmapi_read
> -#define xfs_bunmapi libxfs_bunmapi
> -#define xfs_rtfree_extent libxfs_rtfree_extent
> -#define xfs_verify_rtbno libxfs_verify_rtbno
> -#define xfs_verify_ino libxfs_verify_ino
> -#define xfs_zero_extent libxfs_zero_extent
>
> -#define xfs_defer_finish libxfs_defer_finish
> -#define xfs_defer_cancel libxfs_defer_cancel
> +#define xfs_attr_get libxfs_attr_get
> +#define xfs_attr_leaf_newentsize libxfs_attr_leaf_newentsize
> +#define xfs_attr_namecheck libxfs_attr_namecheck
> +#define xfs_attr_remove libxfs_attr_remove
> +#define xfs_attr_set libxfs_attr_set
>
> +#define xfs_bmapi_read libxfs_bmapi_read
> +#define xfs_bmapi_write libxfs_bmapi_write
> +#define xfs_bmap_last_offset libxfs_bmap_last_offset
> +#define xfs_bmbt_maxrecs libxfs_bmbt_maxrecs
> +#define xfs_bmdr_maxrecs libxfs_bmdr_maxrecs
> +
> +#define xfs_btree_del_cursor libxfs_btree_del_cursor
> +#define xfs_btree_init_block libxfs_btree_init_block
> +#define xfs_buf_delwri_submit libxfs_buf_delwri_submit
> +#define xfs_bunmapi libxfs_bunmapi
> +#define xfs_calc_dquots_per_chunk libxfs_calc_dquots_per_chunk
> +#define xfs_da3_node_hdr_from_disk libxfs_da3_node_hdr_from_disk
> +#define xfs_da_get_buf libxfs_da_get_buf
> #define xfs_da_hashname libxfs_da_hashname
> -#define xfs_da_shrink_inode libxfs_da_shrink_inode
> #define xfs_da_read_buf libxfs_da_read_buf
> -#define xfs_da3_node_hdr_from_disk libxfs_da3_node_hdr_from_disk
> -#define xfs_dir_createname libxfs_dir_createname
> -#define xfs_dir_init libxfs_dir_init
> -#define xfs_dir_lookup libxfs_dir_lookup
> -#define xfs_dir_replace libxfs_dir_replace
> +#define xfs_da_shrink_inode libxfs_da_shrink_inode
> +#define xfs_default_ifork_ops libxfs_default_ifork_ops
> +#define xfs_defer_cancel libxfs_defer_cancel
> +#define xfs_defer_finish libxfs_defer_finish
> +#define xfs_dinode_calc_crc libxfs_dinode_calc_crc
> +#define xfs_dinode_good_version libxfs_dinode_good_version
> +#define xfs_dinode_verify libxfs_dinode_verify
> +
> #define xfs_dir2_data_bestfree_p libxfs_dir2_data_bestfree_p
> -#define xfs_dir2_data_get_ftype libxfs_dir2_data_get_ftype
> -#define xfs_dir2_data_put_ftype libxfs_dir2_data_put_ftype
> -#define xfs_dir2_leaf_hdr_from_disk libxfs_dir2_leaf_hdr_from_disk
> -#define xfs_dir2_free_hdr_from_disk libxfs_dir2_free_hdr_from_disk
> -#define xfs_dir2_isblock libxfs_dir2_isblock
> -#define xfs_dir2_isleaf libxfs_dir2_isleaf
> +#define xfs_dir2_data_entry_tag_p libxfs_dir2_data_entry_tag_p
> +#define xfs_dir2_data_entsize libxfs_dir2_data_entsize
> #define xfs_dir2_data_freescan libxfs_dir2_data_freescan
> +#define xfs_dir2_data_get_ftype libxfs_dir2_data_get_ftype
> #define xfs_dir2_data_log_entry libxfs_dir2_data_log_entry
> #define xfs_dir2_data_log_header libxfs_dir2_data_log_header
> #define xfs_dir2_data_make_free libxfs_dir2_data_make_free
> +#define xfs_dir2_data_put_ftype libxfs_dir2_data_put_ftype
> #define xfs_dir2_data_use_free libxfs_dir2_data_use_free
> -#define xfs_dir2_data_entsize libxfs_dir2_data_entsize
> -#define xfs_dir2_data_entry_tag_p libxfs_dir2_data_entry_tag_p
> +#define xfs_dir2_free_hdr_from_disk libxfs_dir2_free_hdr_from_disk
> #define xfs_dir2_hashname libxfs_dir2_hashname
> -#define xfs_dir2_shrink_inode libxfs_dir2_shrink_inode
> -#define xfs_dir2_sf_get_parent_ino libxfs_dir2_sf_get_parent_ino
> -#define xfs_dir2_sf_put_parent_ino libxfs_dir2_sf_put_parent_ino
> +#define xfs_dir2_isblock libxfs_dir2_isblock
> +#define xfs_dir2_isleaf libxfs_dir2_isleaf
> +#define xfs_dir2_leaf_hdr_from_disk libxfs_dir2_leaf_hdr_from_disk
> +#define xfs_dir2_namecheck libxfs_dir2_namecheck
> #define xfs_dir2_sf_entsize libxfs_dir2_sf_entsize
> -#define xfs_dir2_sf_nextentry libxfs_dir2_sf_nextentry
> #define xfs_dir2_sf_get_ftype libxfs_dir2_sf_get_ftype
> -#define xfs_dir2_sf_put_ftype libxfs_dir2_sf_put_ftype
> #define xfs_dir2_sf_get_ino libxfs_dir2_sf_get_ino
> +#define xfs_dir2_sf_get_parent_ino libxfs_dir2_sf_get_parent_ino
> +#define xfs_dir2_sf_nextentry libxfs_dir2_sf_nextentry
> +#define xfs_dir2_sf_put_ftype libxfs_dir2_sf_put_ftype
> #define xfs_dir2_sf_put_ino libxfs_dir2_sf_put_ino
> -#define xfs_dir2_namecheck libxfs_dir2_namecheck
> -#define xfs_da_get_buf libxfs_da_get_buf
> -
> -#define xfs_inode_from_disk libxfs_inode_from_disk
> -#define xfs_inode_to_disk libxfs_inode_to_disk
> -#define xfs_dinode_calc_crc libxfs_dinode_calc_crc
> -#define xfs_idata_realloc libxfs_idata_realloc
> -#define xfs_idestroy_fork libxfs_idestroy_fork
> -#define xfs_inode_validate_extsize libxfs_inode_validate_extsize
> -#define xfs_inode_validate_cowextsize libxfs_inode_validate_cowextsize
> -
> -#define xfs_rmap_alloc libxfs_rmap_alloc
> -#define xfs_rmap_query_range libxfs_rmap_query_range
> -#define xfs_rmap_lookup_le libxfs_rmap_lookup_le
> -#define xfs_rmap_get_rec libxfs_rmap_get_rec
> -#define xfs_rmap_irec_offset_pack libxfs_rmap_irec_offset_pack
> -#define xfs_rmap_irec_offset_unpack libxfs_rmap_irec_offset_unpack
> -#define xfs_rmapbt_init_cursor libxfs_rmapbt_init_cursor
> -#define xfs_btree_del_cursor libxfs_btree_del_cursor
> -#define xfs_mode_to_ftype libxfs_mode_to_ftype
> +#define xfs_dir2_sf_put_parent_ino libxfs_dir2_sf_put_parent_ino
> +#define xfs_dir2_shrink_inode libxfs_dir2_shrink_inode
>
> -#define xfs_log_sb libxfs_log_sb
> -#define xfs_sb_from_disk libxfs_sb_from_disk
> -#define xfs_sb_quota_from_disk libxfs_sb_quota_from_disk
> -#define xfs_sb_to_disk libxfs_sb_to_disk
> +#define xfs_dir_createname libxfs_dir_createname
> +#define xfs_dir_init libxfs_dir_init
> +#define xfs_dir_ino_validate libxfs_dir_ino_validate
> +#define xfs_dir_lookup libxfs_dir_lookup
> +#define xfs_dir_replace libxfs_dir_replace
>
> -#define xfs_calc_dquots_per_chunk libxfs_calc_dquots_per_chunk
> -#define xfs_dquot_verify libxfs_dquot_verify
> #define xfs_dqblk_repair libxfs_dqblk_repair
> +#define xfs_dquot_verify libxfs_dquot_verify
>
> -#define xfs_symlink_blocks libxfs_symlink_blocks
> -#define xfs_symlink_hdr_ok libxfs_symlink_hdr_ok
> -
> -#define xfs_verify_cksum libxfs_verify_cksum
> -#define xfs_dinode_verify libxfs_dinode_verify
> -
> -#define xfs_alloc_ag_max_usable libxfs_alloc_ag_max_usable
> -#define xfs_allocbt_maxrecs libxfs_allocbt_maxrecs
> -#define xfs_bmbt_maxrecs libxfs_bmbt_maxrecs
> -#define xfs_bmdr_maxrecs libxfs_bmdr_maxrecs
> -#define xfs_btree_init_block libxfs_btree_init_block
> -#define xfs_dir_ino_validate libxfs_dir_ino_validate
> +#define xfs_free_extent libxfs_free_extent
> +#define xfs_fs_geometry libxfs_fs_geometry
> +#define xfs_highbit32 libxfs_highbit32
> +#define xfs_highbit64 libxfs_highbit64
> +#define xfs_idata_realloc libxfs_idata_realloc
> +#define xfs_idestroy_fork libxfs_idestroy_fork
> +#define xfs_iext_lookup_extent libxfs_iext_lookup_extent
> #define xfs_initialize_perag_data libxfs_initialize_perag_data
> +#define xfs_init_local_fork libxfs_init_local_fork
> +
> #define xfs_inobt_maxrecs libxfs_inobt_maxrecs
> -#define xfs_rmapbt_maxrecs libxfs_rmapbt_maxrecs
> -#define xfs_refcountbt_maxrecs libxfs_refcountbt_maxrecs
> +#define xfs_inode_from_disk libxfs_inode_from_disk
> +#define xfs_inode_to_disk libxfs_inode_to_disk
> +#define xfs_inode_validate_cowextsize libxfs_inode_validate_cowextsize
> +#define xfs_inode_validate_extsize libxfs_inode_validate_extsize
> +
> #define xfs_iread_extents libxfs_iread_extents
> #define xfs_log_calc_minimum_size libxfs_log_calc_minimum_size
> +#define xfs_log_get_max_trans_res libxfs_log_get_max_trans_res
> +#define xfs_log_sb libxfs_log_sb
> +#define xfs_mode_to_ftype libxfs_mode_to_ftype
> #define xfs_perag_get libxfs_perag_get
> #define xfs_perag_put libxfs_perag_put
> #define xfs_prealloc_blocks libxfs_prealloc_blocks
> -#define xfs_dinode_good_version libxfs_dinode_good_version
> -#define xfs_free_extent libxfs_free_extent
>
> +#define xfs_refc_block libxfs_refc_block
> #define xfs_refcountbt_init_cursor libxfs_refcountbt_init_cursor
> -#define xfs_refcount_lookup_le libxfs_refcount_lookup_le
> +#define xfs_refcountbt_maxrecs libxfs_refcountbt_maxrecs
> #define xfs_refcount_get_rec libxfs_refcount_get_rec
> -#define xfs_rmap_lookup_le_range libxfs_rmap_lookup_le_range
> -#define xfs_agfl_size libxfs_agfl_size
> -#define xfs_refc_block libxfs_refc_block
> +#define xfs_refcount_lookup_le libxfs_refcount_lookup_le
> +
> +#define xfs_rmap_alloc libxfs_rmap_alloc
> +#define xfs_rmapbt_init_cursor libxfs_rmapbt_init_cursor
> +#define xfs_rmapbt_maxrecs libxfs_rmapbt_maxrecs
> #define xfs_rmap_compare libxfs_rmap_compare
> -#define xfs_default_ifork_ops libxfs_default_ifork_ops
> -#define xfs_fs_geometry libxfs_fs_geometry
> -#define xfs_init_local_fork libxfs_init_local_fork
> -#define xfs_attr_namecheck libxfs_attr_namecheck
> +#define xfs_rmap_get_rec libxfs_rmap_get_rec
> +#define xfs_rmap_irec_offset_pack libxfs_rmap_irec_offset_pack
> +#define xfs_rmap_irec_offset_unpack libxfs_rmap_irec_offset_unpack
> +#define xfs_rmap_lookup_le libxfs_rmap_lookup_le
> +#define xfs_rmap_lookup_le_range libxfs_rmap_lookup_le_range
> +#define xfs_rmap_query_range libxfs_rmap_query_range
>
> -#define LIBXFS_ATTR_ROOT ATTR_ROOT
> -#define LIBXFS_ATTR_SECURE ATTR_SECURE
> -#define LIBXFS_ATTR_CREATE ATTR_CREATE
> -#define LIBXFS_ATTR_REPLACE ATTR_REPLACE
> +#define xfs_rtfree_extent libxfs_rtfree_extent
> +#define xfs_sb_from_disk libxfs_sb_from_disk
> +#define xfs_sb_quota_from_disk libxfs_sb_quota_from_disk
> +#define xfs_sb_to_disk libxfs_sb_to_disk
> +#define xfs_symlink_blocks libxfs_symlink_blocks
> +#define xfs_symlink_hdr_ok libxfs_symlink_hdr_ok
>
> -#define xfs_ag_init_headers libxfs_ag_init_headers
> -#define xfs_buf_delwri_submit libxfs_buf_delwri_submit
> +#define xfs_trans_add_item libxfs_trans_add_item
> +#define xfs_trans_alloc_empty libxfs_trans_alloc_empty
> +#define xfs_trans_alloc libxfs_trans_alloc
> +#define xfs_trans_bhold libxfs_trans_bhold
> +#define xfs_trans_bhold_release libxfs_trans_bhold_release
> +#define xfs_trans_binval libxfs_trans_binval
> +#define xfs_trans_bjoin libxfs_trans_bjoin
> +#define xfs_trans_brelse libxfs_trans_brelse
> +#define xfs_trans_cancel libxfs_trans_cancel
> +#define xfs_trans_commit libxfs_trans_commit
> +#define xfs_trans_del_item libxfs_trans_del_item
> +#define xfs_trans_dirty_buf libxfs_trans_dirty_buf
> +#define xfs_trans_get_buf libxfs_trans_get_buf
> +#define xfs_trans_get_buf_map libxfs_trans_get_buf_map
> +#define xfs_trans_getsb libxfs_trans_getsb
> +#define xfs_trans_ichgtime libxfs_trans_ichgtime
> +#define xfs_trans_ijoin libxfs_trans_ijoin
> +#define xfs_trans_init libxfs_trans_init
> +#define xfs_trans_inode_alloc_buf libxfs_trans_inode_alloc_buf
> +#define xfs_trans_log_buf libxfs_trans_log_buf
> +#define xfs_trans_log_inode libxfs_trans_log_inode
> +#define xfs_trans_mod_sb libxfs_trans_mod_sb
> +#define xfs_trans_ordered_buf libxfs_trans_ordered_buf
> +#define xfs_trans_read_buf libxfs_trans_read_buf
> +#define xfs_trans_read_buf_map libxfs_trans_read_buf_map
> +#define xfs_trans_resv_calc libxfs_trans_resv_calc
> +#define xfs_trans_roll_inode libxfs_trans_roll_inode
> +#define xfs_trans_roll libxfs_trans_roll
> +
> +#define xfs_verify_cksum libxfs_verify_cksum
> +#define xfs_verify_ino libxfs_verify_ino
> +#define xfs_verify_rtbno libxfs_verify_rtbno
> +#define xfs_zero_extent libxfs_zero_extent
>
> #endif /* __LIBXFS_API_DEFS_H__ */
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] libxfs: move header includes closer to kernelspace
2020-01-22 16:48 ` [PATCH 2/2] libxfs: move header includes closer to kernelspace Eric Sandeen
@ 2020-01-22 17:03 ` Darrick J. Wong
2020-01-25 23:15 ` Christoph Hellwig
1 sibling, 0 replies; 10+ messages in thread
From: Darrick J. Wong @ 2020-01-22 17:03 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Wed, Jan 22, 2020 at 10:48:51AM -0600, Eric Sandeen wrote:
> Aid application of future kernel patches which change #includes;
> not all headers exist in userspace so this is not a 1:1 match, but
> it brings userspace files a bit closer to kernelspace by adding all
> #includes which do match, and putting them in the same order.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Assuming gcc reviewed this and didn't barf up errors everywhere,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
>
> diff --git a/libxfs/xfs_ag_resv.c b/libxfs/xfs_ag_resv.c
> index 1fe13bf4..530455a5 100644
> --- a/libxfs/xfs_ag_resv.c
> +++ b/libxfs/xfs_ag_resv.c
> @@ -7,10 +7,13 @@
> #include "xfs_fs.h"
> #include "xfs_shared.h"
> #include "xfs_format.h"
> +#include "xfs_log_format.h"
> #include "xfs_trans_resv.h"
> #include "xfs_mount.h"
> #include "xfs_alloc.h"
> +#include "xfs_errortag.h"
> #include "xfs_trace.h"
> +#include "xfs_trans.h"
> #include "xfs_rmap_btree.h"
> #include "xfs_btree.h"
> #include "xfs_refcount_btree.h"
> diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c
> index 1d25d14f..ec233d0d 100644
> --- a/libxfs/xfs_alloc.c
> +++ b/libxfs/xfs_alloc.c
> @@ -17,6 +17,7 @@
> #include "xfs_rmap.h"
> #include "xfs_alloc_btree.h"
> #include "xfs_alloc.h"
> +#include "xfs_errortag.h"
> #include "xfs_trace.h"
> #include "xfs_trans.h"
> #include "xfs_ag_resv.h"
> diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c
> index d39c973a..57327deb 100644
> --- a/libxfs/xfs_alloc_btree.c
> +++ b/libxfs/xfs_alloc_btree.c
> @@ -7,6 +7,7 @@
> #include "xfs_fs.h"
> #include "xfs_shared.h"
> #include "xfs_format.h"
> +#include "xfs_log_format.h"
> #include "xfs_trans_resv.h"
> #include "xfs_sb.h"
> #include "xfs_mount.h"
> @@ -14,6 +15,7 @@
> #include "xfs_alloc_btree.h"
> #include "xfs_alloc.h"
> #include "xfs_trace.h"
> +#include "xfs_trans.h"
>
>
> STATIC struct xfs_btree_cur *
> diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c
> index 7f11de3e..219736ac 100644
> --- a/libxfs/xfs_attr_leaf.c
> +++ b/libxfs/xfs_attr_leaf.c
> @@ -13,6 +13,7 @@
> #include "xfs_sb.h"
> #include "xfs_mount.h"
> #include "xfs_da_format.h"
> +#include "xfs_da_btree.h"
> #include "xfs_inode.h"
> #include "xfs_trans.h"
> #include "xfs_bmap_btree.h"
> diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c
> index 0969f655..5efa2f0c 100644
> --- a/libxfs/xfs_bmap.c
> +++ b/libxfs/xfs_bmap.c
> @@ -20,6 +20,7 @@
> #include "xfs_alloc.h"
> #include "xfs_bmap.h"
> #include "xfs_bmap_btree.h"
> +#include "xfs_errortag.h"
> #include "xfs_trans_space.h"
> #include "xfs_trace.h"
> #include "xfs_attr_leaf.h"
> diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c
> index 08a7e4eb..aae1d30f 100644
> --- a/libxfs/xfs_btree.c
> +++ b/libxfs/xfs_btree.c
> @@ -14,7 +14,9 @@
> #include "xfs_inode.h"
> #include "xfs_trans.h"
> #include "xfs_btree.h"
> +#include "xfs_errortag.h"
> #include "xfs_trace.h"
> +#include "xfs_alloc.h"
>
> /*
> * Cursor allocation zone.
> diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c
> index cff27a9b..c7a536ac 100644
> --- a/libxfs/xfs_defer.c
> +++ b/libxfs/xfs_defer.c
> @@ -6,9 +6,13 @@
> #include "libxfs_priv.h"
> #include "xfs_fs.h"
> #include "xfs_shared.h"
> +#include "xfs_format.h"
> #include "xfs_log_format.h"
> +#include "xfs_trans_resv.h"
> +#include "xfs_mount.h"
> #include "xfs_defer.h"
> #include "xfs_trans.h"
> +#include "xfs_inode.h"
> #include "xfs_trace.h"
>
> /*
> diff --git a/libxfs/xfs_dir2.c b/libxfs/xfs_dir2.c
> index 9a104a76..31ac89a3 100644
> --- a/libxfs/xfs_dir2.c
> +++ b/libxfs/xfs_dir2.c
> @@ -15,6 +15,7 @@
> #include "xfs_bmap.h"
> #include "xfs_dir2.h"
> #include "xfs_dir2_priv.h"
> +#include "xfs_errortag.h"
> #include "xfs_trace.h"
>
> struct xfs_name xfs_name_dotdot = { (unsigned char *)"..", 2, XFS_DIR3_FT_DIR };
> diff --git a/libxfs/xfs_dquot_buf.c b/libxfs/xfs_dquot_buf.c
> index 4a175bc3..5b372a23 100644
> --- a/libxfs/xfs_dquot_buf.c
> +++ b/libxfs/xfs_dquot_buf.c
> @@ -8,9 +8,12 @@
> #include "xfs_fs.h"
> #include "xfs_shared.h"
> #include "xfs_format.h"
> +#include "xfs_log_format.h"
> #include "xfs_trans_resv.h"
> #include "xfs_mount.h"
> #include "xfs_quota_defs.h"
> +#include "xfs_inode.h"
> +#include "xfs_trans.h"
>
> int
> xfs_calc_dquots_per_chunk(
> diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
> index 23bcc8c9..baa99551 100644
> --- a/libxfs/xfs_ialloc.c
> +++ b/libxfs/xfs_ialloc.c
> @@ -17,6 +17,7 @@
> #include "xfs_ialloc.h"
> #include "xfs_ialloc_btree.h"
> #include "xfs_alloc.h"
> +#include "xfs_errortag.h"
> #include "xfs_bmap.h"
> #include "xfs_trans.h"
> #include "xfs_trace.h"
> diff --git a/libxfs/xfs_iext_tree.c b/libxfs/xfs_iext_tree.c
> index 568fb33b..f68091dc 100644
> --- a/libxfs/xfs_iext_tree.c
> +++ b/libxfs/xfs_iext_tree.c
> @@ -3,14 +3,14 @@
> * Copyright (c) 2017 Christoph Hellwig.
> */
>
> -// #include <linux/cache.h>
> -// #include <linux/kernel.h>
> -// #include <linux/slab.h>
> #include "libxfs_priv.h"
> +#include "xfs_shared.h"
> #include "xfs_format.h"
> #include "xfs_bit.h"
> #include "xfs_log_format.h"
> #include "xfs_inode.h"
> +#include "xfs_trans_resv.h"
> +#include "xfs_mount.h"
> #include "xfs_trace.h"
>
> /*
> diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c
> index 4c90e198..c0cb5676 100644
> --- a/libxfs/xfs_inode_buf.c
> +++ b/libxfs/xfs_inode_buf.c
> @@ -11,6 +11,7 @@
> #include "xfs_trans_resv.h"
> #include "xfs_mount.h"
> #include "xfs_inode.h"
> +#include "xfs_errortag.h"
> #include "xfs_trans.h"
> #include "xfs_ialloc.h"
> #include "xfs_dir2.h"
> diff --git a/libxfs/xfs_inode_fork.c b/libxfs/xfs_inode_fork.c
> index a4b5686e..819faa63 100644
> --- a/libxfs/xfs_inode_fork.c
> +++ b/libxfs/xfs_inode_fork.c
> @@ -3,6 +3,7 @@
> * Copyright (c) 2000-2006 Silicon Graphics, Inc.
> * All Rights Reserved.
> */
> +
> #include "libxfs_priv.h"
> #include "xfs_fs.h"
> #include "xfs_shared.h"
> @@ -21,7 +22,6 @@
> #include "xfs_dir2_priv.h"
> #include "xfs_attr_leaf.h"
>
> -
> kmem_zone_t *xfs_ifork_zone;
>
> STATIC int xfs_iformat_local(xfs_inode_t *, xfs_dinode_t *, int, int);
> diff --git a/libxfs/xfs_refcount.c b/libxfs/xfs_refcount.c
> index 5149b0f7..71d29486 100644
> --- a/libxfs/xfs_refcount.c
> +++ b/libxfs/xfs_refcount.c
> @@ -15,6 +15,7 @@
> #include "xfs_bmap.h"
> #include "xfs_refcount_btree.h"
> #include "xfs_alloc.h"
> +#include "xfs_errortag.h"
> #include "xfs_trace.h"
> #include "xfs_trans.h"
> #include "xfs_bit.h"
> diff --git a/libxfs/xfs_refcount_btree.c b/libxfs/xfs_refcount_btree.c
> index a52b50c3..c1561325 100644
> --- a/libxfs/xfs_refcount_btree.c
> +++ b/libxfs/xfs_refcount_btree.c
> @@ -16,6 +16,7 @@
> #include "xfs_alloc.h"
> #include "xfs_trace.h"
> #include "xfs_trans.h"
> +#include "xfs_bit.h"
> #include "xfs_rmap.h"
>
> static struct xfs_btree_cur *
> diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c
> index 69a14d66..10a17e41 100644
> --- a/libxfs/xfs_rmap.c
> +++ b/libxfs/xfs_rmap.c
> @@ -18,6 +18,7 @@
> #include "xfs_rmap.h"
> #include "xfs_rmap_btree.h"
> #include "xfs_trace.h"
> +#include "xfs_errortag.h"
> #include "xfs_inode.h"
>
> /*
> diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c
> index f0b48a7d..5f3279d4 100644
> --- a/libxfs/xfs_trans_resv.c
> +++ b/libxfs/xfs_trans_resv.c
> @@ -13,6 +13,7 @@
> #include "xfs_mount.h"
> #include "xfs_da_format.h"
> #include "xfs_da_btree.h"
> +#include "xfs_inode.h"
> #include "xfs_bmap_btree.h"
> #include "xfs_trans.h"
> #include "xfs_trans_space.h"
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h
2020-01-22 16:41 ` [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h Eric Sandeen
2020-01-22 17:02 ` Darrick J. Wong
@ 2020-01-25 23:14 ` Christoph Hellwig
2020-01-26 22:09 ` Darrick J. Wong
2020-01-27 15:28 ` Eric Sandeen
1 sibling, 2 replies; 10+ messages in thread
From: Christoph Hellwig @ 2020-01-25 23:14 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Wed, Jan 22, 2020 at 10:41:05AM -0600, Eric Sandeen wrote:
> Rather than randomly choosing locations for new #defines in the
> future, alphabetize the file now for consistency.
This looks ok, but can we just kill off the stupid libxfs_ aliases
instead? They add absolutely no value. I volunteer to do the work.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] libxfs: move header includes closer to kernelspace
2020-01-22 16:48 ` [PATCH 2/2] libxfs: move header includes closer to kernelspace Eric Sandeen
2020-01-22 17:03 ` Darrick J. Wong
@ 2020-01-25 23:15 ` Christoph Hellwig
2020-01-27 15:29 ` Eric Sandeen
1 sibling, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2020-01-25 23:15 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Wed, Jan 22, 2020 at 10:48:51AM -0600, Eric Sandeen wrote:
> Aid application of future kernel patches which change #includes;
> not all headers exist in userspace so this is not a 1:1 match, but
> it brings userspace files a bit closer to kernelspace by adding all
> #includes which do match, and putting them in the same order.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
Given how our headers are such a mess I wonder if we should reduce them
to something like just a handful. Life would become a lot simpler..
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h
2020-01-25 23:14 ` Christoph Hellwig
@ 2020-01-26 22:09 ` Darrick J. Wong
2020-01-27 15:28 ` Eric Sandeen
1 sibling, 0 replies; 10+ messages in thread
From: Darrick J. Wong @ 2020-01-26 22:09 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Eric Sandeen, linux-xfs
On Sat, Jan 25, 2020 at 03:14:43PM -0800, Christoph Hellwig wrote:
> On Wed, Jan 22, 2020 at 10:41:05AM -0600, Eric Sandeen wrote:
> > Rather than randomly choosing locations for new #defines in the
> > future, alphabetize the file now for consistency.
>
> This looks ok, but can we just kill off the stupid libxfs_ aliases
> instead? They add absolutely no value. I volunteer to do the work.
About the only use I have for them is xfs/437 which checks that we
actually use the libxfs names and that we invert error codes correctly.
So if you're going to kill the libxfs_* aliases you might as well make
the error code sign consistent too.
--D
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h
2020-01-25 23:14 ` Christoph Hellwig
2020-01-26 22:09 ` Darrick J. Wong
@ 2020-01-27 15:28 ` Eric Sandeen
1 sibling, 0 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-01-27 15:28 UTC (permalink / raw)
To: Christoph Hellwig, Eric Sandeen; +Cc: linux-xfs
On 1/25/20 5:14 PM, Christoph Hellwig wrote:
> On Wed, Jan 22, 2020 at 10:41:05AM -0600, Eric Sandeen wrote:
>> Rather than randomly choosing locations for new #defines in the
>> future, alphabetize the file now for consistency.
>
> This looks ok, but can we just kill off the stupid libxfs_ aliases
> instead? They add absolutely no value. I volunteer to do the work.
No disagreement from me but dchinner may have thoughts.
I don't see any benefit either, and it's definitely additional cost.
-Eric
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] libxfs: move header includes closer to kernelspace
2020-01-25 23:15 ` Christoph Hellwig
@ 2020-01-27 15:29 ` Eric Sandeen
0 siblings, 0 replies; 10+ messages in thread
From: Eric Sandeen @ 2020-01-27 15:29 UTC (permalink / raw)
To: Christoph Hellwig, Eric Sandeen; +Cc: linux-xfs
On 1/25/20 5:15 PM, Christoph Hellwig wrote:
> On Wed, Jan 22, 2020 at 10:48:51AM -0600, Eric Sandeen wrote:
>> Aid application of future kernel patches which change #includes;
>> not all headers exist in userspace so this is not a 1:1 match, but
>> it brings userspace files a bit closer to kernelspace by adding all
>> #includes which do match, and putting them in the same order.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Given how our headers are such a mess I wonder if we should reduce them
> to something like just a handful. Life would become a lot simpler..
IIRC we explicitly moved away from that at one point. *shrug* not sure
what the best approach is but I don't want to keep oscillating.
-Eric
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-01-27 15:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 16:38 [PATCH 0/2] xfsprogs: libxfs cosmetic tidyups Eric Sandeen
2020-01-22 16:41 ` [PATCH 1/2] xfsprogs: alphabetize libxfs_api_defs.h Eric Sandeen
2020-01-22 17:02 ` Darrick J. Wong
2020-01-25 23:14 ` Christoph Hellwig
2020-01-26 22:09 ` Darrick J. Wong
2020-01-27 15:28 ` Eric Sandeen
2020-01-22 16:48 ` [PATCH 2/2] libxfs: move header includes closer to kernelspace Eric Sandeen
2020-01-22 17:03 ` Darrick J. Wong
2020-01-25 23:15 ` Christoph Hellwig
2020-01-27 15:29 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).