aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 11:46:23 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 11:47:16 -0500
commit66e3237e724c6650dca03627b40bb00a812d3f7a (patch)
tree84a31606547b538fb2e8fb4dd5b732f0444c53fb /fs/xfs/libxfs
parent02b100fb83f9b0f8719deef6c4ed973b4d9ce00c (diff)
xfs: const-ify xfs_owner_info arguments
Only certain functions actually change the contents of an xfs_owner_info; the rest can accept a const struct pointer. This will enable us to save stack space by hoisting static owner info types to be const global variables. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c68
-rw-r--r--fs/xfs/libxfs/xfs_alloc.h4
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c2
-rw-r--r--fs/xfs/libxfs/xfs_bmap.h4
-rw-r--r--fs/xfs/libxfs/xfs_rmap.c212
-rw-r--r--fs/xfs/libxfs/xfs_rmap.h20
6 files changed, 155 insertions, 155 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index 4be387de8294..e9eb4b2768f2 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -1694,28 +1694,28 @@ error0:
1694 */ 1694 */
1695STATIC int 1695STATIC int
1696xfs_free_ag_extent( 1696xfs_free_ag_extent(
1697 xfs_trans_t *tp, 1697 struct xfs_trans *tp,
1698 xfs_buf_t *agbp, 1698 struct xfs_buf *agbp,
1699 xfs_agnumber_t agno, 1699 xfs_agnumber_t agno,
1700 xfs_agblock_t bno, 1700 xfs_agblock_t bno,
1701 xfs_extlen_t len, 1701 xfs_extlen_t len,
1702 struct xfs_owner_info *oinfo, 1702 const struct xfs_owner_info *oinfo,
1703 enum xfs_ag_resv_type type) 1703 enum xfs_ag_resv_type type)
1704{ 1704{
1705 xfs_btree_cur_t *bno_cur; /* cursor for by-block btree */ 1705 struct xfs_mount *mp;
1706 xfs_btree_cur_t *cnt_cur; /* cursor for by-size btree */ 1706 struct xfs_perag *pag;
1707 int error; /* error return value */ 1707 struct xfs_btree_cur *bno_cur;
1708 xfs_agblock_t gtbno; /* start of right neighbor block */ 1708 struct xfs_btree_cur *cnt_cur;
1709 xfs_extlen_t gtlen; /* length of right neighbor block */ 1709 xfs_agblock_t gtbno; /* start of right neighbor */
1710 int haveleft; /* have a left neighbor block */ 1710 xfs_extlen_t gtlen; /* length of right neighbor */
1711 int haveright; /* have a right neighbor block */ 1711 xfs_agblock_t ltbno; /* start of left neighbor */
1712 int i; /* temp, result code */ 1712 xfs_extlen_t ltlen; /* length of left neighbor */
1713 xfs_agblock_t ltbno; /* start of left neighbor block */ 1713 xfs_agblock_t nbno; /* new starting block of freesp */
1714 xfs_extlen_t ltlen; /* length of left neighbor block */ 1714 xfs_extlen_t nlen; /* new length of freespace */
1715 xfs_mount_t *mp; /* mount point struct for filesystem */ 1715 int haveleft; /* have a left neighbor */
1716 xfs_agblock_t nbno; /* new starting block of freespace */ 1716 int haveright; /* have a right neighbor */
1717 xfs_extlen_t nlen; /* new length of freespace */ 1717 int i;
1718 xfs_perag_t *pag; /* per allocation group data */ 1718 int error;
1719 1719
1720 bno_cur = cnt_cur = NULL; 1720 bno_cur = cnt_cur = NULL;
1721 mp = tp->t_mountp; 1721 mp = tp->t_mountp;
@@ -3008,21 +3008,21 @@ out:
3008 * Just break up the extent address and hand off to xfs_free_ag_extent 3008 * Just break up the extent address and hand off to xfs_free_ag_extent
3009 * after fixing up the freelist. 3009 * after fixing up the freelist.
3010 */ 3010 */
3011int /* error */ 3011int
3012__xfs_free_extent( 3012__xfs_free_extent(
3013 struct xfs_trans *tp, /* transaction pointer */ 3013 struct xfs_trans *tp,
3014 xfs_fsblock_t bno, /* starting block number of extent */ 3014 xfs_fsblock_t bno,
3015 xfs_extlen_t len, /* length of extent */ 3015 xfs_extlen_t len,
3016 struct xfs_owner_info *oinfo, /* extent owner */ 3016 const struct xfs_owner_info *oinfo,
3017 enum xfs_ag_resv_type type, /* block reservation type */ 3017 enum xfs_ag_resv_type type,
3018 bool skip_discard) 3018 bool skip_discard)
3019{ 3019{
3020 struct xfs_mount *mp = tp->t_mountp; 3020 struct xfs_mount *mp = tp->t_mountp;
3021 struct xfs_buf *agbp; 3021 struct xfs_buf *agbp;
3022 xfs_agnumber_t agno = XFS_FSB_TO_AGNO(mp, bno); 3022 xfs_agnumber_t agno = XFS_FSB_TO_AGNO(mp, bno);
3023 xfs_agblock_t agbno = XFS_FSB_TO_AGBNO(mp, bno); 3023 xfs_agblock_t agbno = XFS_FSB_TO_AGBNO(mp, bno);
3024 int error; 3024 int error;
3025 unsigned int busy_flags = 0; 3025 unsigned int busy_flags = 0;
3026 3026
3027 ASSERT(len != 0); 3027 ASSERT(len != 0);
3028 ASSERT(type != XFS_AG_RESV_AGFL); 3028 ASSERT(type != XFS_AG_RESV_AGFL);
diff --git a/fs/xfs/libxfs/xfs_alloc.h b/fs/xfs/libxfs/xfs_alloc.h
index 00cd5ec4cb6b..d6ed5d2c07c2 100644
--- a/fs/xfs/libxfs/xfs_alloc.h
+++ b/fs/xfs/libxfs/xfs_alloc.h
@@ -182,7 +182,7 @@ __xfs_free_extent(
182 struct xfs_trans *tp, /* transaction pointer */ 182 struct xfs_trans *tp, /* transaction pointer */
183 xfs_fsblock_t bno, /* starting block number of extent */ 183 xfs_fsblock_t bno, /* starting block number of extent */
184 xfs_extlen_t len, /* length of extent */ 184 xfs_extlen_t len, /* length of extent */
185 struct xfs_owner_info *oinfo, /* extent owner */ 185 const struct xfs_owner_info *oinfo, /* extent owner */
186 enum xfs_ag_resv_type type, /* block reservation type */ 186 enum xfs_ag_resv_type type, /* block reservation type */
187 bool skip_discard); 187 bool skip_discard);
188 188
@@ -191,7 +191,7 @@ xfs_free_extent(
191 struct xfs_trans *tp, 191 struct xfs_trans *tp,
192 xfs_fsblock_t bno, 192 xfs_fsblock_t bno,
193 xfs_extlen_t len, 193 xfs_extlen_t len,
194 struct xfs_owner_info *oinfo, 194 const struct xfs_owner_info *oinfo,
195 enum xfs_ag_resv_type type) 195 enum xfs_ag_resv_type type)
196{ 196{
197 return __xfs_free_extent(tp, bno, len, oinfo, type, false); 197 return __xfs_free_extent(tp, bno, len, oinfo, type, false);
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 19e921d1586f..d5672ab58b1f 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -536,7 +536,7 @@ __xfs_bmap_add_free(
536 struct xfs_trans *tp, 536 struct xfs_trans *tp,
537 xfs_fsblock_t bno, 537 xfs_fsblock_t bno,
538 xfs_filblks_t len, 538 xfs_filblks_t len,
539 struct xfs_owner_info *oinfo, 539 const struct xfs_owner_info *oinfo,
540 bool skip_discard) 540 bool skip_discard)
541{ 541{
542 struct xfs_extent_free_item *new; /* new element */ 542 struct xfs_extent_free_item *new; /* new element */
diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h
index 488dc8860fd7..09d3ea97cc15 100644
--- a/fs/xfs/libxfs/xfs_bmap.h
+++ b/fs/xfs/libxfs/xfs_bmap.h
@@ -186,7 +186,7 @@ int xfs_bmap_add_attrfork(struct xfs_inode *ip, int size, int rsvd);
186int xfs_bmap_set_attrforkoff(struct xfs_inode *ip, int size, int *version); 186int xfs_bmap_set_attrforkoff(struct xfs_inode *ip, int size, int *version);
187void xfs_bmap_local_to_extents_empty(struct xfs_inode *ip, int whichfork); 187void xfs_bmap_local_to_extents_empty(struct xfs_inode *ip, int whichfork);
188void __xfs_bmap_add_free(struct xfs_trans *tp, xfs_fsblock_t bno, 188void __xfs_bmap_add_free(struct xfs_trans *tp, xfs_fsblock_t bno,
189 xfs_filblks_t len, struct xfs_owner_info *oinfo, 189 xfs_filblks_t len, const struct xfs_owner_info *oinfo,
190 bool skip_discard); 190 bool skip_discard);
191void xfs_bmap_compute_maxlevels(struct xfs_mount *mp, int whichfork); 191void xfs_bmap_compute_maxlevels(struct xfs_mount *mp, int whichfork);
192int xfs_bmap_first_unused(struct xfs_trans *tp, struct xfs_inode *ip, 192int xfs_bmap_first_unused(struct xfs_trans *tp, struct xfs_inode *ip,
@@ -234,7 +234,7 @@ xfs_bmap_add_free(
234 struct xfs_trans *tp, 234 struct xfs_trans *tp,
235 xfs_fsblock_t bno, 235 xfs_fsblock_t bno,
236 xfs_filblks_t len, 236 xfs_filblks_t len,
237 struct xfs_owner_info *oinfo) 237 const struct xfs_owner_info *oinfo)
238{ 238{
239 __xfs_bmap_add_free(tp, bno, len, oinfo, false); 239 __xfs_bmap_add_free(tp, bno, len, oinfo, false);
240} 240}
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index 245af452840e..e7d06295338d 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -458,21 +458,21 @@ out:
458 */ 458 */
459STATIC int 459STATIC int
460xfs_rmap_unmap( 460xfs_rmap_unmap(
461 struct xfs_btree_cur *cur, 461 struct xfs_btree_cur *cur,
462 xfs_agblock_t bno, 462 xfs_agblock_t bno,
463 xfs_extlen_t len, 463 xfs_extlen_t len,
464 bool unwritten, 464 bool unwritten,
465 struct xfs_owner_info *oinfo) 465 const struct xfs_owner_info *oinfo)
466{ 466{
467 struct xfs_mount *mp = cur->bc_mp; 467 struct xfs_mount *mp = cur->bc_mp;
468 struct xfs_rmap_irec ltrec; 468 struct xfs_rmap_irec ltrec;
469 uint64_t ltoff; 469 uint64_t ltoff;
470 int error = 0; 470 int error = 0;
471 int i; 471 int i;
472 uint64_t owner; 472 uint64_t owner;
473 uint64_t offset; 473 uint64_t offset;
474 unsigned int flags; 474 unsigned int flags;
475 bool ignore_off; 475 bool ignore_off;
476 476
477 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags); 477 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags);
478 ignore_off = XFS_RMAP_NON_INODE_OWNER(owner) || 478 ignore_off = XFS_RMAP_NON_INODE_OWNER(owner) ||
@@ -653,16 +653,16 @@ out_error:
653 */ 653 */
654int 654int
655xfs_rmap_free( 655xfs_rmap_free(
656 struct xfs_trans *tp, 656 struct xfs_trans *tp,
657 struct xfs_buf *agbp, 657 struct xfs_buf *agbp,
658 xfs_agnumber_t agno, 658 xfs_agnumber_t agno,
659 xfs_agblock_t bno, 659 xfs_agblock_t bno,
660 xfs_extlen_t len, 660 xfs_extlen_t len,
661 struct xfs_owner_info *oinfo) 661 const struct xfs_owner_info *oinfo)
662{ 662{
663 struct xfs_mount *mp = tp->t_mountp; 663 struct xfs_mount *mp = tp->t_mountp;
664 struct xfs_btree_cur *cur; 664 struct xfs_btree_cur *cur;
665 int error; 665 int error;
666 666
667 if (!xfs_sb_version_hasrmapbt(&mp->m_sb)) 667 if (!xfs_sb_version_hasrmapbt(&mp->m_sb))
668 return 0; 668 return 0;
@@ -710,23 +710,23 @@ xfs_rmap_is_mergeable(
710 */ 710 */
711STATIC int 711STATIC int
712xfs_rmap_map( 712xfs_rmap_map(
713 struct xfs_btree_cur *cur, 713 struct xfs_btree_cur *cur,
714 xfs_agblock_t bno, 714 xfs_agblock_t bno,
715 xfs_extlen_t len, 715 xfs_extlen_t len,
716 bool unwritten, 716 bool unwritten,
717 struct xfs_owner_info *oinfo) 717 const struct xfs_owner_info *oinfo)
718{ 718{
719 struct xfs_mount *mp = cur->bc_mp; 719 struct xfs_mount *mp = cur->bc_mp;
720 struct xfs_rmap_irec ltrec; 720 struct xfs_rmap_irec ltrec;
721 struct xfs_rmap_irec gtrec; 721 struct xfs_rmap_irec gtrec;
722 int have_gt; 722 int have_gt;
723 int have_lt; 723 int have_lt;
724 int error = 0; 724 int error = 0;
725 int i; 725 int i;
726 uint64_t owner; 726 uint64_t owner;
727 uint64_t offset; 727 uint64_t offset;
728 unsigned int flags = 0; 728 unsigned int flags = 0;
729 bool ignore_off; 729 bool ignore_off;
730 730
731 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags); 731 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags);
732 ASSERT(owner != 0); 732 ASSERT(owner != 0);
@@ -890,16 +890,16 @@ out_error:
890 */ 890 */
891int 891int
892xfs_rmap_alloc( 892xfs_rmap_alloc(
893 struct xfs_trans *tp, 893 struct xfs_trans *tp,
894 struct xfs_buf *agbp, 894 struct xfs_buf *agbp,
895 xfs_agnumber_t agno, 895 xfs_agnumber_t agno,
896 xfs_agblock_t bno, 896 xfs_agblock_t bno,
897 xfs_extlen_t len, 897 xfs_extlen_t len,
898 struct xfs_owner_info *oinfo) 898 const struct xfs_owner_info *oinfo)
899{ 899{
900 struct xfs_mount *mp = tp->t_mountp; 900 struct xfs_mount *mp = tp->t_mountp;
901 struct xfs_btree_cur *cur; 901 struct xfs_btree_cur *cur;
902 int error; 902 int error;
903 903
904 if (!xfs_sb_version_hasrmapbt(&mp->m_sb)) 904 if (!xfs_sb_version_hasrmapbt(&mp->m_sb))
905 return 0; 905 return 0;
@@ -929,16 +929,16 @@ xfs_rmap_alloc(
929 */ 929 */
930STATIC int 930STATIC int
931xfs_rmap_convert( 931xfs_rmap_convert(
932 struct xfs_btree_cur *cur, 932 struct xfs_btree_cur *cur,
933 xfs_agblock_t bno, 933 xfs_agblock_t bno,
934 xfs_extlen_t len, 934 xfs_extlen_t len,
935 bool unwritten, 935 bool unwritten,
936 struct xfs_owner_info *oinfo) 936 const struct xfs_owner_info *oinfo)
937{ 937{
938 struct xfs_mount *mp = cur->bc_mp; 938 struct xfs_mount *mp = cur->bc_mp;
939 struct xfs_rmap_irec r[4]; /* neighbor extent entries */ 939 struct xfs_rmap_irec r[4]; /* neighbor extent entries */
940 /* left is 0, right is 1, prev is 2 */ 940 /* left is 0, right is 1, */
941 /* new is 3 */ 941 /* prev is 2, new is 3 */
942 uint64_t owner; 942 uint64_t owner;
943 uint64_t offset; 943 uint64_t offset;
944 uint64_t new_endoff; 944 uint64_t new_endoff;
@@ -1354,16 +1354,16 @@ done:
1354 */ 1354 */
1355STATIC int 1355STATIC int
1356xfs_rmap_convert_shared( 1356xfs_rmap_convert_shared(
1357 struct xfs_btree_cur *cur, 1357 struct xfs_btree_cur *cur,
1358 xfs_agblock_t bno, 1358 xfs_agblock_t bno,
1359 xfs_extlen_t len, 1359 xfs_extlen_t len,
1360 bool unwritten, 1360 bool unwritten,
1361 struct xfs_owner_info *oinfo) 1361 const struct xfs_owner_info *oinfo)
1362{ 1362{
1363 struct xfs_mount *mp = cur->bc_mp; 1363 struct xfs_mount *mp = cur->bc_mp;
1364 struct xfs_rmap_irec r[4]; /* neighbor extent entries */ 1364 struct xfs_rmap_irec r[4]; /* neighbor extent entries */
1365 /* left is 0, right is 1, prev is 2 */ 1365 /* left is 0, right is 1, */
1366 /* new is 3 */ 1366 /* prev is 2, new is 3 */
1367 uint64_t owner; 1367 uint64_t owner;
1368 uint64_t offset; 1368 uint64_t offset;
1369 uint64_t new_endoff; 1369 uint64_t new_endoff;
@@ -1743,20 +1743,20 @@ done:
1743 */ 1743 */
1744STATIC int 1744STATIC int
1745xfs_rmap_unmap_shared( 1745xfs_rmap_unmap_shared(
1746 struct xfs_btree_cur *cur, 1746 struct xfs_btree_cur *cur,
1747 xfs_agblock_t bno, 1747 xfs_agblock_t bno,
1748 xfs_extlen_t len, 1748 xfs_extlen_t len,
1749 bool unwritten, 1749 bool unwritten,
1750 struct xfs_owner_info *oinfo) 1750 const struct xfs_owner_info *oinfo)
1751{ 1751{
1752 struct xfs_mount *mp = cur->bc_mp; 1752 struct xfs_mount *mp = cur->bc_mp;
1753 struct xfs_rmap_irec ltrec; 1753 struct xfs_rmap_irec ltrec;
1754 uint64_t ltoff; 1754 uint64_t ltoff;
1755 int error = 0; 1755 int error = 0;
1756 int i; 1756 int i;
1757 uint64_t owner; 1757 uint64_t owner;
1758 uint64_t offset; 1758 uint64_t offset;
1759 unsigned int flags; 1759 unsigned int flags;
1760 1760
1761 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags); 1761 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags);
1762 if (unwritten) 1762 if (unwritten)
@@ -1905,22 +1905,22 @@ out_error:
1905 */ 1905 */
1906STATIC int 1906STATIC int
1907xfs_rmap_map_shared( 1907xfs_rmap_map_shared(
1908 struct xfs_btree_cur *cur, 1908 struct xfs_btree_cur *cur,
1909 xfs_agblock_t bno, 1909 xfs_agblock_t bno,
1910 xfs_extlen_t len, 1910 xfs_extlen_t len,
1911 bool unwritten, 1911 bool unwritten,
1912 struct xfs_owner_info *oinfo) 1912 const struct xfs_owner_info *oinfo)
1913{ 1913{
1914 struct xfs_mount *mp = cur->bc_mp; 1914 struct xfs_mount *mp = cur->bc_mp;
1915 struct xfs_rmap_irec ltrec; 1915 struct xfs_rmap_irec ltrec;
1916 struct xfs_rmap_irec gtrec; 1916 struct xfs_rmap_irec gtrec;
1917 int have_gt; 1917 int have_gt;
1918 int have_lt; 1918 int have_lt;
1919 int error = 0; 1919 int error = 0;
1920 int i; 1920 int i;
1921 uint64_t owner; 1921 uint64_t owner;
1922 uint64_t offset; 1922 uint64_t offset;
1923 unsigned int flags = 0; 1923 unsigned int flags = 0;
1924 1924
1925 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags); 1925 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags);
1926 if (unwritten) 1926 if (unwritten)
@@ -2459,18 +2459,18 @@ xfs_rmap_has_record(
2459 */ 2459 */
2460int 2460int
2461xfs_rmap_record_exists( 2461xfs_rmap_record_exists(
2462 struct xfs_btree_cur *cur, 2462 struct xfs_btree_cur *cur,
2463 xfs_agblock_t bno, 2463 xfs_agblock_t bno,
2464 xfs_extlen_t len, 2464 xfs_extlen_t len,
2465 struct xfs_owner_info *oinfo, 2465 const struct xfs_owner_info *oinfo,
2466 bool *has_rmap) 2466 bool *has_rmap)
2467{ 2467{
2468 uint64_t owner; 2468 uint64_t owner;
2469 uint64_t offset; 2469 uint64_t offset;
2470 unsigned int flags; 2470 unsigned int flags;
2471 int has_record; 2471 int has_record;
2472 struct xfs_rmap_irec irec; 2472 struct xfs_rmap_irec irec;
2473 int error; 2473 int error;
2474 2474
2475 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags); 2475 xfs_owner_info_unpack(oinfo, &owner, &offset, &flags);
2476 ASSERT(XFS_RMAP_NON_INODE_OWNER(owner) || 2476 ASSERT(XFS_RMAP_NON_INODE_OWNER(owner) ||
@@ -2530,7 +2530,7 @@ xfs_rmap_has_other_keys(
2530 struct xfs_btree_cur *cur, 2530 struct xfs_btree_cur *cur,
2531 xfs_agblock_t bno, 2531 xfs_agblock_t bno,
2532 xfs_extlen_t len, 2532 xfs_extlen_t len,
2533 struct xfs_owner_info *oinfo, 2533 const struct xfs_owner_info *oinfo,
2534 bool *has_rmap) 2534 bool *has_rmap)
2535{ 2535{
2536 struct xfs_rmap_irec low = {0}; 2536 struct xfs_rmap_irec low = {0};
diff --git a/fs/xfs/libxfs/xfs_rmap.h b/fs/xfs/libxfs/xfs_rmap.h
index 157dc722ad35..6d32838aa184 100644
--- a/fs/xfs/libxfs/xfs_rmap.h
+++ b/fs/xfs/libxfs/xfs_rmap.h
@@ -52,7 +52,7 @@ xfs_rmap_skip_owner_update(
52 52
53static inline bool 53static inline bool
54xfs_rmap_should_skip_owner_update( 54xfs_rmap_should_skip_owner_update(
55 struct xfs_owner_info *oi) 55 const struct xfs_owner_info *oi)
56{ 56{
57 return oi->oi_owner == XFS_RMAP_OWN_NULL; 57 return oi->oi_owner == XFS_RMAP_OWN_NULL;
58} 58}
@@ -103,12 +103,12 @@ xfs_rmap_irec_offset_unpack(
103 103
104static inline void 104static inline void
105xfs_owner_info_unpack( 105xfs_owner_info_unpack(
106 struct xfs_owner_info *oinfo, 106 const struct xfs_owner_info *oinfo,
107 uint64_t *owner, 107 uint64_t *owner,
108 uint64_t *offset, 108 uint64_t *offset,
109 unsigned int *flags) 109 unsigned int *flags)
110{ 110{
111 unsigned int r = 0; 111 unsigned int r = 0;
112 112
113 *owner = oinfo->oi_owner; 113 *owner = oinfo->oi_owner;
114 *offset = oinfo->oi_offset; 114 *offset = oinfo->oi_offset;
@@ -137,10 +137,10 @@ xfs_owner_info_pack(
137 137
138int xfs_rmap_alloc(struct xfs_trans *tp, struct xfs_buf *agbp, 138int xfs_rmap_alloc(struct xfs_trans *tp, struct xfs_buf *agbp,
139 xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len, 139 xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
140 struct xfs_owner_info *oinfo); 140 const struct xfs_owner_info *oinfo);
141int xfs_rmap_free(struct xfs_trans *tp, struct xfs_buf *agbp, 141int xfs_rmap_free(struct xfs_trans *tp, struct xfs_buf *agbp,
142 xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len, 142 xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
143 struct xfs_owner_info *oinfo); 143 const struct xfs_owner_info *oinfo);
144 144
145int xfs_rmap_lookup_le(struct xfs_btree_cur *cur, xfs_agblock_t bno, 145int xfs_rmap_lookup_le(struct xfs_btree_cur *cur, xfs_agblock_t bno,
146 xfs_extlen_t len, uint64_t owner, uint64_t offset, 146 xfs_extlen_t len, uint64_t owner, uint64_t offset,
@@ -218,10 +218,10 @@ int xfs_rmap_btrec_to_irec(union xfs_btree_rec *rec,
218int xfs_rmap_has_record(struct xfs_btree_cur *cur, xfs_agblock_t bno, 218int xfs_rmap_has_record(struct xfs_btree_cur *cur, xfs_agblock_t bno,
219 xfs_extlen_t len, bool *exists); 219 xfs_extlen_t len, bool *exists);
220int xfs_rmap_record_exists(struct xfs_btree_cur *cur, xfs_agblock_t bno, 220int xfs_rmap_record_exists(struct xfs_btree_cur *cur, xfs_agblock_t bno,
221 xfs_extlen_t len, struct xfs_owner_info *oinfo, 221 xfs_extlen_t len, const struct xfs_owner_info *oinfo,
222 bool *has_rmap); 222 bool *has_rmap);
223int xfs_rmap_has_other_keys(struct xfs_btree_cur *cur, xfs_agblock_t bno, 223int xfs_rmap_has_other_keys(struct xfs_btree_cur *cur, xfs_agblock_t bno,
224 xfs_extlen_t len, struct xfs_owner_info *oinfo, 224 xfs_extlen_t len, const struct xfs_owner_info *oinfo,
225 bool *has_rmap); 225 bool *has_rmap);
226int xfs_rmap_map_raw(struct xfs_btree_cur *cur, struct xfs_rmap_irec *rmap); 226int xfs_rmap_map_raw(struct xfs_btree_cur *cur, struct xfs_rmap_irec *rmap);
227 227