xfs: create rmap update intent log items
Create rmap update intent/done log items to record redo information in the log. Because we need to roll transactions between updating the bmbt mapping and updating the reverse mapping, we also have to track the status of the metadata updates that will be recorded in the post-roll transactions, just in case we crash before committing the final transaction. This mechanism enables log recovery to finish what was already started. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:

committed by
Dave Chinner

parent
abf0923381
commit
5880f2d78f
@@ -163,4 +163,23 @@ int xfs_rmap_query_range(struct xfs_btree_cur *cur,
|
||||
struct xfs_rmap_irec *low_rec, struct xfs_rmap_irec *high_rec,
|
||||
xfs_rmap_query_range_fn fn, void *priv);
|
||||
|
||||
enum xfs_rmap_intent_type {
|
||||
XFS_RMAP_MAP,
|
||||
XFS_RMAP_MAP_SHARED,
|
||||
XFS_RMAP_UNMAP,
|
||||
XFS_RMAP_UNMAP_SHARED,
|
||||
XFS_RMAP_CONVERT,
|
||||
XFS_RMAP_CONVERT_SHARED,
|
||||
XFS_RMAP_ALLOC,
|
||||
XFS_RMAP_FREE,
|
||||
};
|
||||
|
||||
struct xfs_rmap_intent {
|
||||
struct list_head ri_list;
|
||||
enum xfs_rmap_intent_type ri_type;
|
||||
__uint64_t ri_owner;
|
||||
int ri_whichfork;
|
||||
struct xfs_bmbt_irec ri_bmap;
|
||||
};
|
||||
|
||||
#endif /* __XFS_RMAP_H__ */
|
||||
|
Reference in New Issue
Block a user