libxfs: export attr3_leaf_hdr_from_disk via libxfs_api_defs.h
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>
diff --git a/db/attr.c b/db/attr.c
index 9e7bbd1..95969d1 100644
--- a/db/attr.c
+++ b/db/attr.c
@@ -256,7 +256,7 @@
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++) {
diff --git a/db/metadump.c b/db/metadump.c
index e1b7078..eee7249 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -1682,7 +1682,7 @@
}
/* 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 ||
diff --git a/libxfs/libxfs_api_defs.h b/libxfs/libxfs_api_defs.h
index 11bde30..13242b1 100644
--- a/libxfs/libxfs_api_defs.h
+++ b/libxfs/libxfs_api_defs.h
@@ -33,6 +33,7 @@
#define xfs_alloc_read_agf libxfs_alloc_read_agf
#define xfs_alloc_vextent libxfs_alloc_vextent
+#define xfs_attr3_leaf_hdr_from_disk libxfs_attr3_leaf_hdr_from_disk
#define xfs_attr_get libxfs_attr_get
#define xfs_attr_leaf_newentsize libxfs_attr_leaf_newentsize
#define xfs_attr_namecheck libxfs_attr_namecheck
diff --git a/repair/attr_repair.c b/repair/attr_repair.c
index afe8073..d3fd7a4 100644
--- a/repair/attr_repair.c
+++ b/repair/attr_repair.c
@@ -579,7 +579,7 @@
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);
@@ -802,7 +802,7 @@
}
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 ||
@@ -1000,7 +1000,7 @@
* 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(