diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-08-03 05:04:45 +0300 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-08-03 05:04:45 +0300 |
commit | 5880f2d78ff17c6ee7c7f6d4071bfd13090c264c (patch) | |
tree | 6f90df23bcb16a03e1e1bb90bccf2336467c0cba /fs/xfs/libxfs/xfs_rmap.h | |
parent | abf09233817b5ea1241db0c187136d3b4738d218 (diff) | |
download | linux-5880f2d78ff17c6ee7c7f6d4071bfd13090c264c.tar.xz |
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_rmap.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.h b/fs/xfs/libxfs/xfs_rmap.h index 92ac067da7dd..c4b1133e2ff9 100644 --- a/fs/xfs/libxfs/xfs_rmap.h +++ b/fs/xfs/libxfs/xfs_rmap.h @@ -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__ */ |