]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: log refcount intent items
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Oct 2016 01:20:28 +0000 (12:20 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 25 Oct 2016 01:20:28 +0000 (12:20 +1100)
Source kernel commit: f997ee2137175f5b2bd7ced52acf1ca51f04f420

Provide a mechanism for higher levels to create CUI/CUD items, submit
them to the log, and a stub function to deal with recovered CUI items.
These parts will be connected to the refcountbt in a later patch.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_refcount.h

index 4dc335a1dc738a35d15f694d7b1c7577a60cd1ce..67b1c13fb714dc4a6883e982f31851048cfb4288 100644 (file)
@@ -27,4 +27,18 @@ extern int xfs_refcount_lookup_ge(struct xfs_btree_cur *cur,
 extern int xfs_refcount_get_rec(struct xfs_btree_cur *cur,
                struct xfs_refcount_irec *irec, int *stat);
 
+enum xfs_refcount_intent_type {
+       XFS_REFCOUNT_INCREASE = 1,
+       XFS_REFCOUNT_DECREASE,
+       XFS_REFCOUNT_ALLOC_COW,
+       XFS_REFCOUNT_FREE_COW,
+};
+
+struct xfs_refcount_intent {
+       struct list_head                        ri_list;
+       enum xfs_refcount_intent_type           ri_type;
+       xfs_fsblock_t                           ri_startblock;
+       xfs_extlen_t                            ri_blockcount;
+};
+
 #endif /* __XFS_REFCOUNT_H__ */