]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: expose various functions to repair code
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 28 Jun 2018 20:11:56 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:56 +0000 (15:11 -0500)
Source kernel commit: 7f8f1313d91a7db9546de6e5bfeb1a2eebb1fef5

Expose various helpers that the repair code will want to use.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_ialloc.c
libxfs/xfs_ialloc.h
libxfs/xfs_refcount.c
libxfs/xfs_refcount.h

index 2dbba5f6e3e038bdca1f139adf9dbfea33997a9d..4bf270ed77270238f5940a5eb42d5de970dbf377 100644 (file)
@@ -142,7 +142,7 @@ xfs_inobt_get_rec(
 /*
  * Insert a single inobt record. Cursor must already point to desired location.
  */
-STATIC int
+int
 xfs_inobt_insert_rec(
        struct xfs_btree_cur    *cur,
        uint16_t                holemask,
index c5402bb4ce0cd017e78e3bab72317cf77170d15f..77fffced8bac42418b269f359138f8a0ebf9dc2f 100644 (file)
@@ -176,6 +176,9 @@ int xfs_ialloc_has_inode_record(struct xfs_btree_cur *cur, xfs_agino_t low,
                xfs_agino_t high, bool *exists);
 int xfs_ialloc_count_inodes(struct xfs_btree_cur *cur, xfs_agino_t *count,
                xfs_agino_t *freecount);
+int xfs_inobt_insert_rec(struct xfs_btree_cur *cur, uint16_t holemask,
+               uint8_t count, int32_t freecount, xfs_inofree_t free,
+               int *stat);
 
 int xfs_ialloc_cluster_alignment(struct xfs_mount *mp);
 void xfs_ialloc_agino_range(struct xfs_mount *mp, xfs_agnumber_t agno,
index a19512ed3a05ea0306c5c30f4a37d7c5d2f80a8a..f2d366355cbd792b85fb65d2eb40418138b36bd2 100644 (file)
@@ -88,7 +88,7 @@ xfs_refcount_lookup_ge(
 }
 
 /* Convert on-disk record to in-core format. */
-static inline void
+void
 xfs_refcount_btrec_to_irec(
        union xfs_btree_rec             *rec,
        struct xfs_refcount_irec        *irec)
@@ -148,7 +148,7 @@ xfs_refcount_update(
  * by [bno, len, refcount].
  * This either works (return 0) or gets an EFSCORRUPTED error.
  */
-STATIC int
+int
 xfs_refcount_insert(
        struct xfs_btree_cur            *cur,
        struct xfs_refcount_irec        *irec,
index 2a731ac68fe4872376cd57e82e75e8ff4933a5b6..5856abb265ecd99f58b84287afd50052f1605715 100644 (file)
@@ -85,5 +85,10 @@ static inline xfs_fileoff_t xfs_refcount_max_unmap(int log_res)
 
 extern int xfs_refcount_has_record(struct xfs_btree_cur *cur,
                xfs_agblock_t bno, xfs_extlen_t len, bool *exists);
+union xfs_btree_rec;
+extern void xfs_refcount_btrec_to_irec(union xfs_btree_rec *rec,
+               struct xfs_refcount_irec *irec);
+extern int xfs_refcount_insert(struct xfs_btree_cur *cur,
+               struct xfs_refcount_irec *irec, int *stat);
 
 #endif /* __XFS_REFCOUNT_H__ */