]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
libxfs: export attr3_leaf_hdr_from_disk via libxfs_api_defs.h
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:21:23 +0000 (14:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 9 Jul 2024 22:37:02 +0000 (15:37 -0700)
Do the xfs -> libxfs switcheroo and cleanups separately so the next
patch doesn't become an even larger mess.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/attr.c
db/metadump.c
libxfs/libxfs_api_defs.h
repair/attr_repair.c

index 3b556c43def5e296362db63fc73a607821dae073..0b1f498e457cd4be16469aaa477125b0a7b97484 100644 (file)
--- a/db/attr.c
+++ b/db/attr.c
@@ -248,7 +248,7 @@ attr_leaf_entry_walk(
                return 0;
 
        off = byteize(startoff);
-       xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf);
+       libxfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf);
        entries = xfs_attr3_leaf_entryp(leaf);
 
        for (i = 0; i < leafhdr.count; i++) {
index e95238fb047165a5df5ef01195e8673cfff57832..424544f9f032240c7b019fa6827d18eff83d78ef 100644 (file)
@@ -1680,7 +1680,7 @@ process_attr_block(
        }
 
        /* Ok, it's a leaf - get header; accounts for crc & non-crc */
-       xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &hdr, leaf);
+       libxfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &hdr, leaf);
 
        nentries = hdr.count;
        if (nentries == 0 ||
index c3dde15116c45194214cef3b4abe3c15437fb164..5713e5221fe689bc6bcd76408c88493daea91c12 100644 (file)
 
 #define xfs_ascii_ci_hashname          libxfs_ascii_ci_hashname
 
+#define xfs_attr3_leaf_hdr_from_disk   libxfs_attr3_leaf_hdr_from_disk
+#define xfs_attr3_leaf_read            libxfs_attr3_leaf_read
 #define xfs_attr_check_namespace       libxfs_attr_check_namespace
 #define xfs_attr_get                   libxfs_attr_get
 #define xfs_attr_hashname              libxfs_attr_hashname
 #define xfs_attr_hashval               libxfs_attr_hashval
+#define xfs_attr_is_leaf               libxfs_attr_is_leaf
 #define xfs_attr_leaf_newentsize       libxfs_attr_leaf_newentsize
 #define xfs_attr_namecheck             libxfs_attr_namecheck
 #define xfs_attr_set                   libxfs_attr_set
 #define xfs_compute_rextslog           libxfs_compute_rextslog
 #define xfs_create_space_res           libxfs_create_space_res
 #define xfs_da3_node_hdr_from_disk     libxfs_da3_node_hdr_from_disk
+#define xfs_da3_node_read              libxfs_da3_node_read
 #define xfs_da_get_buf                 libxfs_da_get_buf
 #define xfs_da_hashname                        libxfs_da_hashname
 #define xfs_da_read_buf                        libxfs_da_read_buf
 #define xfs_inobt_stage_cursor         libxfs_inobt_stage_cursor
 #define xfs_inode_from_disk            libxfs_inode_from_disk
 #define xfs_inode_from_disk_ts         libxfs_inode_from_disk_ts
+#define xfs_inode_hasattr              libxfs_inode_hasattr
 #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
index 8321c9b679b2f81601af0024f41ad3b0413305ee..2e97fd9775ba38a9b3da3ad1755c6b2fe51b1fed 100644 (file)
@@ -610,7 +610,7 @@ process_leaf_attr_block(
        da_freemap_t *attr_freemap;
        struct xfs_attr3_icleaf_hdr leafhdr;
 
-       xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf);
+       libxfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf);
        clearit = usedbs = 0;
        firstb = mp->m_sb.sb_blocksize;
        stop = xfs_attr3_leaf_hdr_size(leaf);
@@ -849,7 +849,7 @@ process_leaf_attr_level(xfs_mount_t *mp,
                }
 
                leaf = bp->b_addr;
-               xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf);
+               libxfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, leaf);
 
                /* check magic number for leaf directory btree block */
                if (!(leafhdr.magic == XFS_ATTR_LEAF_MAGIC ||
@@ -1052,7 +1052,7 @@ process_longform_leaf_root(
         * check sibling pointers in leaf block or root block 0 before
         * we have to release the btree block
         */
-       xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, bp->b_addr);
+       libxfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &leafhdr, bp->b_addr);
        if (leafhdr.forw != 0 || leafhdr.back != 0)  {
                if (!no_modify)  {
                        do_warn(